AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1

Percentage Accurate: 61.6% → 93.1%
Time: 9.7s
Alternatives: 13
Speedup: 0.9×

Specification

?
\[\begin{array}{l} \\ \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b):
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 61.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b):
	return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}

Alternative 1: 93.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) + t\\ t_2 := \left(x + t\right) + y\\ t_3 := \frac{y}{t\_2}\\ \mathbf{if}\;z \leq -2.45 \cdot 10^{-45} \lor \neg \left(z \leq 8 \cdot 10^{-37}\right):\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{-b}{z}, t\_3, \frac{x}{t\_2}\right) + \mathsf{fma}\left(a, \frac{t\_3 + \frac{t}{t\_2}}{z}, t\_3\right)\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{t\_1} + \frac{y}{t\_1}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{t\_1}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ y x) t)) (t_2 (+ (+ x t) y)) (t_3 (/ y t_2)))
   (if (or (<= z -2.45e-45) (not (<= z 8e-37)))
     (*
      (+ (fma (/ (- b) z) t_3 (/ x t_2)) (fma a (/ (+ t_3 (/ t t_2)) z) t_3))
      z)
     (fma (+ (/ t t_1) (/ y t_1)) a (/ (fma z x (* y (- z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y + x) + t;
	double t_2 = (x + t) + y;
	double t_3 = y / t_2;
	double tmp;
	if ((z <= -2.45e-45) || !(z <= 8e-37)) {
		tmp = (fma((-b / z), t_3, (x / t_2)) + fma(a, ((t_3 + (t / t_2)) / z), t_3)) * z;
	} else {
		tmp = fma(((t / t_1) + (y / t_1)), a, (fma(z, x, (y * (z - b))) / t_1));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(y + x) + t)
	t_2 = Float64(Float64(x + t) + y)
	t_3 = Float64(y / t_2)
	tmp = 0.0
	if ((z <= -2.45e-45) || !(z <= 8e-37))
		tmp = Float64(Float64(fma(Float64(Float64(-b) / z), t_3, Float64(x / t_2)) + fma(a, Float64(Float64(t_3 + Float64(t / t_2)) / z), t_3)) * z);
	else
		tmp = fma(Float64(Float64(t / t_1) + Float64(y / t_1)), a, Float64(fma(z, x, Float64(y * Float64(z - b))) / t_1));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$3 = N[(y / t$95$2), $MachinePrecision]}, If[Or[LessEqual[z, -2.45e-45], N[Not[LessEqual[z, 8e-37]], $MachinePrecision]], N[(N[(N[(N[((-b) / z), $MachinePrecision] * t$95$3 + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(t$95$3 + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[(N[(t / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] * a + N[(N[(z * x + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y + x\right) + t\\
t_2 := \left(x + t\right) + y\\
t_3 := \frac{y}{t\_2}\\
\mathbf{if}\;z \leq -2.45 \cdot 10^{-45} \lor \neg \left(z \leq 8 \cdot 10^{-37}\right):\\
\;\;\;\;\left(\mathsf{fma}\left(\frac{-b}{z}, t\_3, \frac{x}{t\_2}\right) + \mathsf{fma}\left(a, \frac{t\_3 + \frac{t}{t\_2}}{z}, t\_3\right)\right) \cdot z\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t}{t\_1} + \frac{y}{t\_1}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{t\_1}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4499999999999999e-45 or 8.00000000000000053e-37 < z

    1. Initial program 47.5%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

      \[\leadsto \color{blue}{\left(a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)}\right) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
    4. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \color{blue}{a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + \left(\frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) \cdot a} + \left(\frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right) \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}, a, \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
    5. Applied rewrites56.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{\left(y + x\right) + t} + \frac{y}{\left(y + x\right) + t}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{\left(y + x\right) + t}\right)} \]
    6. Taylor expanded in z around inf

      \[\leadsto z \cdot \color{blue}{\left(-1 \cdot \frac{b \cdot y}{z \cdot \left(t + \left(x + y\right)\right)} + \left(\frac{x}{t + \left(x + y\right)} + \left(\frac{y}{t + \left(x + y\right)} + \frac{a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)}{z}\right)\right)\right)} \]
    7. Step-by-step derivation
      1. Applied rewrites99.8%

        \[\leadsto \left(\mathsf{fma}\left(\frac{-b}{z}, \frac{y}{\left(x + t\right) + y}, \frac{x}{\left(x + t\right) + y}\right) + \mathsf{fma}\left(a, \frac{\frac{y}{\left(x + t\right) + y} + \frac{t}{\left(x + t\right) + y}}{z}, \frac{y}{\left(x + t\right) + y}\right)\right) \cdot \color{blue}{z} \]

      if -2.4499999999999999e-45 < z < 8.00000000000000053e-37

      1. Initial program 70.0%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
      3. Taylor expanded in a around 0

        \[\leadsto \color{blue}{\left(a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)}\right) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. Step-by-step derivation
        1. associate--l+N/A

          \[\leadsto \color{blue}{a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + \left(\frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) \cdot a} + \left(\frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right) \]
        3. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}, a, \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      5. Applied rewrites87.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{\left(y + x\right) + t} + \frac{y}{\left(y + x\right) + t}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{\left(y + x\right) + t}\right)} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification94.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{-45} \lor \neg \left(z \leq 8 \cdot 10^{-37}\right):\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{-b}{z}, \frac{y}{\left(x + t\right) + y}, \frac{x}{\left(x + t\right) + y}\right) + \mathsf{fma}\left(a, \frac{\frac{y}{\left(x + t\right) + y} + \frac{t}{\left(x + t\right) + y}}{z}, \frac{y}{\left(x + t\right) + y}\right)\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{\left(y + x\right) + t} + \frac{y}{\left(y + x\right) + t}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{\left(y + x\right) + t}\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 2: 77.6% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t + y\right) \cdot a\\ t_2 := \left(x + t\right) + y\\ t_3 := \frac{\left(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{t\_2}\\ t_4 := \left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 \leq -1 \cdot 10^{+163}:\\ \;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+45}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_1\right)}{\left(y + x\right) + t}\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* (+ t y) a))
            (t_2 (+ (+ x t) y))
            (t_3 (/ (- (+ (* (+ x y) z) t_1) (* y b)) t_2))
            (t_4 (- (+ z a) (* y (/ b (+ (+ t x) y))))))
       (if (<= t_3 (- INFINITY))
         t_4
         (if (<= t_3 -1e+163)
           (/ (- t_1 (* y b)) t_2)
           (if (<= t_3 5e+45) (/ (fma (+ y x) z t_1) (+ (+ y x) t)) t_4)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (t + y) * a;
    	double t_2 = (x + t) + y;
    	double t_3 = ((((x + y) * z) + t_1) - (y * b)) / t_2;
    	double t_4 = (z + a) - (y * (b / ((t + x) + y)));
    	double tmp;
    	if (t_3 <= -((double) INFINITY)) {
    		tmp = t_4;
    	} else if (t_3 <= -1e+163) {
    		tmp = (t_1 - (y * b)) / t_2;
    	} else if (t_3 <= 5e+45) {
    		tmp = fma((y + x), z, t_1) / ((y + x) + t);
    	} else {
    		tmp = t_4;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(t + y) * a)
    	t_2 = Float64(Float64(x + t) + y)
    	t_3 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + t_1) - Float64(y * b)) / t_2)
    	t_4 = Float64(Float64(z + a) - Float64(y * Float64(b / Float64(Float64(t + x) + y))))
    	tmp = 0.0
    	if (t_3 <= Float64(-Inf))
    		tmp = t_4;
    	elseif (t_3 <= -1e+163)
    		tmp = Float64(Float64(t_1 - Float64(y * b)) / t_2);
    	elseif (t_3 <= 5e+45)
    		tmp = Float64(fma(Float64(y + x), z, t_1) / Float64(Float64(y + x) + t));
    	else
    		tmp = t_4;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -1e+163], N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$3, 5e+45], N[(N[(N[(y + x), $MachinePrecision] * z + t$95$1), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(t + y\right) \cdot a\\
    t_2 := \left(x + t\right) + y\\
    t_3 := \frac{\left(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{t\_2}\\
    t_4 := \left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\
    \mathbf{if}\;t\_3 \leq -\infty:\\
    \;\;\;\;t\_4\\
    
    \mathbf{elif}\;t\_3 \leq -1 \cdot 10^{+163}:\\
    \;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\
    
    \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+45}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_1\right)}{\left(y + x\right) + t}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_4\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 5e45 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

      1. Initial program 23.1%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}} \]
        2. lift--.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}{\left(x + t\right) + y} \]
        3. div-subN/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{\color{blue}{y \cdot b}}{\left(x + t\right) + y} \]
        5. associate-/l*N/A

          \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \color{blue}{y \cdot \frac{b}{\left(x + t\right) + y}} \]
        6. cancel-sign-sub-invN/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
        7. lower-+.f64N/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
      4. Applied rewrites28.9%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t + y, z \cdot \left(y + x\right)\right)}{\left(t + x\right) + y} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y}} \]
      5. Taylor expanded in y around inf

        \[\leadsto \color{blue}{\left(a + z\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
        2. lower-+.f6480.3

          \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
      7. Applied rewrites80.3%

        \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]

      if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -9.9999999999999994e162

      1. Initial program 99.8%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto \frac{\color{blue}{a \cdot \left(t + y\right)} - y \cdot b}{\left(x + t\right) + y} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{\left(t + y\right) \cdot a} - y \cdot b}{\left(x + t\right) + y} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{\color{blue}{\left(t + y\right) \cdot a} - y \cdot b}{\left(x + t\right) + y} \]
        3. lower-+.f6492.2

          \[\leadsto \frac{\color{blue}{\left(t + y\right)} \cdot a - y \cdot b}{\left(x + t\right) + y} \]
      5. Applied rewrites92.2%

        \[\leadsto \frac{\color{blue}{\left(t + y\right) \cdot a} - y \cdot b}{\left(x + t\right) + y} \]

      if -9.9999999999999994e162 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5e45

      1. Initial program 99.7%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
      3. Taylor expanded in b around 0

        \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
        2. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{z \cdot \left(x + y\right) + a \cdot \left(t + y\right)}}{t + \left(x + y\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{\left(x + y\right) \cdot z} + a \cdot \left(t + y\right)}{t + \left(x + y\right)} \]
        4. lower-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, a \cdot \left(t + y\right)\right)}}{t + \left(x + y\right)} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right)\right)}{t + \left(x + y\right)} \]
        6. lower-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right)\right)}{t + \left(x + y\right)} \]
        7. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right) \cdot a}\right)}{t + \left(x + y\right)} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right) \cdot a}\right)}{t + \left(x + y\right)} \]
        9. lower-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right)} \cdot a\right)}{t + \left(x + y\right)} \]
        10. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(x + y\right) + t}} \]
        11. lower-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(x + y\right) + t}} \]
        12. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(y + x\right)} + t} \]
        13. lower-+.f6479.4

          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(y + x\right)} + t} \]
      5. Applied rewrites79.4%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\left(y + x\right) + t}} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification80.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq -\infty:\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq -1 \cdot 10^{+163}:\\ \;\;\;\;\frac{\left(t + y\right) \cdot a - y \cdot b}{\left(x + t\right) + y}\\ \mathbf{elif}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq 5 \cdot 10^{+45}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\left(y + x\right) + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 3: 92.1% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+235}\right):\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
       (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+235)))
         (- (+ z a) (* y (/ b (+ (+ t x) y))))
         t_1)))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
    	double tmp;
    	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+235)) {
    		tmp = (z + a) - (y * (b / ((t + x) + y)));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
    	double tmp;
    	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+235)) {
    		tmp = (z + a) - (y * (b / ((t + x) + y)));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
    	tmp = 0
    	if (t_1 <= -math.inf) or not (t_1 <= 5e+235):
    		tmp = (z + a) - (y * (b / ((t + x) + y)))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
    	tmp = 0.0
    	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+235))
    		tmp = Float64(Float64(z + a) - Float64(y * Float64(b / Float64(Float64(t + x) + y))));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
    	tmp = 0.0;
    	if ((t_1 <= -Inf) || ~((t_1 <= 5e+235)))
    		tmp = (z + a) - (y * (b / ((t + x) + y)));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+235]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
    \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+235}\right):\\
    \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 5.00000000000000027e235 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

      1. Initial program 6.1%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}} \]
        2. lift--.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}{\left(x + t\right) + y} \]
        3. div-subN/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{\color{blue}{y \cdot b}}{\left(x + t\right) + y} \]
        5. associate-/l*N/A

          \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \color{blue}{y \cdot \frac{b}{\left(x + t\right) + y}} \]
        6. cancel-sign-sub-invN/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
        7. lower-+.f64N/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
      4. Applied rewrites13.9%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t + y, z \cdot \left(y + x\right)\right)}{\left(t + x\right) + y} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y}} \]
      5. Taylor expanded in y around inf

        \[\leadsto \color{blue}{\left(a + z\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
        2. lower-+.f6479.9

          \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
      7. Applied rewrites79.9%

        \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]

      if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.00000000000000027e235

      1. Initial program 99.7%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
    3. Recombined 2 regimes into one program.
    4. Final simplification90.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq -\infty \lor \neg \left(\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq 5 \cdot 10^{+235}\right):\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 71.5% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-132} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+45}\right):\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
       (if (or (<= t_1 -2e-132) (not (<= t_1 5e+45)))
         (- (+ z a) (* y (/ b (+ (+ t x) y))))
         (/ (fma a t (* z x)) (+ t x)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
    	double tmp;
    	if ((t_1 <= -2e-132) || !(t_1 <= 5e+45)) {
    		tmp = (z + a) - (y * (b / ((t + x) + y)));
    	} else {
    		tmp = fma(a, t, (z * x)) / (t + x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y))
    	tmp = 0.0
    	if ((t_1 <= -2e-132) || !(t_1 <= 5e+45))
    		tmp = Float64(Float64(z + a) - Float64(y * Float64(b / Float64(Float64(t + x) + y))));
    	else
    		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-132], N[Not[LessEqual[t$95$1, 5e+45]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
    \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-132} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+45}\right):\\
    \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -2e-132 or 5e45 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

      1. Initial program 49.2%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}} \]
        2. lift--.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}{\left(x + t\right) + y} \]
        3. div-subN/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{\color{blue}{y \cdot b}}{\left(x + t\right) + y} \]
        5. associate-/l*N/A

          \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \color{blue}{y \cdot \frac{b}{\left(x + t\right) + y}} \]
        6. cancel-sign-sub-invN/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
        7. lower-+.f64N/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
      4. Applied rewrites51.3%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t + y, z \cdot \left(y + x\right)\right)}{\left(t + x\right) + y} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y}} \]
      5. Taylor expanded in y around inf

        \[\leadsto \color{blue}{\left(a + z\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
        2. lower-+.f6477.2

          \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
      7. Applied rewrites77.2%

        \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]

      if -2e-132 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5e45

      1. Initial program 99.7%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
        2. lower-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, t, x \cdot z\right)}}{t + x} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
        5. lower-+.f6475.8

          \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{\color{blue}{t + x}} \]
      5. Applied rewrites75.8%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification77.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq -2 \cdot 10^{-132} \lor \neg \left(\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \leq 5 \cdot 10^{+45}\right):\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 75.8% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{-33} \lor \neg \left(y \leq 690\right):\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{x + t}, x \cdot \frac{z}{x + t}\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (or (<= y -1e-33) (not (<= y 690.0)))
       (- (+ z a) (* y (/ b (+ (+ t x) y))))
       (fma a (/ t (+ x t)) (* x (/ z (+ x t))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if ((y <= -1e-33) || !(y <= 690.0)) {
    		tmp = (z + a) - (y * (b / ((t + x) + y)));
    	} else {
    		tmp = fma(a, (t / (x + t)), (x * (z / (x + t))));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if ((y <= -1e-33) || !(y <= 690.0))
    		tmp = Float64(Float64(z + a) - Float64(y * Float64(b / Float64(Float64(t + x) + y))));
    	else
    		tmp = fma(a, Float64(t / Float64(x + t)), Float64(x * Float64(z / Float64(x + t))));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1e-33], N[Not[LessEqual[y, 690.0]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision] + N[(x * N[(z / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -1 \cdot 10^{-33} \lor \neg \left(y \leq 690\right):\\
    \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(a, \frac{t}{x + t}, x \cdot \frac{z}{x + t}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -1.0000000000000001e-33 or 690 < y

      1. Initial program 43.3%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}} \]
        2. lift--.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}{\left(x + t\right) + y} \]
        3. div-subN/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{\color{blue}{y \cdot b}}{\left(x + t\right) + y} \]
        5. associate-/l*N/A

          \[\leadsto \frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \color{blue}{y \cdot \frac{b}{\left(x + t\right) + y}} \]
        6. cancel-sign-sub-invN/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
        7. lower-+.f64N/A

          \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
      4. Applied rewrites50.2%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t + y, z \cdot \left(y + x\right)\right)}{\left(t + x\right) + y} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y}} \]
      5. Taylor expanded in y around inf

        \[\leadsto \color{blue}{\left(a + z\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
        2. lower-+.f6486.2

          \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]
      7. Applied rewrites86.2%

        \[\leadsto \color{blue}{\left(z + a\right)} + \left(-y\right) \cdot \frac{b}{\left(t + x\right) + y} \]

      if -1.0000000000000001e-33 < y < 690

      1. Initial program 70.7%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
      3. Taylor expanded in a around 0

        \[\leadsto \color{blue}{\left(a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)}\right) - \frac{b \cdot y}{t + \left(x + y\right)}} \]
      4. Step-by-step derivation
        1. associate--l+N/A

          \[\leadsto \color{blue}{a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) + \left(\frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right) \cdot a} + \left(\frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right) \]
        3. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}, a, \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      5. Applied rewrites86.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{\left(y + x\right) + t} + \frac{y}{\left(y + x\right) + t}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{\left(y + x\right) + t}\right)} \]
      6. Taylor expanded in y around 0

        \[\leadsto \frac{a \cdot t}{t + x} + \color{blue}{\frac{x \cdot z}{t + x}} \]
      7. Step-by-step derivation
        1. Applied rewrites82.9%

          \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{t}{x + t}}, x \cdot \frac{z}{x + t}\right) \]
      8. Recombined 2 regimes into one program.
      9. Final simplification84.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{-33} \lor \neg \left(y \leq 690\right):\\ \;\;\;\;\left(z + a\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{x + t}, x \cdot \frac{z}{x + t}\right)\\ \end{array} \]
      10. Add Preprocessing

      Alternative 6: 60.8% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -1 \cdot 10^{-33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-211}:\\ \;\;\;\;a \cdot \frac{t}{t + x}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-208}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{elif}\;y \leq 23000000:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (- (+ a z) b)))
         (if (<= y -1e-33)
           t_1
           (if (<= y -4e-211)
             (* a (/ t (+ t x)))
             (if (<= y 1.7e-208)
               (/ (fma a t (* z x)) (+ t x))
               (if (<= y 23000000.0) (+ z a) t_1))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (a + z) - b;
      	double tmp;
      	if (y <= -1e-33) {
      		tmp = t_1;
      	} else if (y <= -4e-211) {
      		tmp = a * (t / (t + x));
      	} else if (y <= 1.7e-208) {
      		tmp = fma(a, t, (z * x)) / (t + x);
      	} else if (y <= 23000000.0) {
      		tmp = z + a;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(a + z) - b)
      	tmp = 0.0
      	if (y <= -1e-33)
      		tmp = t_1;
      	elseif (y <= -4e-211)
      		tmp = Float64(a * Float64(t / Float64(t + x)));
      	elseif (y <= 1.7e-208)
      		tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x));
      	elseif (y <= 23000000.0)
      		tmp = Float64(z + a);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1e-33], t$95$1, If[LessEqual[y, -4e-211], N[(a * N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-208], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 23000000.0], N[(z + a), $MachinePrecision], t$95$1]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(a + z\right) - b\\
      \mathbf{if}\;y \leq -1 \cdot 10^{-33}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq -4 \cdot 10^{-211}:\\
      \;\;\;\;a \cdot \frac{t}{t + x}\\
      
      \mathbf{elif}\;y \leq 1.7 \cdot 10^{-208}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\
      
      \mathbf{elif}\;y \leq 23000000:\\
      \;\;\;\;z + a\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if y < -1.0000000000000001e-33 or 2.3e7 < y

        1. Initial program 43.6%

          \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
        4. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
          2. lower-+.f6476.2

            \[\leadsto \color{blue}{\left(a + z\right)} - b \]
        5. Applied rewrites76.2%

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]

        if -1.0000000000000001e-33 < y < -4.00000000000000034e-211

        1. Initial program 63.7%

          \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
          2. lower-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, t, x \cdot z\right)}}{t + x} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
          5. lower-+.f6450.8

            \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{\color{blue}{t + x}} \]
        5. Applied rewrites50.8%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}} \]
        6. Taylor expanded in z around 0

          \[\leadsto \frac{a \cdot t}{\color{blue}{t + x}} \]
        7. Step-by-step derivation
          1. Applied rewrites62.3%

            \[\leadsto a \cdot \color{blue}{\frac{t}{t + x}} \]

          if -4.00000000000000034e-211 < y < 1.7e-208

          1. Initial program 86.5%

            \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
          2. Add Preprocessing
          3. Taylor expanded in y around 0

            \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
            2. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, t, x \cdot z\right)}}{t + x} \]
            3. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
            5. lower-+.f6475.5

              \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{\color{blue}{t + x}} \]
          5. Applied rewrites75.5%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}} \]

          if 1.7e-208 < y < 2.3e7

          1. Initial program 60.7%

            \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
          2. Add Preprocessing
          3. Taylor expanded in b around 0

            \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{z \cdot \left(x + y\right) + a \cdot \left(t + y\right)}}{t + \left(x + y\right)} \]
            3. *-commutativeN/A

              \[\leadsto \frac{\color{blue}{\left(x + y\right) \cdot z} + a \cdot \left(t + y\right)}{t + \left(x + y\right)} \]
            4. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, a \cdot \left(t + y\right)\right)}}{t + \left(x + y\right)} \]
            5. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right)\right)}{t + \left(x + y\right)} \]
            6. lower-+.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right)\right)}{t + \left(x + y\right)} \]
            7. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right) \cdot a}\right)}{t + \left(x + y\right)} \]
            8. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right) \cdot a}\right)}{t + \left(x + y\right)} \]
            9. lower-+.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right)} \cdot a\right)}{t + \left(x + y\right)} \]
            10. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(x + y\right) + t}} \]
            11. lower-+.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(x + y\right) + t}} \]
            12. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(y + x\right)} + t} \]
            13. lower-+.f6445.1

              \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(y + x\right)} + t} \]
          5. Applied rewrites45.1%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\left(y + x\right) + t}} \]
          6. Taylor expanded in y around inf

            \[\leadsto a + \color{blue}{z} \]
          7. Step-by-step derivation
            1. Applied rewrites55.8%

              \[\leadsto z + \color{blue}{a} \]
          8. Recombined 4 regimes into one program.
          9. Final simplification70.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{-33}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-211}:\\ \;\;\;\;a \cdot \frac{t}{t + x}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-208}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\ \mathbf{elif}\;y \leq 23000000:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
          10. Add Preprocessing

          Alternative 7: 55.4% accurate, 1.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{-33} \lor \neg \left(y \leq 8.6 \cdot 10^{-15}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t}{t + x}\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (or (<= y -1e-33) (not (<= y 8.6e-15)))
             (- (+ a z) b)
             (* a (/ t (+ t x)))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((y <= -1e-33) || !(y <= 8.6e-15)) {
          		tmp = (a + z) - b;
          	} else {
          		tmp = a * (t / (t + x));
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t, a, b)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: tmp
              if ((y <= (-1d-33)) .or. (.not. (y <= 8.6d-15))) then
                  tmp = (a + z) - b
              else
                  tmp = a * (t / (t + x))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if ((y <= -1e-33) || !(y <= 8.6e-15)) {
          		tmp = (a + z) - b;
          	} else {
          		tmp = a * (t / (t + x));
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	tmp = 0
          	if (y <= -1e-33) or not (y <= 8.6e-15):
          		tmp = (a + z) - b
          	else:
          		tmp = a * (t / (t + x))
          	return tmp
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if ((y <= -1e-33) || !(y <= 8.6e-15))
          		tmp = Float64(Float64(a + z) - b);
          	else
          		tmp = Float64(a * Float64(t / Float64(t + x)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	tmp = 0.0;
          	if ((y <= -1e-33) || ~((y <= 8.6e-15)))
          		tmp = (a + z) - b;
          	else
          		tmp = a * (t / (t + x));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1e-33], N[Not[LessEqual[y, 8.6e-15]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(a * N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y \leq -1 \cdot 10^{-33} \lor \neg \left(y \leq 8.6 \cdot 10^{-15}\right):\\
          \;\;\;\;\left(a + z\right) - b\\
          
          \mathbf{else}:\\
          \;\;\;\;a \cdot \frac{t}{t + x}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -1.0000000000000001e-33 or 8.5999999999999993e-15 < y

            1. Initial program 44.2%

              \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
            2. Add Preprocessing
            3. Taylor expanded in y around inf

              \[\leadsto \color{blue}{\left(a + z\right) - b} \]
            4. Step-by-step derivation
              1. lower--.f64N/A

                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
              2. lower-+.f6475.3

                \[\leadsto \color{blue}{\left(a + z\right)} - b \]
            5. Applied rewrites75.3%

              \[\leadsto \color{blue}{\left(a + z\right) - b} \]

            if -1.0000000000000001e-33 < y < 8.5999999999999993e-15

            1. Initial program 70.3%

              \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
            2. Add Preprocessing
            3. Taylor expanded in y around 0

              \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
            4. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
              2. lower-fma.f64N/A

                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, t, x \cdot z\right)}}{t + x} \]
              3. *-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
              4. lower-*.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
              5. lower-+.f6457.3

                \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{\color{blue}{t + x}} \]
            5. Applied rewrites57.3%

              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}} \]
            6. Taylor expanded in z around 0

              \[\leadsto \frac{a \cdot t}{\color{blue}{t + x}} \]
            7. Step-by-step derivation
              1. Applied rewrites53.4%

                \[\leadsto a \cdot \color{blue}{\frac{t}{t + x}} \]
            8. Recombined 2 regimes into one program.
            9. Final simplification64.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{-33} \lor \neg \left(y \leq 8.6 \cdot 10^{-15}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t}{t + x}\\ \end{array} \]
            10. Add Preprocessing

            Alternative 8: 59.0% accurate, 2.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-13} \lor \neg \left(y \leq 23000000\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (if (or (<= y -1.3e-13) (not (<= y 23000000.0))) (- (+ a z) b) (+ z a)))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((y <= -1.3e-13) || !(y <= 23000000.0)) {
            		tmp = (a + z) - b;
            	} else {
            		tmp = z + a;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t, a, b)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8) :: tmp
                if ((y <= (-1.3d-13)) .or. (.not. (y <= 23000000.0d0))) then
                    tmp = (a + z) - b
                else
                    tmp = z + a
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((y <= -1.3e-13) || !(y <= 23000000.0)) {
            		tmp = (a + z) - b;
            	} else {
            		tmp = z + a;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	tmp = 0
            	if (y <= -1.3e-13) or not (y <= 23000000.0):
            		tmp = (a + z) - b
            	else:
            		tmp = z + a
            	return tmp
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if ((y <= -1.3e-13) || !(y <= 23000000.0))
            		tmp = Float64(Float64(a + z) - b);
            	else
            		tmp = Float64(z + a);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	tmp = 0.0;
            	if ((y <= -1.3e-13) || ~((y <= 23000000.0)))
            		tmp = (a + z) - b;
            	else
            		tmp = z + a;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.3e-13], N[Not[LessEqual[y, 23000000.0]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(z + a), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -1.3 \cdot 10^{-13} \lor \neg \left(y \leq 23000000\right):\\
            \;\;\;\;\left(a + z\right) - b\\
            
            \mathbf{else}:\\
            \;\;\;\;z + a\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -1.3e-13 or 2.3e7 < y

              1. Initial program 42.1%

                \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
              2. Add Preprocessing
              3. Taylor expanded in y around inf

                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
              4. Step-by-step derivation
                1. lower--.f64N/A

                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                2. lower-+.f6476.8

                  \[\leadsto \color{blue}{\left(a + z\right)} - b \]
              5. Applied rewrites76.8%

                \[\leadsto \color{blue}{\left(a + z\right) - b} \]

              if -1.3e-13 < y < 2.3e7

              1. Initial program 70.6%

                \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
              2. Add Preprocessing
              3. Taylor expanded in b around 0

                \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
              4. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
                2. +-commutativeN/A

                  \[\leadsto \frac{\color{blue}{z \cdot \left(x + y\right) + a \cdot \left(t + y\right)}}{t + \left(x + y\right)} \]
                3. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{\left(x + y\right) \cdot z} + a \cdot \left(t + y\right)}{t + \left(x + y\right)} \]
                4. lower-fma.f64N/A

                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, a \cdot \left(t + y\right)\right)}}{t + \left(x + y\right)} \]
                5. +-commutativeN/A

                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right)\right)}{t + \left(x + y\right)} \]
                6. lower-+.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right)\right)}{t + \left(x + y\right)} \]
                7. *-commutativeN/A

                  \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right) \cdot a}\right)}{t + \left(x + y\right)} \]
                8. lower-*.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right) \cdot a}\right)}{t + \left(x + y\right)} \]
                9. lower-+.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right)} \cdot a\right)}{t + \left(x + y\right)} \]
                10. +-commutativeN/A

                  \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(x + y\right) + t}} \]
                11. lower-+.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(x + y\right) + t}} \]
                12. +-commutativeN/A

                  \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(y + x\right)} + t} \]
                13. lower-+.f6457.2

                  \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(y + x\right)} + t} \]
              5. Applied rewrites57.2%

                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\left(y + x\right) + t}} \]
              6. Taylor expanded in y around inf

                \[\leadsto a + \color{blue}{z} \]
              7. Step-by-step derivation
                1. Applied rewrites52.8%

                  \[\leadsto z + \color{blue}{a} \]
              8. Recombined 2 regimes into one program.
              9. Final simplification64.3%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-13} \lor \neg \left(y \leq 23000000\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \]
              10. Add Preprocessing

              Alternative 9: 52.8% accurate, 2.5× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+194} \lor \neg \left(t \leq 9.8 \cdot 10^{+204}\right):\\ \;\;\;\;a \cdot 1\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (if (or (<= t -2.9e+194) (not (<= t 9.8e+204))) (* a 1.0) (+ z a)))
              double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if ((t <= -2.9e+194) || !(t <= 9.8e+204)) {
              		tmp = a * 1.0;
              	} else {
              		tmp = z + a;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a, b)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8) :: tmp
                  if ((t <= (-2.9d+194)) .or. (.not. (t <= 9.8d+204))) then
                      tmp = a * 1.0d0
                  else
                      tmp = z + a
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if ((t <= -2.9e+194) || !(t <= 9.8e+204)) {
              		tmp = a * 1.0;
              	} else {
              		tmp = z + a;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	tmp = 0
              	if (t <= -2.9e+194) or not (t <= 9.8e+204):
              		tmp = a * 1.0
              	else:
              		tmp = z + a
              	return tmp
              
              function code(x, y, z, t, a, b)
              	tmp = 0.0
              	if ((t <= -2.9e+194) || !(t <= 9.8e+204))
              		tmp = Float64(a * 1.0);
              	else
              		tmp = Float64(z + a);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	tmp = 0.0;
              	if ((t <= -2.9e+194) || ~((t <= 9.8e+204)))
              		tmp = a * 1.0;
              	else
              		tmp = z + a;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.9e+194], N[Not[LessEqual[t, 9.8e+204]], $MachinePrecision]], N[(a * 1.0), $MachinePrecision], N[(z + a), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;t \leq -2.9 \cdot 10^{+194} \lor \neg \left(t \leq 9.8 \cdot 10^{+204}\right):\\
              \;\;\;\;a \cdot 1\\
              
              \mathbf{else}:\\
              \;\;\;\;z + a\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < -2.9000000000000001e194 or 9.7999999999999995e204 < t

                1. Initial program 37.4%

                  \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                2. Add Preprocessing
                3. Taylor expanded in y around 0

                  \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
                4. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
                  2. lower-fma.f64N/A

                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, t, x \cdot z\right)}}{t + x} \]
                  3. *-commutativeN/A

                    \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
                  4. lower-*.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(a, t, \color{blue}{z \cdot x}\right)}{t + x} \]
                  5. lower-+.f6431.9

                    \[\leadsto \frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{\color{blue}{t + x}} \]
                5. Applied rewrites31.9%

                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}} \]
                6. Taylor expanded in z around 0

                  \[\leadsto \frac{a \cdot t}{\color{blue}{t + x}} \]
                7. Step-by-step derivation
                  1. Applied rewrites67.7%

                    \[\leadsto a \cdot \color{blue}{\frac{t}{t + x}} \]
                  2. Taylor expanded in x around 0

                    \[\leadsto a \cdot 1 \]
                  3. Step-by-step derivation
                    1. Applied rewrites65.8%

                      \[\leadsto a \cdot 1 \]

                    if -2.9000000000000001e194 < t < 9.7999999999999995e204

                    1. Initial program 61.5%

                      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                    2. Add Preprocessing
                    3. Taylor expanded in b around 0

                      \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
                    4. Step-by-step derivation
                      1. lower-/.f64N/A

                        \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
                      2. +-commutativeN/A

                        \[\leadsto \frac{\color{blue}{z \cdot \left(x + y\right) + a \cdot \left(t + y\right)}}{t + \left(x + y\right)} \]
                      3. *-commutativeN/A

                        \[\leadsto \frac{\color{blue}{\left(x + y\right) \cdot z} + a \cdot \left(t + y\right)}{t + \left(x + y\right)} \]
                      4. lower-fma.f64N/A

                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, a \cdot \left(t + y\right)\right)}}{t + \left(x + y\right)} \]
                      5. +-commutativeN/A

                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right)\right)}{t + \left(x + y\right)} \]
                      6. lower-+.f64N/A

                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right)\right)}{t + \left(x + y\right)} \]
                      7. *-commutativeN/A

                        \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right) \cdot a}\right)}{t + \left(x + y\right)} \]
                      8. lower-*.f64N/A

                        \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right) \cdot a}\right)}{t + \left(x + y\right)} \]
                      9. lower-+.f64N/A

                        \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right)} \cdot a\right)}{t + \left(x + y\right)} \]
                      10. +-commutativeN/A

                        \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(x + y\right) + t}} \]
                      11. lower-+.f64N/A

                        \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(x + y\right) + t}} \]
                      12. +-commutativeN/A

                        \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(y + x\right)} + t} \]
                      13. lower-+.f6445.3

                        \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(y + x\right)} + t} \]
                    5. Applied rewrites45.3%

                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\left(y + x\right) + t}} \]
                    6. Taylor expanded in y around inf

                      \[\leadsto a + \color{blue}{z} \]
                    7. Step-by-step derivation
                      1. Applied rewrites57.3%

                        \[\leadsto z + \color{blue}{a} \]
                    8. Recombined 2 regimes into one program.
                    9. Final simplification58.9%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+194} \lor \neg \left(t \leq 9.8 \cdot 10^{+204}\right):\\ \;\;\;\;a \cdot 1\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 10: 50.8% accurate, 2.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-152} \lor \neg \left(x \leq -6.6 \cdot 10^{-295}\right):\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (if (or (<= x -1.7e-152) (not (<= x -6.6e-295))) (+ z a) (- a b)))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double tmp;
                    	if ((x <= -1.7e-152) || !(x <= -6.6e-295)) {
                    		tmp = z + a;
                    	} else {
                    		tmp = a - b;
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z, t, a, b)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8) :: tmp
                        if ((x <= (-1.7d-152)) .or. (.not. (x <= (-6.6d-295)))) then
                            tmp = z + a
                        else
                            tmp = a - b
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b) {
                    	double tmp;
                    	if ((x <= -1.7e-152) || !(x <= -6.6e-295)) {
                    		tmp = z + a;
                    	} else {
                    		tmp = a - b;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	tmp = 0
                    	if (x <= -1.7e-152) or not (x <= -6.6e-295):
                    		tmp = z + a
                    	else:
                    		tmp = a - b
                    	return tmp
                    
                    function code(x, y, z, t, a, b)
                    	tmp = 0.0
                    	if ((x <= -1.7e-152) || !(x <= -6.6e-295))
                    		tmp = Float64(z + a);
                    	else
                    		tmp = Float64(a - b);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b)
                    	tmp = 0.0;
                    	if ((x <= -1.7e-152) || ~((x <= -6.6e-295)))
                    		tmp = z + a;
                    	else
                    		tmp = a - b;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -1.7e-152], N[Not[LessEqual[x, -6.6e-295]], $MachinePrecision]], N[(z + a), $MachinePrecision], N[(a - b), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;x \leq -1.7 \cdot 10^{-152} \lor \neg \left(x \leq -6.6 \cdot 10^{-295}\right):\\
                    \;\;\;\;z + a\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;a - b\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -1.69999999999999992e-152 or -6.5999999999999997e-295 < x

                      1. Initial program 55.9%

                        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                      2. Add Preprocessing
                      3. Taylor expanded in b around 0

                        \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
                      4. Step-by-step derivation
                        1. lower-/.f64N/A

                          \[\leadsto \color{blue}{\frac{a \cdot \left(t + y\right) + z \cdot \left(x + y\right)}{t + \left(x + y\right)}} \]
                        2. +-commutativeN/A

                          \[\leadsto \frac{\color{blue}{z \cdot \left(x + y\right) + a \cdot \left(t + y\right)}}{t + \left(x + y\right)} \]
                        3. *-commutativeN/A

                          \[\leadsto \frac{\color{blue}{\left(x + y\right) \cdot z} + a \cdot \left(t + y\right)}{t + \left(x + y\right)} \]
                        4. lower-fma.f64N/A

                          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x + y, z, a \cdot \left(t + y\right)\right)}}{t + \left(x + y\right)} \]
                        5. +-commutativeN/A

                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right)\right)}{t + \left(x + y\right)} \]
                        6. lower-+.f64N/A

                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y + x}, z, a \cdot \left(t + y\right)\right)}{t + \left(x + y\right)} \]
                        7. *-commutativeN/A

                          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right) \cdot a}\right)}{t + \left(x + y\right)} \]
                        8. lower-*.f64N/A

                          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right) \cdot a}\right)}{t + \left(x + y\right)} \]
                        9. lower-+.f64N/A

                          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \color{blue}{\left(t + y\right)} \cdot a\right)}{t + \left(x + y\right)} \]
                        10. +-commutativeN/A

                          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(x + y\right) + t}} \]
                        11. lower-+.f64N/A

                          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(x + y\right) + t}} \]
                        12. +-commutativeN/A

                          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(y + x\right)} + t} \]
                        13. lower-+.f6443.5

                          \[\leadsto \frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\color{blue}{\left(y + x\right)} + t} \]
                      5. Applied rewrites43.5%

                        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\left(y + x\right) + t}} \]
                      6. Taylor expanded in y around inf

                        \[\leadsto a + \color{blue}{z} \]
                      7. Step-by-step derivation
                        1. Applied rewrites56.9%

                          \[\leadsto z + \color{blue}{a} \]

                        if -1.69999999999999992e-152 < x < -6.5999999999999997e-295

                        1. Initial program 63.1%

                          \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                        2. Add Preprocessing
                        3. Taylor expanded in y around inf

                          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                        4. Step-by-step derivation
                          1. lower--.f64N/A

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          2. lower-+.f6462.7

                            \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                        5. Applied rewrites62.7%

                          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                        6. Taylor expanded in z around 0

                          \[\leadsto a - \color{blue}{b} \]
                        7. Step-by-step derivation
                          1. Applied rewrites68.2%

                            \[\leadsto a - \color{blue}{b} \]
                        8. Recombined 2 regimes into one program.
                        9. Final simplification58.5%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{-152} \lor \neg \left(x \leq -6.6 \cdot 10^{-295}\right):\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 11: 47.8% accurate, 2.8× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{+57} \lor \neg \left(z \leq 3.8 \cdot 10^{+85}\right):\\ \;\;\;\;z - b\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (if (or (<= z -1.12e+57) (not (<= z 3.8e+85))) (- z b) (- a b)))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double tmp;
                        	if ((z <= -1.12e+57) || !(z <= 3.8e+85)) {
                        		tmp = z - b;
                        	} else {
                        		tmp = a - b;
                        	}
                        	return tmp;
                        }
                        
                        real(8) function code(x, y, z, t, a, b)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8) :: tmp
                            if ((z <= (-1.12d+57)) .or. (.not. (z <= 3.8d+85))) then
                                tmp = z - b
                            else
                                tmp = a - b
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	double tmp;
                        	if ((z <= -1.12e+57) || !(z <= 3.8e+85)) {
                        		tmp = z - b;
                        	} else {
                        		tmp = a - b;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	tmp = 0
                        	if (z <= -1.12e+57) or not (z <= 3.8e+85):
                        		tmp = z - b
                        	else:
                        		tmp = a - b
                        	return tmp
                        
                        function code(x, y, z, t, a, b)
                        	tmp = 0.0
                        	if ((z <= -1.12e+57) || !(z <= 3.8e+85))
                        		tmp = Float64(z - b);
                        	else
                        		tmp = Float64(a - b);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b)
                        	tmp = 0.0;
                        	if ((z <= -1.12e+57) || ~((z <= 3.8e+85)))
                        		tmp = z - b;
                        	else
                        		tmp = a - b;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.12e+57], N[Not[LessEqual[z, 3.8e+85]], $MachinePrecision]], N[(z - b), $MachinePrecision], N[(a - b), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;z \leq -1.12 \cdot 10^{+57} \lor \neg \left(z \leq 3.8 \cdot 10^{+85}\right):\\
                        \;\;\;\;z - b\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;a - b\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if z < -1.12000000000000003e57 or 3.79999999999999992e85 < z

                          1. Initial program 33.8%

                            \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                          2. Add Preprocessing
                          3. Taylor expanded in y around inf

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          4. Step-by-step derivation
                            1. lower--.f64N/A

                              \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                            2. lower-+.f6456.7

                              \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                          5. Applied rewrites56.7%

                            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                          6. Taylor expanded in b around inf

                            \[\leadsto -1 \cdot \color{blue}{b} \]
                          7. Step-by-step derivation
                            1. Applied rewrites10.6%

                              \[\leadsto -b \]
                            2. Taylor expanded in a around 0

                              \[\leadsto z - \color{blue}{b} \]
                            3. Step-by-step derivation
                              1. Applied rewrites57.7%

                                \[\leadsto z - \color{blue}{b} \]

                              if -1.12000000000000003e57 < z < 3.79999999999999992e85

                              1. Initial program 70.5%

                                \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                              2. Add Preprocessing
                              3. Taylor expanded in y around inf

                                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                              4. Step-by-step derivation
                                1. lower--.f64N/A

                                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                2. lower-+.f6453.5

                                  \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                              5. Applied rewrites53.5%

                                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                              6. Taylor expanded in z around 0

                                \[\leadsto a - \color{blue}{b} \]
                              7. Step-by-step derivation
                                1. Applied rewrites49.5%

                                  \[\leadsto a - \color{blue}{b} \]
                              8. Recombined 2 regimes into one program.
                              9. Final simplification52.5%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{+57} \lor \neg \left(z \leq 3.8 \cdot 10^{+85}\right):\\ \;\;\;\;z - b\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \]
                              10. Add Preprocessing

                              Alternative 12: 36.9% accurate, 11.3× speedup?

                              \[\begin{array}{l} \\ a - b \end{array} \]
                              (FPCore (x y z t a b) :precision binary64 (- a b))
                              double code(double x, double y, double z, double t, double a, double b) {
                              	return a - b;
                              }
                              
                              real(8) function code(x, y, z, t, a, b)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8), intent (in) :: z
                                  real(8), intent (in) :: t
                                  real(8), intent (in) :: a
                                  real(8), intent (in) :: b
                                  code = a - b
                              end function
                              
                              public static double code(double x, double y, double z, double t, double a, double b) {
                              	return a - b;
                              }
                              
                              def code(x, y, z, t, a, b):
                              	return a - b
                              
                              function code(x, y, z, t, a, b)
                              	return Float64(a - b)
                              end
                              
                              function tmp = code(x, y, z, t, a, b)
                              	tmp = a - b;
                              end
                              
                              code[x_, y_, z_, t_, a_, b_] := N[(a - b), $MachinePrecision]
                              
                              \begin{array}{l}
                              
                              \\
                              a - b
                              \end{array}
                              
                              Derivation
                              1. Initial program 56.9%

                                \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                              2. Add Preprocessing
                              3. Taylor expanded in y around inf

                                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                              4. Step-by-step derivation
                                1. lower--.f64N/A

                                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                2. lower-+.f6454.7

                                  \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                              5. Applied rewrites54.7%

                                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                              6. Taylor expanded in z around 0

                                \[\leadsto a - \color{blue}{b} \]
                              7. Step-by-step derivation
                                1. Applied rewrites39.5%

                                  \[\leadsto a - \color{blue}{b} \]
                                2. Final simplification39.5%

                                  \[\leadsto a - b \]
                                3. Add Preprocessing

                                Alternative 13: 13.4% accurate, 15.0× speedup?

                                \[\begin{array}{l} \\ -b \end{array} \]
                                (FPCore (x y z t a b) :precision binary64 (- b))
                                double code(double x, double y, double z, double t, double a, double b) {
                                	return -b;
                                }
                                
                                real(8) function code(x, y, z, t, a, b)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    real(8), intent (in) :: z
                                    real(8), intent (in) :: t
                                    real(8), intent (in) :: a
                                    real(8), intent (in) :: b
                                    code = -b
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a, double b) {
                                	return -b;
                                }
                                
                                def code(x, y, z, t, a, b):
                                	return -b
                                
                                function code(x, y, z, t, a, b)
                                	return Float64(-b)
                                end
                                
                                function tmp = code(x, y, z, t, a, b)
                                	tmp = -b;
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := (-b)
                                
                                \begin{array}{l}
                                
                                \\
                                -b
                                \end{array}
                                
                                Derivation
                                1. Initial program 56.9%

                                  \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
                                2. Add Preprocessing
                                3. Taylor expanded in y around inf

                                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                4. Step-by-step derivation
                                  1. lower--.f64N/A

                                    \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                  2. lower-+.f6454.7

                                    \[\leadsto \color{blue}{\left(a + z\right)} - b \]
                                5. Applied rewrites54.7%

                                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                6. Taylor expanded in b around inf

                                  \[\leadsto -1 \cdot \color{blue}{b} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites13.0%

                                    \[\leadsto -b \]
                                  2. Final simplification13.0%

                                    \[\leadsto -b \]
                                  3. Add Preprocessing

                                  Developer Target 1: 82.4% accurate, 0.3× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\ t_3 := \frac{t\_2}{t\_1}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\ \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b)
                                   :precision binary64
                                   (let* ((t_1 (+ (+ x t) y))
                                          (t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
                                          (t_3 (/ t_2 t_1))
                                          (t_4 (- (+ z a) b)))
                                     (if (< t_3 -3.5813117084150564e+153)
                                       t_4
                                       (if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
                                  double code(double x, double y, double z, double t, double a, double b) {
                                  	double t_1 = (x + t) + y;
                                  	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                                  	double t_3 = t_2 / t_1;
                                  	double t_4 = (z + a) - b;
                                  	double tmp;
                                  	if (t_3 < -3.5813117084150564e+153) {
                                  		tmp = t_4;
                                  	} else if (t_3 < 1.2285964308315609e+82) {
                                  		tmp = 1.0 / (t_1 / t_2);
                                  	} else {
                                  		tmp = t_4;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  real(8) function code(x, y, z, t, a, b)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      real(8), intent (in) :: z
                                      real(8), intent (in) :: t
                                      real(8), intent (in) :: a
                                      real(8), intent (in) :: b
                                      real(8) :: t_1
                                      real(8) :: t_2
                                      real(8) :: t_3
                                      real(8) :: t_4
                                      real(8) :: tmp
                                      t_1 = (x + t) + y
                                      t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
                                      t_3 = t_2 / t_1
                                      t_4 = (z + a) - b
                                      if (t_3 < (-3.5813117084150564d+153)) then
                                          tmp = t_4
                                      else if (t_3 < 1.2285964308315609d+82) then
                                          tmp = 1.0d0 / (t_1 / t_2)
                                      else
                                          tmp = t_4
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a, double b) {
                                  	double t_1 = (x + t) + y;
                                  	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                                  	double t_3 = t_2 / t_1;
                                  	double t_4 = (z + a) - b;
                                  	double tmp;
                                  	if (t_3 < -3.5813117084150564e+153) {
                                  		tmp = t_4;
                                  	} else if (t_3 < 1.2285964308315609e+82) {
                                  		tmp = 1.0 / (t_1 / t_2);
                                  	} else {
                                  		tmp = t_4;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a, b):
                                  	t_1 = (x + t) + y
                                  	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
                                  	t_3 = t_2 / t_1
                                  	t_4 = (z + a) - b
                                  	tmp = 0
                                  	if t_3 < -3.5813117084150564e+153:
                                  		tmp = t_4
                                  	elif t_3 < 1.2285964308315609e+82:
                                  		tmp = 1.0 / (t_1 / t_2)
                                  	else:
                                  		tmp = t_4
                                  	return tmp
                                  
                                  function code(x, y, z, t, a, b)
                                  	t_1 = Float64(Float64(x + t) + y)
                                  	t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b))
                                  	t_3 = Float64(t_2 / t_1)
                                  	t_4 = Float64(Float64(z + a) - b)
                                  	tmp = 0.0
                                  	if (t_3 < -3.5813117084150564e+153)
                                  		tmp = t_4;
                                  	elseif (t_3 < 1.2285964308315609e+82)
                                  		tmp = Float64(1.0 / Float64(t_1 / t_2));
                                  	else
                                  		tmp = t_4;
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a, b)
                                  	t_1 = (x + t) + y;
                                  	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
                                  	t_3 = t_2 / t_1;
                                  	t_4 = (z + a) - b;
                                  	tmp = 0.0;
                                  	if (t_3 < -3.5813117084150564e+153)
                                  		tmp = t_4;
                                  	elseif (t_3 < 1.2285964308315609e+82)
                                  		tmp = 1.0 / (t_1 / t_2);
                                  	else
                                  		tmp = t_4;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := \left(x + t\right) + y\\
                                  t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
                                  t_3 := \frac{t\_2}{t\_1}\\
                                  t_4 := \left(z + a\right) - b\\
                                  \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\
                                  \;\;\;\;t\_4\\
                                  
                                  \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
                                  \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_4\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  

                                  Reproduce

                                  ?
                                  herbie shell --seed 2024298 
                                  (FPCore (x y z t a b)
                                    :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
                                    :precision binary64
                                  
                                    :alt
                                    (! :herbie-platform default (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3581311708415056400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 12285964308315609000000000000000000000000000000000000000000000000000000000000000000) (/ 1 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b))))
                                  
                                    (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))