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

Percentage Accurate: 61.0% → 88.9%
Time: 11.2s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 61.0% 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: 88.9% 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}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+251}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \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))))
   (if (<= t_1 (- INFINITY))
     (fma y (/ (- z b) (+ t y)) a)
     (if (<= t_1 2e+251) t_1 (- (+ a z) b)))))
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 tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = fma(y, ((z - b) / (t + y)), a);
	} else if (t_1 <= 2e+251) {
		tmp = t_1;
	} else {
		tmp = (a + z) - b;
	}
	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))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = fma(y, Float64(Float64(z - b) / Float64(t + y)), a);
	elseif (t_1 <= 2e+251)
		tmp = t_1;
	else
		tmp = Float64(Float64(a + z) - b);
	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]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t$95$1, 2e+251], t$95$1, N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision]]]]
\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}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+251}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - 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 5.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-+.f647.1

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

      \[\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 rewrites79.9%

        \[\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)) < 2.0000000000000001e251

      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 2.0000000000000001e251 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

      1. Initial program 9.1%

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

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

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
        2. +-commutativeN/A

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

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

        \[\leadsto \color{blue}{\left(z + a\right) - b} \]
    8. Recombined 3 regimes into one program.
    9. Final simplification90.8%

      \[\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 2 \cdot 10^{+251}:\\ \;\;\;\;\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(a + z\right) - b\\ \end{array} \]
    10. Add Preprocessing

    Alternative 2: 70.0% accurate, 0.2× 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^{+109}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-225}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, z, a \cdot t\right) - b \cdot y}{t\_1}\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+26}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_2\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \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+109)
         (fma y (/ (- z b) (+ t y)) a)
         (if (<= t_3 5e-225)
           (/ (- (fma x z (* a t)) (* b y)) t_1)
           (if (<= t_3 5e+26) (/ (fma (+ y x) z t_2) t_1) (- (+ a z) b))))))
    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+109) {
    		tmp = fma(y, ((z - b) / (t + y)), a);
    	} else if (t_3 <= 5e-225) {
    		tmp = (fma(x, z, (a * t)) - (b * y)) / t_1;
    	} else if (t_3 <= 5e+26) {
    		tmp = fma((y + x), z, t_2) / t_1;
    	} else {
    		tmp = (a + z) - b;
    	}
    	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+109)
    		tmp = fma(y, Float64(Float64(z - b) / Float64(t + y)), a);
    	elseif (t_3 <= 5e-225)
    		tmp = Float64(Float64(fma(x, z, Float64(a * t)) - Float64(b * y)) / t_1);
    	elseif (t_3 <= 5e+26)
    		tmp = Float64(fma(Float64(y + x), z, t_2) / t_1);
    	else
    		tmp = Float64(Float64(a + z) - b);
    	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+109], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t$95$3, 5e-225], N[(N[(N[(x * z + N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 5e+26], N[(N[(N[(y + x), $MachinePrecision] * z + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $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^{+109}:\\
    \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\
    
    \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-225}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(x, z, a \cdot t\right) - b \cdot y}{t\_1}\\
    
    \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+26}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_2\right)}{t\_1}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(a + z\right) - b\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 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.99999999999999982e108

      1. Initial program 31.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-+.f6426.6

          \[\leadsto \frac{\mathsf{fma}\left(t, a, \left(\left(z + a\right) - b\right) \cdot y\right)}{\color{blue}{y + t}} \]
      5. Applied rewrites26.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 rewrites76.8%

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

        if -9.99999999999999982e108 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000001e-225

        1. Initial program 99.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 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-*.f6486.1

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

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

        if 5.0000000000000001e-225 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000001e26

        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-+.f6492.1

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

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

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

        1. Initial program 36.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-+.f6479.4

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

          \[\leadsto \color{blue}{\left(z + a\right) - b} \]
      8. Recombined 4 regimes into one program.
      9. Final simplification81.9%

        \[\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^{+109}:\\ \;\;\;\;\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 5 \cdot 10^{-225}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, z, a \cdot t\right) - b \cdot y}{\left(t + x\right) + y}\\ \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 5 \cdot 10^{+26}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
      10. Add Preprocessing

      Alternative 3: 71.8% 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 -2 \cdot 10^{+192}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+26}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_2\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \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 -2e+192)
           (fma y (/ (- z b) (+ t y)) a)
           (if (<= t_3 5e+26) (/ (fma (+ y x) z t_2) t_1) (- (+ a z) b)))))
      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 <= -2e+192) {
      		tmp = fma(y, ((z - b) / (t + y)), a);
      	} else if (t_3 <= 5e+26) {
      		tmp = fma((y + x), z, t_2) / t_1;
      	} else {
      		tmp = (a + z) - b;
      	}
      	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 <= -2e+192)
      		tmp = fma(y, Float64(Float64(z - b) / Float64(t + y)), a);
      	elseif (t_3 <= 5e+26)
      		tmp = Float64(fma(Float64(y + x), z, t_2) / t_1);
      	else
      		tmp = Float64(Float64(a + z) - b);
      	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, -2e+192], N[(y * N[(N[(z - b), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t$95$3, 5e+26], N[(N[(N[(y + x), $MachinePrecision] * z + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - b), $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 -2 \cdot 10^{+192}:\\
      \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{t + y}, a\right)\\
      
      \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+26}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_2\right)}{t\_1}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(a + z\right) - 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)) < -2.00000000000000008e192

        1. Initial program 16.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-+.f6415.7

            \[\leadsto \frac{\mathsf{fma}\left(t, a, \left(\left(z + a\right) - b\right) \cdot y\right)}{\color{blue}{y + t}} \]
        5. Applied rewrites15.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 rewrites78.8%

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

          if -2.00000000000000008e192 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000001e26

          1. Initial program 99.7%

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

            \[\leadsto \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-+.f6478.1

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

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

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

          1. Initial program 36.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-+.f6479.4

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

            \[\leadsto \color{blue}{\left(z + a\right) - b} \]
        8. Recombined 3 regimes into one program.
        9. Final simplification78.8%

          \[\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 -2 \cdot 10^{+192}:\\ \;\;\;\;\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 5 \cdot 10^{+26}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y + x, z, \left(t + y\right) \cdot a\right)}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
        10. Add Preprocessing

        Alternative 4: 67.7% accurate, 0.9× speedup?

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

          1. Initial program 44.2%

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

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

              \[\leadsto \color{blue}{\left(a + z\right) - b} \]
            2. +-commutativeN/A

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

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

            \[\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 rewrites64.6%

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

            if -4.1999999999999997e141 < x < 2.89999999999999984e62

            1. Initial program 60.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 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-+.f6449.2

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

              \[\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.4%

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

              if 2.89999999999999984e62 < x < 1e238

              1. Initial program 46.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-+.f6455.8

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

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

              if 1e238 < x

              1. Initial program 67.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 inf

                \[\leadsto \frac{\color{blue}{x \cdot z} - y \cdot b}{\left(x + t\right) + y} \]
              4. Step-by-step derivation
                1. lower-*.f6466.8

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

                \[\leadsto \frac{\color{blue}{x \cdot z} - y \cdot b}{\left(x + t\right) + y} \]
            8. Recombined 4 regimes into one program.
            9. Final simplification76.8%

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

            Alternative 5: 68.6% accurate, 1.2× speedup?

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

              1. Initial program 44.2%

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

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

                  \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                2. +-commutativeN/A

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

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

                \[\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 rewrites64.6%

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

                if -4.1999999999999997e141 < x < 2.89999999999999984e62

                1. Initial program 60.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 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-+.f6449.2

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

                  \[\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.4%

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

                  if 2.89999999999999984e62 < x < 1.44999999999999999e242

                  1. Initial program 50.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-+.f6452.6

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

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

                  if 1.44999999999999999e242 < x

                  1. Initial program 61.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 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(\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) \]
                    5. +-commutativeN/A

                      \[\leadsto \left(\mathsf{neg}\left(b\right)\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(\mathsf{neg}\left(b\right)\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(\mathsf{neg}\left(b\right)\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(\mathsf{neg}\left(b\right)\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 rewrites52.5%

                    \[\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)} \]
                  6. Taylor expanded in t around 0

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

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

                      \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(-1 \cdot \color{blue}{\frac{z}{b}}\right) \]
                    3. Step-by-step derivation
                      1. Applied rewrites78.9%

                        \[\leadsto \left(-b\right) \cdot \frac{-z}{\color{blue}{b}} \]
                    4. Recombined 4 regimes into one program.
                    5. Final simplification76.8%

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

                    Alternative 6: 63.1% accurate, 1.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{z - b}{t}, y, a\right)\\ \mathbf{if}\;t \leq -3.5 \cdot 10^{+176}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+142}:\\ \;\;\;\;\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 (/ (- z b) t) y a)))
                       (if (<= t -3.5e+176) t_1 (if (<= t 9.2e+142) (- (+ a z) b) t_1))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = fma(((z - b) / t), y, a);
                    	double tmp;
                    	if (t <= -3.5e+176) {
                    		tmp = t_1;
                    	} else if (t <= 9.2e+142) {
                    		tmp = (a + z) - b;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b)
                    	t_1 = fma(Float64(Float64(z - b) / t), y, a)
                    	tmp = 0.0
                    	if (t <= -3.5e+176)
                    		tmp = t_1;
                    	elseif (t <= 9.2e+142)
                    		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[(N[(N[(z - b), $MachinePrecision] / t), $MachinePrecision] * y + a), $MachinePrecision]}, If[LessEqual[t, -3.5e+176], t$95$1, If[LessEqual[t, 9.2e+142], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \mathsf{fma}\left(\frac{z - b}{t}, y, a\right)\\
                    \mathbf{if}\;t \leq -3.5 \cdot 10^{+176}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t \leq 9.2 \cdot 10^{+142}:\\
                    \;\;\;\;\left(a + z\right) - b\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if t < -3.50000000000000003e176 or 9.20000000000000009e142 < t

                      1. Initial program 44.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 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-+.f6435.5

                          \[\leadsto \frac{\mathsf{fma}\left(t, a, \left(\left(z + a\right) - b\right) \cdot y\right)}{\color{blue}{y + t}} \]
                      5. Applied rewrites35.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 rewrites78.2%

                          \[\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 rewrites72.2%

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

                          if -3.50000000000000003e176 < t < 9.20000000000000009e142

                          1. Initial program 61.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-+.f6466.8

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

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

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

                        Alternative 7: 57.5% accurate, 1.7× speedup?

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

                          1. Initial program 55.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 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-+.f6444.9

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

                            \[\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 rewrites55.2%

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

                            if -1.04999999999999993e206 < t

                            1. Initial program 57.1%

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

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

                                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                              2. +-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} \]
                          8. Recombined 2 regimes into one program.
                          9. Final simplification64.6%

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

                          Alternative 8: 53.1% accurate, 2.8× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{-100}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;z \leq 4700000000:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (if (<= z -7.2e-100) (+ a z) (if (<= z 4700000000.0) (- a b) (+ a z))))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if (z <= -7.2e-100) {
                          		tmp = a + z;
                          	} else if (z <= 4700000000.0) {
                          		tmp = a - b;
                          	} else {
                          		tmp = a + z;
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(x, y, z, t, a, b)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8), intent (in) :: b
                              real(8) :: tmp
                              if (z <= (-7.2d-100)) then
                                  tmp = a + z
                              else if (z <= 4700000000.0d0) then
                                  tmp = a - b
                              else
                                  tmp = a + z
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if (z <= -7.2e-100) {
                          		tmp = a + z;
                          	} else if (z <= 4700000000.0) {
                          		tmp = a - b;
                          	} else {
                          		tmp = a + z;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	tmp = 0
                          	if z <= -7.2e-100:
                          		tmp = a + z
                          	elif z <= 4700000000.0:
                          		tmp = a - b
                          	else:
                          		tmp = a + z
                          	return tmp
                          
                          function code(x, y, z, t, a, b)
                          	tmp = 0.0
                          	if (z <= -7.2e-100)
                          		tmp = Float64(a + z);
                          	elseif (z <= 4700000000.0)
                          		tmp = Float64(a - b);
                          	else
                          		tmp = Float64(a + z);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a, b)
                          	tmp = 0.0;
                          	if (z <= -7.2e-100)
                          		tmp = a + z;
                          	elseif (z <= 4700000000.0)
                          		tmp = a - b;
                          	else
                          		tmp = a + z;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.2e-100], N[(a + z), $MachinePrecision], If[LessEqual[z, 4700000000.0], N[(a - b), $MachinePrecision], N[(a + z), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;z \leq -7.2 \cdot 10^{-100}:\\
                          \;\;\;\;a + z\\
                          
                          \mathbf{elif}\;z \leq 4700000000:\\
                          \;\;\;\;a - b\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;a + z\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -7.1999999999999997e-100 or 4.7e9 < z

                            1. Initial program 49.1%

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

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

                                \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                              2. +-commutativeN/A

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

                                \[\leadsto \color{blue}{\left(z + a\right)} - b \]
                            5. Applied rewrites64.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 rewrites63.5%

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

                              if -7.1999999999999997e-100 < z < 4.7e9

                              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 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-+.f6458.6

                                  \[\leadsto \color{blue}{\left(z + a\right)} - b \]
                              5. Applied rewrites58.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 rewrites57.7%

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

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

                              Alternative 9: 57.2% accurate, 3.5× speedup?

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

                                1. Initial program 55.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-+.f6439.8

                                    \[\leadsto \frac{\mathsf{fma}\left(t, a, \left(\left(z + a\right) - b\right) \cdot y\right)}{\color{blue}{y + t}} \]
                                5. Applied rewrites39.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 inf

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

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

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

                                      \[\leadsto a \cdot 1 \]

                                    if -1.3999999999999999e206 < t

                                    1. Initial program 57.1%

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

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

                                        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                      2. +-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 simplification64.2%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{+206}:\\ \;\;\;\;1 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - b\\ \end{array} \]
                                  6. Add Preprocessing

                                  Alternative 10: 52.3% accurate, 4.5× speedup?

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

                                    1. Initial program 58.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-+.f6461.9

                                        \[\leadsto \color{blue}{\left(z + a\right)} - b \]
                                    5. Applied rewrites61.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 rewrites56.7%

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

                                      if 1.7999999999999999e252 < b

                                      1. Initial program 32.8%

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

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

                                          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                        2. +-commutativeN/A

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

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

                                        \[\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 rewrites51.9%

                                          \[\leadsto -b \]
                                      8. Recombined 2 regimes into one program.
                                      9. Final simplification56.5%

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

                                      Alternative 11: 13.6% accurate, 15.0× speedup?

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

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

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

                                          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                        2. +-commutativeN/A

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

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

                                        \[\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 rewrites14.1%

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

                                        Developer Target 1: 82.0% 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 2024240 
                                        (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)))