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

Percentage Accurate: 60.3% → 87.9%
Time: 9.2s
Alternatives: 12
Speedup: 1.1×

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 12 alternatives:

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

Initial Program: 60.3% 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: 87.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\ \mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+252}\right):\\ \;\;\;\;\left(z - b\right) + a\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-y, b, \mathsf{fma}\left(a, t + y, z \cdot \left(y + x\right)\right)\right)}{t\_1}\\ \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_1)))
   (if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+252)))
     (+ (- z b) a)
     (/ (fma (- y) b (fma a (+ t y) (* z (+ y x)))) t_1))))
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)) / t_1;
	double tmp;
	if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+252)) {
		tmp = (z - b) + a;
	} else {
		tmp = fma(-y, b, fma(a, (t + y), (z * (y + x)))) / t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + t) + y)
	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / t_1)
	tmp = 0.0
	if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+252))
		tmp = Float64(Float64(z - b) + a);
	else
		tmp = Float64(fma(Float64(-y), b, fma(a, Float64(t + y), Float64(z * Float64(y + x)))) / t_1);
	end
	return 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[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+252]], $MachinePrecision]], N[(N[(z - b), $MachinePrecision] + a), $MachinePrecision], N[(N[((-y) * b + N[(a * N[(t + y), $MachinePrecision] + N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+252}\right):\\
\;\;\;\;\left(z - b\right) + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 1.0000000000000001e252 < (/.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.5%

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

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

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

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

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

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

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

      1. Initial program 99.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. Step-by-step derivation
        1. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 73.9% accurate, 0.2× speedup?

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

      1. Initial program 17.5%

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

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

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

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

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

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

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

        1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 9.99999999999999983e66 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.00000000000000018e153

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

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

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, y, z \cdot \left(x + y\right) - b \cdot y\right)}}{x + y} \]
          4. distribute-rgt-inN/A

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(a, y, \mathsf{fma}\left(z, x, y \cdot z - \color{blue}{y \cdot b}\right)\right)}{x + y} \]
          9. distribute-lft-out--N/A

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, y, \mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)\right)}{y + x}} \]
      7. Recombined 3 regimes into one program.
      8. Add Preprocessing

      Alternative 3: 66.5% accurate, 0.2× speedup?

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

        1. Initial program 23.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. lower-+.f6480.2

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

          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
        6. Step-by-step derivation
          1. Applied rewrites80.2%

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

          if -1.99999999999999995e195 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999983e66

          1. Initial program 98.9%

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

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

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

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

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

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

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

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

          if 9.99999999999999983e66 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.00000000000000018e153

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

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

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

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

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a, y, z \cdot \left(x + y\right) - b \cdot y\right)}}{x + y} \]
            4. distribute-rgt-inN/A

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(a, y, \mathsf{fma}\left(z, x, y \cdot z - \color{blue}{y \cdot b}\right)\right)}{x + y} \]
            9. distribute-lft-out--N/A

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, y, \mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)\right)}{y + x}} \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 4: 66.3% accurate, 0.2× speedup?

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

          1. Initial program 23.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. lower-+.f6480.2

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

            \[\leadsto \color{blue}{\left(a + z\right) - b} \]
          6. Step-by-step derivation
            1. Applied rewrites80.2%

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

            if -1.99999999999999995e195 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.00000000000000018e42

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

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

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

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

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

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

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

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

            if 4.00000000000000018e42 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.00000000000000018e153

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-b, y, \left(t + y\right) \cdot a\right)}{\left(y + x\right) + t}} \]
          7. Recombined 3 regimes into one program.
          8. Add Preprocessing

          Alternative 5: 65.5% accurate, 0.4× speedup?

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

            1. Initial program 29.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. lower-+.f6477.4

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

              \[\leadsto \color{blue}{\left(a + z\right) - b} \]
            6. Step-by-step derivation
              1. Applied rewrites77.5%

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

              if -1.99999999999999995e195 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999983e66

              1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

            Alternative 6: 60.5% accurate, 1.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+149}:\\ \;\;\;\;\frac{x}{t + x} \cdot z\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{-32}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{+125}:\\ \;\;\;\;\left(z - b\right) + a\\ \mathbf{else}:\\ \;\;\;\;z - \frac{b - a}{x} \cdot y\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (if (<= x -2.9e+149)
               (* (/ x (+ t x)) z)
               (if (<= x -3.8e-32)
                 (+ z a)
                 (if (<= x 2.3e+125) (+ (- z b) a) (- z (* (/ (- b a) x) y))))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if (x <= -2.9e+149) {
            		tmp = (x / (t + x)) * z;
            	} else if (x <= -3.8e-32) {
            		tmp = z + a;
            	} else if (x <= 2.3e+125) {
            		tmp = (z - b) + a;
            	} else {
            		tmp = z - (((b - a) / x) * y);
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t, a, b)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8) :: tmp
                if (x <= (-2.9d+149)) then
                    tmp = (x / (t + x)) * z
                else if (x <= (-3.8d-32)) then
                    tmp = z + a
                else if (x <= 2.3d+125) then
                    tmp = (z - b) + a
                else
                    tmp = z - (((b - a) / x) * y)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if (x <= -2.9e+149) {
            		tmp = (x / (t + x)) * z;
            	} else if (x <= -3.8e-32) {
            		tmp = z + a;
            	} else if (x <= 2.3e+125) {
            		tmp = (z - b) + a;
            	} else {
            		tmp = z - (((b - a) / x) * y);
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	tmp = 0
            	if x <= -2.9e+149:
            		tmp = (x / (t + x)) * z
            	elif x <= -3.8e-32:
            		tmp = z + a
            	elif x <= 2.3e+125:
            		tmp = (z - b) + a
            	else:
            		tmp = z - (((b - a) / x) * y)
            	return tmp
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if (x <= -2.9e+149)
            		tmp = Float64(Float64(x / Float64(t + x)) * z);
            	elseif (x <= -3.8e-32)
            		tmp = Float64(z + a);
            	elseif (x <= 2.3e+125)
            		tmp = Float64(Float64(z - b) + a);
            	else
            		tmp = Float64(z - Float64(Float64(Float64(b - a) / x) * y));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	tmp = 0.0;
            	if (x <= -2.9e+149)
            		tmp = (x / (t + x)) * z;
            	elseif (x <= -3.8e-32)
            		tmp = z + a;
            	elseif (x <= 2.3e+125)
            		tmp = (z - b) + a;
            	else
            		tmp = z - (((b - a) / x) * y);
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.9e+149], N[(N[(x / N[(t + x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, -3.8e-32], N[(z + a), $MachinePrecision], If[LessEqual[x, 2.3e+125], N[(N[(z - b), $MachinePrecision] + a), $MachinePrecision], N[(z - N[(N[(N[(b - a), $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -2.9 \cdot 10^{+149}:\\
            \;\;\;\;\frac{x}{t + x} \cdot z\\
            
            \mathbf{elif}\;x \leq -3.8 \cdot 10^{-32}:\\
            \;\;\;\;z + a\\
            
            \mathbf{elif}\;x \leq 2.3 \cdot 10^{+125}:\\
            \;\;\;\;\left(z - b\right) + a\\
            
            \mathbf{else}:\\
            \;\;\;\;z - \frac{b - a}{x} \cdot y\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if x < -2.9000000000000002e149

              1. Initial program 55.9%

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

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

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

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

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

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

                  \[\leadsto \frac{x}{t + x} \cdot z \]
                3. Step-by-step derivation
                  1. Applied rewrites70.7%

                    \[\leadsto \frac{x}{t + x} \cdot z \]

                  if -2.9000000000000002e149 < x < -3.80000000000000008e-32

                  1. Initial program 77.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. lower-+.f6450.8

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

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

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

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

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

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

                      if -3.80000000000000008e-32 < x < 2.30000000000000013e125

                      1. Initial program 63.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. lower-+.f6467.9

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

                        \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                      6. Step-by-step derivation
                        1. Applied rewrites68.0%

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

                        if 2.30000000000000013e125 < x

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

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

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

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

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

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

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

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

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

                            \[\leadsto z - \frac{b - a}{x} \cdot \color{blue}{y} \]
                        8. Recombined 4 regimes into one program.
                        9. Add Preprocessing

                        Alternative 7: 58.8% accurate, 1.2× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{t + x} \cdot z\\ \mathbf{if}\;x \leq -2.9 \cdot 10^{+149}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{-32}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+125}:\\ \;\;\;\;\left(z - b\right) + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (let* ((t_1 (* (/ x (+ t x)) z)))
                           (if (<= x -2.9e+149)
                             t_1
                             (if (<= x -3.8e-32) (+ z a) (if (<= x 2e+125) (+ (- z b) a) t_1)))))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = (x / (t + x)) * z;
                        	double tmp;
                        	if (x <= -2.9e+149) {
                        		tmp = t_1;
                        	} else if (x <= -3.8e-32) {
                        		tmp = z + a;
                        	} else if (x <= 2e+125) {
                        		tmp = (z - b) + a;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        real(8) function code(x, y, z, t, a, b)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8) :: t_1
                            real(8) :: tmp
                            t_1 = (x / (t + x)) * z
                            if (x <= (-2.9d+149)) then
                                tmp = t_1
                            else if (x <= (-3.8d-32)) then
                                tmp = z + a
                            else if (x <= 2d+125) then
                                tmp = (z - b) + a
                            else
                                tmp = t_1
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = (x / (t + x)) * z;
                        	double tmp;
                        	if (x <= -2.9e+149) {
                        		tmp = t_1;
                        	} else if (x <= -3.8e-32) {
                        		tmp = z + a;
                        	} else if (x <= 2e+125) {
                        		tmp = (z - b) + a;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	t_1 = (x / (t + x)) * z
                        	tmp = 0
                        	if x <= -2.9e+149:
                        		tmp = t_1
                        	elif x <= -3.8e-32:
                        		tmp = z + a
                        	elif x <= 2e+125:
                        		tmp = (z - b) + a
                        	else:
                        		tmp = t_1
                        	return tmp
                        
                        function code(x, y, z, t, a, b)
                        	t_1 = Float64(Float64(x / Float64(t + x)) * z)
                        	tmp = 0.0
                        	if (x <= -2.9e+149)
                        		tmp = t_1;
                        	elseif (x <= -3.8e-32)
                        		tmp = Float64(z + a);
                        	elseif (x <= 2e+125)
                        		tmp = Float64(Float64(z - b) + a);
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b)
                        	t_1 = (x / (t + x)) * z;
                        	tmp = 0.0;
                        	if (x <= -2.9e+149)
                        		tmp = t_1;
                        	elseif (x <= -3.8e-32)
                        		tmp = z + a;
                        	elseif (x <= 2e+125)
                        		tmp = (z - b) + a;
                        	else
                        		tmp = t_1;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / N[(t + x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[x, -2.9e+149], t$95$1, If[LessEqual[x, -3.8e-32], N[(z + a), $MachinePrecision], If[LessEqual[x, 2e+125], N[(N[(z - b), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \frac{x}{t + x} \cdot z\\
                        \mathbf{if}\;x \leq -2.9 \cdot 10^{+149}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;x \leq -3.8 \cdot 10^{-32}:\\
                        \;\;\;\;z + a\\
                        
                        \mathbf{elif}\;x \leq 2 \cdot 10^{+125}:\\
                        \;\;\;\;\left(z - b\right) + a\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if x < -2.9000000000000002e149 or 1.9999999999999998e125 < x

                          1. Initial program 56.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 z around inf

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

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

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

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

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

                              \[\leadsto \frac{x}{t + x} \cdot z \]
                            3. Step-by-step derivation
                              1. Applied rewrites68.2%

                                \[\leadsto \frac{x}{t + x} \cdot z \]

                              if -2.9000000000000002e149 < x < -3.80000000000000008e-32

                              1. Initial program 77.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. lower-+.f6450.8

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

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

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

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

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

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

                                  if -3.80000000000000008e-32 < x < 1.9999999999999998e125

                                  1. Initial program 63.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. lower-+.f6467.9

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

                                    \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites68.0%

                                      \[\leadsto \left(z - b\right) + \color{blue}{a} \]
                                  7. Recombined 3 regimes into one program.
                                  8. Add Preprocessing

                                  Alternative 8: 59.8% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\frac{z}{t}, x, a\right) \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites58.4%

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

                                        if -3.7999999999999998e185 < t < 4e113

                                        1. Initial program 62.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. lower-+.f6466.0

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

                                          \[\leadsto \color{blue}{\left(a + z\right) - b} \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites66.0%

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

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

                                        Alternative 9: 57.6% accurate, 2.4× speedup?

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

                                          1. Initial program 53.8%

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

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

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

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

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

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

                                            if -1.05e15 < y < 3.4000000000000002e-233

                                            1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

                                              Alternative 10: 50.9% accurate, 4.5× speedup?

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

                                                1. Initial program 50.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. lower-+.f6445.5

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

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

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

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

                                                  if -1.52e91 < b

                                                  1. Initial program 65.9%

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

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

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

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

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

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

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

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

                                                        \[\leadsto z + \color{blue}{a} \]
                                                    4. Recombined 2 regimes into one program.
                                                    5. Add Preprocessing

                                                    Alternative 11: 50.8% accurate, 4.5× speedup?

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

                                                      1. Initial program 43.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. lower-+.f6447.2

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

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

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

                                                          \[\leadsto -b \]

                                                        if -1.00000000000000002e198 < b

                                                        1. Initial program 65.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. lower-+.f6458.6

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

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

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

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

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

                                                              \[\leadsto z + \color{blue}{a} \]
                                                          4. Recombined 2 regimes into one program.
                                                          5. Add Preprocessing

                                                          Alternative 12: 13.8% 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 63.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. lower-+.f6457.7

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

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

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

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

                                                            Developer Target 1: 81.5% 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 2024329 
                                                            (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)))