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

Percentage Accurate: 60.8% → 89.3%
Time: 9.6s
Alternatives: 13
Speedup: 1.4×

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: 60.8% 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: 89.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(y + x\right)\\ t_2 := \frac{\left(\left(t + y\right) \cdot a + z \cdot \left(y + x\right)\right) - b \cdot y}{\left(t + x\right) + y}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{elif}\;t\_2 \leq 10^{+307}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{\mathsf{fma}\left(y + x, \frac{z}{t\_1}, \frac{a}{t\_1} \cdot \left(t + y\right)\right)}{b} - \frac{y}{t\_1}\right) \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ y x)))
        (t_2 (/ (- (+ (* (+ t y) a) (* z (+ y x))) (* b y)) (+ (+ t x) y))))
   (if (<= t_2 (- INFINITY))
     (fma y (/ (- z b) (+ t y)) a)
     (if (<= t_2 1e+307)
       t_2
       (*
        (- (/ (fma (+ y x) (/ z t_1) (* (/ a t_1) (+ t y))) b) (/ y t_1))
        b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (y + x);
	double t_2 = ((((t + y) * a) + (z * (y + x))) - (b * y)) / ((t + x) + y);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = fma(y, ((z - b) / (t + y)), a);
	} else if (t_2 <= 1e+307) {
		tmp = t_2;
	} else {
		tmp = ((fma((y + x), (z / t_1), ((a / t_1) * (t + y))) / b) - (y / t_1)) * b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(y + x))
	t_2 = Float64(Float64(Float64(Float64(Float64(t + y) * a) + Float64(z * Float64(y + x))) - Float64(b * y)) / Float64(Float64(t + x) + y))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = fma(y, Float64(Float64(z - b) / Float64(t + y)), a);
	elseif (t_2 <= 1e+307)
		tmp = t_2;
	else
		tmp = Float64(Float64(Float64(fma(Float64(y + x), Float64(z / t_1), Float64(Float64(a / t_1) * Float64(t + y))) / b) - Float64(y / t_1)) * b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision] + N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], t$95$2, N[(N[(N[(N[(N[(y + x), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision] + N[(N[(a / t$95$1), $MachinePrecision] * N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision] - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
t_2 := \frac{\left(\left(t + y\right) \cdot a + z \cdot \left(y + x\right)\right) - b \cdot y}{\left(t + x\right) + y}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\

\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;t\_2\\

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


\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

    1. Initial program 6.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 x around 0

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot a + \left(y \cdot a + \left(y \cdot z - \color{blue}{y \cdot b}\right)\right)}{t + y} \]
      8. distribute-lft-out--N/A

        \[\leadsto \frac{t \cdot a + \left(y \cdot a + \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
      9. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      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.99999999999999986e306

      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

      if 9.99999999999999986e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

      1. Initial program 4.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 b around -inf

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

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

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

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

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

          \[\leadsto \left(-b\right) \cdot \color{blue}{\left(\frac{y}{t + \left(x + y\right)} + -1 \cdot \frac{\frac{a \cdot \left(t + y\right)}{t + \left(x + y\right)} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)}}{b}\right)} \]
        6. mul-1-negN/A

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

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

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

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

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

    Alternative 2: 89.0% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(\left(t + y\right) \cdot a + z \cdot \left(y + x\right)\right) - b \cdot y}{\left(t + x\right) + y}\\ t_2 := \mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+278}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (/ (- (+ (* (+ t y) a) (* z (+ y x))) (* b y)) (+ (+ t x) y)))
            (t_2 (fma y (/ (- z b) (+ t y)) a)))
       (if (<= t_1 (- INFINITY)) t_2 (if (<= t_1 1e+278) t_1 t_2))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = ((((t + y) * a) + (z * (y + x))) - (b * y)) / ((t + x) + y);
    	double t_2 = fma(y, ((z - b) / (t + y)), a);
    	double tmp;
    	if (t_1 <= -((double) INFINITY)) {
    		tmp = t_2;
    	} else if (t_1 <= 1e+278) {
    		tmp = t_1;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(Float64(Float64(Float64(t + y) * a) + Float64(z * Float64(y + x))) - Float64(b * y)) / Float64(Float64(t + x) + y))
    	t_2 = fma(y, Float64(Float64(z - b) / Float64(t + y)), a)
    	tmp = 0.0
    	if (t_1 <= Float64(-Inf))
    		tmp = t_2;
    	elseif (t_1 <= 1e+278)
    		tmp = t_1;
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision] + N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 1e+278], t$95$1, t$95$2]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{\left(\left(t + y\right) \cdot a + z \cdot \left(y + x\right)\right) - b \cdot y}{\left(t + x\right) + y}\\
    t_2 := \mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\
    \mathbf{if}\;t\_1 \leq -\infty:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+278}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \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 9.99999999999999964e277 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

      1. Initial program 7.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 x around 0

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

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

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

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

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

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

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

          \[\leadsto \frac{t \cdot a + \left(y \cdot a + \left(y \cdot z - \color{blue}{y \cdot b}\right)\right)}{t + y} \]
        8. distribute-lft-out--N/A

          \[\leadsto \frac{t \cdot a + \left(y \cdot a + \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
        9. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        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.99999999999999964e277

        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
      8. Recombined 2 regimes into one program.
      9. Final simplification90.1%

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

      Alternative 3: 76.4% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t + x\right) + y\\ t_2 := \left(t + y\right) \cdot a\\ t_3 := \frac{\left(t\_2 + z \cdot \left(y + x\right)\right) - b \cdot y}{t\_1}\\ \mathbf{if}\;t\_3 \leq -1 \cdot 10^{+259}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;t\_3 \leq 10^{+230}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_2\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (+ (+ t x) y))
              (t_2 (* (+ t y) a))
              (t_3 (/ (- (+ t_2 (* z (+ y x))) (* b y)) t_1)))
         (if (<= t_3 -1e+259)
           (- (+ a z) b)
           (if (<= t_3 1e+230)
             (/ (fma (+ y x) z t_2) t_1)
             (fma y (/ (- z b) (+ t y)) a)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (t + x) + y;
      	double t_2 = (t + y) * a;
      	double t_3 = ((t_2 + (z * (y + x))) - (b * y)) / t_1;
      	double tmp;
      	if (t_3 <= -1e+259) {
      		tmp = (a + z) - b;
      	} else if (t_3 <= 1e+230) {
      		tmp = fma((y + x), z, t_2) / t_1;
      	} else {
      		tmp = fma(y, ((z - b) / (t + y)), a);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(t + x) + y)
      	t_2 = Float64(Float64(t + y) * a)
      	t_3 = Float64(Float64(Float64(t_2 + Float64(z * Float64(y + x))) - Float64(b * y)) / t_1)
      	tmp = 0.0
      	if (t_3 <= -1e+259)
      		tmp = Float64(Float64(a + z) - b);
      	elseif (t_3 <= 1e+230)
      		tmp = Float64(fma(Float64(y + x), z, t_2) / t_1);
      	else
      		tmp = fma(y, Float64(Float64(z - b) / Float64(t + y)), a);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+259], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t$95$3, 1e+230], N[(N[(N[(y + x), $MachinePrecision] * z + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(t + x\right) + y\\
      t_2 := \left(t + y\right) \cdot a\\
      t_3 := \frac{\left(t\_2 + z \cdot \left(y + x\right)\right) - b \cdot y}{t\_1}\\
      \mathbf{if}\;t\_3 \leq -1 \cdot 10^{+259}:\\
      \;\;\;\;\left(a + z\right) - b\\
      
      \mathbf{elif}\;t\_3 \leq 10^{+230}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_2\right)}{t\_1}\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\
      
      
      \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)) < -9.999999999999999e258

        1. Initial program 12.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. +-commutativeN/A

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

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

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

        if -9.999999999999999e258 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.0000000000000001e230

        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 b around 0

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

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

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

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

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

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

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

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

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

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

        if 1.0000000000000001e230 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

        1. Initial program 13.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 x around 0

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

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

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

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

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

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

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

            \[\leadsto \frac{t \cdot a + \left(y \cdot a + \left(y \cdot z - \color{blue}{y \cdot b}\right)\right)}{t + y} \]
          8. distribute-lft-out--N/A

            \[\leadsto \frac{t \cdot a + \left(y \cdot a + \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
          9. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 73.7% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{if}\;y \leq -7.4 \cdot 10^{-93}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-98}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, z, a \cdot t\right) - b \cdot y}{\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 (fma y (/ (- z b) (+ t y)) a)))
           (if (<= y -7.4e-93)
             t_1
             (if (<= y 2e-98) (/ (- (fma x z (* a t)) (* b y)) (+ (+ t x) y)) t_1))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = fma(y, ((z - b) / (t + y)), a);
        	double tmp;
        	if (y <= -7.4e-93) {
        		tmp = t_1;
        	} else if (y <= 2e-98) {
        		tmp = (fma(x, z, (a * t)) - (b * y)) / ((t + x) + y);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = fma(y, Float64(Float64(z - b) / Float64(t + y)), a)
        	tmp = 0.0
        	if (y <= -7.4e-93)
        		tmp = t_1;
        	elseif (y <= 2e-98)
        		tmp = Float64(Float64(fma(x, z, Float64(a * t)) - Float64(b * y)) / Float64(Float64(t + x) + y));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[y, -7.4e-93], t$95$1, If[LessEqual[y, 2e-98], N[(N[(N[(x * z + N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\
        \mathbf{if}\;y \leq -7.4 \cdot 10^{-93}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 2 \cdot 10^{-98}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(x, z, a \cdot t\right) - b \cdot y}{\left(t + x\right) + y}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -7.40000000000000005e-93 or 1.99999999999999988e-98 < y

          1. Initial program 50.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 x around 0

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

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

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

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

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

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

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

              \[\leadsto \frac{t \cdot a + \left(y \cdot a + \left(y \cdot z - \color{blue}{y \cdot b}\right)\right)}{t + y} \]
            8. distribute-lft-out--N/A

              \[\leadsto \frac{t \cdot a + \left(y \cdot a + \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
            9. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -7.40000000000000005e-93 < y < 1.99999999999999988e-98

            1. Initial program 81.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 \frac{\color{blue}{\left(a \cdot t + x \cdot z\right)} - y \cdot b}{\left(x + t\right) + y} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

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

          Alternative 5: 69.9% accurate, 1.0× speedup?

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

            1. Initial program 49.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 x around 0

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

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

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

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

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

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

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

                \[\leadsto \frac{t \cdot a + \left(y \cdot a + \left(y \cdot z - \color{blue}{y \cdot b}\right)\right)}{t + y} \]
              8. distribute-lft-out--N/A

                \[\leadsto \frac{t \cdot a + \left(y \cdot a + \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
              9. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -3.70000000000000005e-19 < y < -1.8e-167

              1. Initial program 62.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. +-commutativeN/A

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

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

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

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

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

                if -1.8e-167 < y < 4.20000000000000031e-101

                1. Initial program 84.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 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. +-commutativeN/A

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

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

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

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

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{-19}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-167}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-101}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, z, a \cdot t\right)}{t + x}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \end{array} \]
              10. Add Preprocessing

              Alternative 6: 56.8% accurate, 1.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -3.7 \cdot 10^{+134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.22 \cdot 10^{-172}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-22}:\\ \;\;\;\;\frac{t}{t + x} \cdot 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 -3.7e+134)
                   t_1
                   (if (<= y -1.22e-172)
                     (+ a z)
                     (if (<= y 4.5e-22) (* (/ t (+ t x)) 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 <= -3.7e+134) {
              		tmp = t_1;
              	} else if (y <= -1.22e-172) {
              		tmp = a + z;
              	} else if (y <= 4.5e-22) {
              		tmp = (t / (t + x)) * a;
              	} else {
              		tmp = t_1;
              	}
              	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) :: tmp
                  t_1 = (a + z) - b
                  if (y <= (-3.7d+134)) then
                      tmp = t_1
                  else if (y <= (-1.22d-172)) then
                      tmp = a + z
                  else if (y <= 4.5d-22) then
                      tmp = (t / (t + x)) * a
                  else
                      tmp = t_1
                  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 = (a + z) - b;
              	double tmp;
              	if (y <= -3.7e+134) {
              		tmp = t_1;
              	} else if (y <= -1.22e-172) {
              		tmp = a + z;
              	} else if (y <= 4.5e-22) {
              		tmp = (t / (t + x)) * a;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	t_1 = (a + z) - b
              	tmp = 0
              	if y <= -3.7e+134:
              		tmp = t_1
              	elif y <= -1.22e-172:
              		tmp = a + z
              	elif y <= 4.5e-22:
              		tmp = (t / (t + x)) * 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 <= -3.7e+134)
              		tmp = t_1;
              	elseif (y <= -1.22e-172)
              		tmp = Float64(a + z);
              	elseif (y <= 4.5e-22)
              		tmp = Float64(Float64(t / Float64(t + x)) * a);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	t_1 = (a + z) - b;
              	tmp = 0.0;
              	if (y <= -3.7e+134)
              		tmp = t_1;
              	elseif (y <= -1.22e-172)
              		tmp = a + z;
              	elseif (y <= 4.5e-22)
              		tmp = (t / (t + x)) * a;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -3.7e+134], t$95$1, If[LessEqual[y, -1.22e-172], N[(a + z), $MachinePrecision], If[LessEqual[y, 4.5e-22], N[(N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left(a + z\right) - b\\
              \mathbf{if}\;y \leq -3.7 \cdot 10^{+134}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;y \leq -1.22 \cdot 10^{-172}:\\
              \;\;\;\;a + z\\
              
              \mathbf{elif}\;y \leq 4.5 \cdot 10^{-22}:\\
              \;\;\;\;\frac{t}{t + x} \cdot a\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if y < -3.70000000000000013e134 or 4.49999999999999987e-22 < y

                1. Initial program 45.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 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. +-commutativeN/A

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

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

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

                if -3.70000000000000013e134 < y < -1.22e-172

                1. Initial program 60.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. +-commutativeN/A

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

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

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

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

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

                  if -1.22e-172 < y < 4.49999999999999987e-22

                  1. Initial program 82.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 a around inf

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

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

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

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

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

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

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

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

                      \[\leadsto \left(y + t\right) \cdot \frac{a}{\color{blue}{\left(x + y\right) + t}} \]
                    9. lower-+.f6439.7

                      \[\leadsto \left(y + t\right) \cdot \frac{a}{\color{blue}{\left(x + y\right)} + t} \]
                  5. Applied rewrites39.7%

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{+134}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq -1.22 \cdot 10^{-172}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-22}:\\ \;\;\;\;\frac{t}{t + x} \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 7: 68.9% accurate, 1.2× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+131}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;x \leq 2.65 \cdot 10^{+135}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{z}}\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (if (<= x -1.1e+131)
                     (+ a z)
                     (if (<= x 2.65e+135) (fma y (/ (- z b) (+ t y)) a) (/ 1.0 (/ 1.0 z)))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if (x <= -1.1e+131) {
                  		tmp = a + z;
                  	} else if (x <= 2.65e+135) {
                  		tmp = fma(y, ((z - b) / (t + y)), a);
                  	} else {
                  		tmp = 1.0 / (1.0 / z);
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b)
                  	tmp = 0.0
                  	if (x <= -1.1e+131)
                  		tmp = Float64(a + z);
                  	elseif (x <= 2.65e+135)
                  		tmp = fma(y, Float64(Float64(z - b) / Float64(t + y)), a);
                  	else
                  		tmp = Float64(1.0 / Float64(1.0 / z));
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.1e+131], N[(a + z), $MachinePrecision], If[LessEqual[x, 2.65e+135], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(1.0 / N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq -1.1 \cdot 10^{+131}:\\
                  \;\;\;\;a + z\\
                  
                  \mathbf{elif}\;x \leq 2.65 \cdot 10^{+135}:\\
                  \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{1}{\frac{1}{z}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if x < -1.0999999999999999e131

                    1. Initial program 45.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 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. +-commutativeN/A

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

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

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

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

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

                      if -1.0999999999999999e131 < x < 2.65000000000000008e135

                      1. Initial program 66.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 x around 0

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

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

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

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

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

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

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

                          \[\leadsto \frac{t \cdot a + \left(y \cdot a + \left(y \cdot z - \color{blue}{y \cdot b}\right)\right)}{t + y} \]
                        8. distribute-lft-out--N/A

                          \[\leadsto \frac{t \cdot a + \left(y \cdot a + \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
                        9. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 2.65000000000000008e135 < x

                        1. Initial program 39.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. 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. clear-numN/A

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

                            \[\leadsto \color{blue}{\frac{1}{\frac{\left(x + t\right) + y}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}} \]
                          4. lower-/.f6439.8

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

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

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

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

                            \[\leadsto \frac{1}{\frac{\left(t + x\right) + y}{\color{blue}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}} \]
                          9. sub-negN/A

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

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

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

                            \[\leadsto \frac{1}{\frac{\left(t + x\right) + y}{\left(\mathsf{neg}\left(\color{blue}{b \cdot y}\right)\right) + \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right)}} \]
                          13. distribute-lft-neg-inN/A

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

                            \[\leadsto \frac{1}{\frac{\left(t + x\right) + y}{\color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(b\right), y, \left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right)}}} \]
                          15. lower-neg.f6440.0

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

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

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

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

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

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

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

                          \[\leadsto \frac{1}{\color{blue}{\frac{1}{z}}} \]
                        6. Step-by-step derivation
                          1. lower-/.f6450.8

                            \[\leadsto \frac{1}{\color{blue}{\frac{1}{z}}} \]
                        7. Applied rewrites50.8%

                          \[\leadsto \frac{1}{\color{blue}{\frac{1}{z}}} \]
                      8. Recombined 3 regimes into one program.
                      9. Final simplification75.3%

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

                      Alternative 8: 61.6% accurate, 1.4× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.9 \cdot 10^{+97}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - b}{t}, y, a\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+147}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{t + y}, a\right)\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b)
                       :precision binary64
                       (if (<= t -3.9e+97)
                         (fma (/ (- z b) t) y a)
                         (if (<= t 4.6e+147) (- (+ a z) b) (fma y (/ z (+ t y)) a))))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if (t <= -3.9e+97) {
                      		tmp = fma(((z - b) / t), y, a);
                      	} else if (t <= 4.6e+147) {
                      		tmp = (a + z) - b;
                      	} else {
                      		tmp = fma(y, (z / (t + y)), a);
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b)
                      	tmp = 0.0
                      	if (t <= -3.9e+97)
                      		tmp = fma(Float64(Float64(z - b) / t), y, a);
                      	elseif (t <= 4.6e+147)
                      		tmp = Float64(Float64(a + z) - b);
                      	else
                      		tmp = fma(y, Float64(z / Float64(t + y)), a);
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.9e+97], N[(N[(N[(z - b), $MachinePrecision] / t), $MachinePrecision] * y + a), $MachinePrecision], If[LessEqual[t, 4.6e+147], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(y * N[(z / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;t \leq -3.9 \cdot 10^{+97}:\\
                      \;\;\;\;\mathsf{fma}\left(\frac{z - b}{t}, y, a\right)\\
                      
                      \mathbf{elif}\;t \leq 4.6 \cdot 10^{+147}:\\
                      \;\;\;\;\left(a + z\right) - b\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(y, \frac{z}{t + y}, a\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if t < -3.8999999999999999e97

                        1. Initial program 67.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 x around 0

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

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

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

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

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

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

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

                            \[\leadsto \frac{t \cdot a + \left(y \cdot a + \left(y \cdot z - \color{blue}{y \cdot b}\right)\right)}{t + y} \]
                          8. distribute-lft-out--N/A

                            \[\leadsto \frac{t \cdot a + \left(y \cdot a + \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
                          9. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -3.8999999999999999e97 < t < 4.5999999999999998e147

                            1. Initial program 59.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. +-commutativeN/A

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

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

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

                            if 4.5999999999999998e147 < t

                            1. Initial program 54.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 x around 0

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

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

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

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

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

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

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

                                \[\leadsto \frac{t \cdot a + \left(y \cdot a + \left(y \cdot z - \color{blue}{y \cdot b}\right)\right)}{t + y} \]
                              8. distribute-lft-out--N/A

                                \[\leadsto \frac{t \cdot a + \left(y \cdot a + \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
                              9. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(y, \frac{z}{t + \color{blue}{y}}, a\right) \]
                              3. Step-by-step derivation
                                1. Applied rewrites83.7%

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.9 \cdot 10^{+97}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - b}{t}, y, a\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+147}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{t + y}, a\right)\\ \end{array} \]
                              6. Add Preprocessing

                              Alternative 9: 61.5% accurate, 1.4× speedup?

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

                                1. Initial program 62.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 x around 0

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

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

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

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

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

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

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

                                    \[\leadsto \frac{t \cdot a + \left(y \cdot a + \left(y \cdot z - \color{blue}{y \cdot b}\right)\right)}{t + y} \]
                                  8. distribute-lft-out--N/A

                                    \[\leadsto \frac{t \cdot a + \left(y \cdot a + \color{blue}{y \cdot \left(z - b\right)}\right)}{t + y} \]
                                  9. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(y, \frac{z}{t + \color{blue}{y}}, a\right) \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites72.0%

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

                                    if -2.30000000000000004e80 < t < 4.5999999999999998e147

                                    1. Initial program 59.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 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. +-commutativeN/A

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

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

                                      \[\leadsto \color{blue}{\left(z + a\right) - b} \]
                                  4. Recombined 2 regimes into one program.
                                  5. Final simplification67.7%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{+80}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{t + y}, a\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+147}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{t + y}, a\right)\\ \end{array} \]
                                  6. Add Preprocessing

                                  Alternative 10: 59.1% accurate, 2.4× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a + z\right) - b\\ \mathbf{if}\;y \leq -3.7 \cdot 10^{+134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-18}:\\ \;\;\;\;a + z\\ \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 -3.7e+134) t_1 (if (<= y 1.35e-18) (+ a z) 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 <= -3.7e+134) {
                                  		tmp = t_1;
                                  	} else if (y <= 1.35e-18) {
                                  		tmp = a + z;
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	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) :: tmp
                                      t_1 = (a + z) - b
                                      if (y <= (-3.7d+134)) then
                                          tmp = t_1
                                      else if (y <= 1.35d-18) then
                                          tmp = a + z
                                      else
                                          tmp = t_1
                                      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 = (a + z) - b;
                                  	double tmp;
                                  	if (y <= -3.7e+134) {
                                  		tmp = t_1;
                                  	} else if (y <= 1.35e-18) {
                                  		tmp = a + z;
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a, b):
                                  	t_1 = (a + z) - b
                                  	tmp = 0
                                  	if y <= -3.7e+134:
                                  		tmp = t_1
                                  	elif y <= 1.35e-18:
                                  		tmp = a + z
                                  	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 <= -3.7e+134)
                                  		tmp = t_1;
                                  	elseif (y <= 1.35e-18)
                                  		tmp = Float64(a + z);
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a, b)
                                  	t_1 = (a + z) - b;
                                  	tmp = 0.0;
                                  	if (y <= -3.7e+134)
                                  		tmp = t_1;
                                  	elseif (y <= 1.35e-18)
                                  		tmp = a + z;
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -3.7e+134], t$95$1, If[LessEqual[y, 1.35e-18], N[(a + z), $MachinePrecision], t$95$1]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := \left(a + z\right) - b\\
                                  \mathbf{if}\;y \leq -3.7 \cdot 10^{+134}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;y \leq 1.35 \cdot 10^{-18}:\\
                                  \;\;\;\;a + z\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if y < -3.70000000000000013e134 or 1.34999999999999994e-18 < y

                                    1. Initial program 44.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. +-commutativeN/A

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

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

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

                                    if -3.70000000000000013e134 < y < 1.34999999999999994e-18

                                    1. Initial program 72.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. +-commutativeN/A

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

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

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

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{+134}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-18}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 11: 53.1% accurate, 2.8× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.3 \cdot 10^{+195}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+148}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b)
                                     :precision binary64
                                     (if (<= b -2.3e+195) (- a b) (if (<= b 2.3e+148) (+ a z) (- a b))))
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	double tmp;
                                    	if (b <= -2.3e+195) {
                                    		tmp = a - b;
                                    	} else if (b <= 2.3e+148) {
                                    		tmp = a + z;
                                    	} 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 (b <= (-2.3d+195)) then
                                            tmp = a - b
                                        else if (b <= 2.3d+148) then
                                            tmp = a + z
                                        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 (b <= -2.3e+195) {
                                    		tmp = a - b;
                                    	} else if (b <= 2.3e+148) {
                                    		tmp = a + z;
                                    	} else {
                                    		tmp = a - b;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t, a, b):
                                    	tmp = 0
                                    	if b <= -2.3e+195:
                                    		tmp = a - b
                                    	elif b <= 2.3e+148:
                                    		tmp = a + z
                                    	else:
                                    		tmp = a - b
                                    	return tmp
                                    
                                    function code(x, y, z, t, a, b)
                                    	tmp = 0.0
                                    	if (b <= -2.3e+195)
                                    		tmp = Float64(a - b);
                                    	elseif (b <= 2.3e+148)
                                    		tmp = Float64(a + z);
                                    	else
                                    		tmp = Float64(a - b);
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t, a, b)
                                    	tmp = 0.0;
                                    	if (b <= -2.3e+195)
                                    		tmp = a - b;
                                    	elseif (b <= 2.3e+148)
                                    		tmp = a + z;
                                    	else
                                    		tmp = a - b;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.3e+195], N[(a - b), $MachinePrecision], If[LessEqual[b, 2.3e+148], N[(a + z), $MachinePrecision], N[(a - b), $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;b \leq -2.3 \cdot 10^{+195}:\\
                                    \;\;\;\;a - b\\
                                    
                                    \mathbf{elif}\;b \leq 2.3 \cdot 10^{+148}:\\
                                    \;\;\;\;a + z\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;a - b\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if b < -2.3000000000000001e195 or 2.3000000000000001e148 < b

                                      1. Initial program 32.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 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. +-commutativeN/A

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

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

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

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

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

                                        if -2.3000000000000001e195 < b < 2.3000000000000001e148

                                        1. Initial program 67.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 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. +-commutativeN/A

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

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

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

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

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

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.3 \cdot 10^{+195}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+148}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;a - b\\ \end{array} \]
                                        10. Add Preprocessing

                                        Alternative 12: 51.9% accurate, 2.8× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{+196}:\\ \;\;\;\;-b\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{+160}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;-b\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a b)
                                         :precision binary64
                                         (if (<= b -1.15e+196) (- b) (if (<= b 1.6e+160) (+ a z) (- b))))
                                        double code(double x, double y, double z, double t, double a, double b) {
                                        	double tmp;
                                        	if (b <= -1.15e+196) {
                                        		tmp = -b;
                                        	} else if (b <= 1.6e+160) {
                                        		tmp = a + z;
                                        	} else {
                                        		tmp = -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 (b <= (-1.15d+196)) then
                                                tmp = -b
                                            else if (b <= 1.6d+160) then
                                                tmp = a + z
                                            else
                                                tmp = -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 (b <= -1.15e+196) {
                                        		tmp = -b;
                                        	} else if (b <= 1.6e+160) {
                                        		tmp = a + z;
                                        	} else {
                                        		tmp = -b;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t, a, b):
                                        	tmp = 0
                                        	if b <= -1.15e+196:
                                        		tmp = -b
                                        	elif b <= 1.6e+160:
                                        		tmp = a + z
                                        	else:
                                        		tmp = -b
                                        	return tmp
                                        
                                        function code(x, y, z, t, a, b)
                                        	tmp = 0.0
                                        	if (b <= -1.15e+196)
                                        		tmp = Float64(-b);
                                        	elseif (b <= 1.6e+160)
                                        		tmp = Float64(a + z);
                                        	else
                                        		tmp = Float64(-b);
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x, y, z, t, a, b)
                                        	tmp = 0.0;
                                        	if (b <= -1.15e+196)
                                        		tmp = -b;
                                        	elseif (b <= 1.6e+160)
                                        		tmp = a + z;
                                        	else
                                        		tmp = -b;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.15e+196], (-b), If[LessEqual[b, 1.6e+160], N[(a + z), $MachinePrecision], (-b)]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;b \leq -1.15 \cdot 10^{+196}:\\
                                        \;\;\;\;-b\\
                                        
                                        \mathbf{elif}\;b \leq 1.6 \cdot 10^{+160}:\\
                                        \;\;\;\;a + z\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;-b\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if b < -1.1499999999999999e196 or 1.5999999999999999e160 < b

                                          1. Initial program 32.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 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. +-commutativeN/A

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

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

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

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

                                              \[\leadsto -b \]

                                            if -1.1499999999999999e196 < b < 1.5999999999999999e160

                                            1. Initial program 66.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. +-commutativeN/A

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

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

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

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

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

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{+196}:\\ \;\;\;\;-b\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{+160}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;-b\\ \end{array} \]
                                            10. Add Preprocessing

                                            Alternative 13: 13.2% 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 60.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. +-commutativeN/A

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

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

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

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

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

                                              Developer Target 1: 82.3% 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 2024277 
                                              (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)))