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

Percentage Accurate: 61.0% → 88.8%
Time: 13.7s
Alternatives: 9
Speedup: 1.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 9 alternatives:

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

Initial Program: 61.0% accurate, 1.0× speedup?

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

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

Alternative 1: 88.8% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 10^{+271}:\\
\;\;\;\;\frac{\left(t\_2 + \mathsf{fma}\left(y, a, t \cdot a\right)\right) - y \cdot b}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0

    1. Initial program 6.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

      1. Initial program 4.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{y \cdot \frac{z - b}{t + y}} + a \]
        3. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

    Alternative 2: 88.8% accurate, 0.3× speedup?

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

      1. Initial program 6.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 99.6%

          \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
        2. Add Preprocessing

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

        1. Initial program 4.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{y \cdot \frac{z - b}{t + y}} + a \]
          3. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

      Alternative 3: 77.9% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -3.05e69 < x < 6.4000000000000003e72

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{y \cdot \frac{z - b}{t + y}} + a \]
            3. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

        Alternative 4: 74.1% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{a \cdot t}{t + x} + z} \]
              2. associate-/l*N/A

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

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

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

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

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

            if -6.20000000000000043e74 < x < 1.02000000000000003e157

            1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{y \cdot \frac{z - b}{t + y}} + a \]
              3. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

          Alternative 5: 66.1% accurate, 1.4× speedup?

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

            1. Initial program 39.2%

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

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

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

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

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

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

            if -4.4e16 < y < 1.04e127

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{a \cdot t}{t + x} + z} \]
                2. associate-/l*N/A

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

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

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

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

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

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

            Alternative 6: 58.4% accurate, 2.4× speedup?

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

              1. Initial program 50.5%

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

                \[\leadsto \color{blue}{z} \]
              4. Step-by-step derivation
                1. Simplified72.1%

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

                if -1.85e169 < x < 2.2000000000000001e157

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

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

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

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

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

              Alternative 7: 45.4% accurate, 3.5× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+39}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+38}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (if (<= x -8.5e+39) z (if (<= x 5.8e+38) a z)))
              double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if (x <= -8.5e+39) {
              		tmp = z;
              	} else if (x <= 5.8e+38) {
              		tmp = a;
              	} else {
              		tmp = z;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a, b)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8) :: tmp
                  if (x <= (-8.5d+39)) then
                      tmp = z
                  else if (x <= 5.8d+38) then
                      tmp = a
                  else
                      tmp = z
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if (x <= -8.5e+39) {
              		tmp = z;
              	} else if (x <= 5.8e+38) {
              		tmp = a;
              	} else {
              		tmp = z;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	tmp = 0
              	if x <= -8.5e+39:
              		tmp = z
              	elif x <= 5.8e+38:
              		tmp = a
              	else:
              		tmp = z
              	return tmp
              
              function code(x, y, z, t, a, b)
              	tmp = 0.0
              	if (x <= -8.5e+39)
              		tmp = z;
              	elseif (x <= 5.8e+38)
              		tmp = a;
              	else
              		tmp = z;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	tmp = 0.0;
              	if (x <= -8.5e+39)
              		tmp = z;
              	elseif (x <= 5.8e+38)
              		tmp = a;
              	else
              		tmp = z;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.5e+39], z, If[LessEqual[x, 5.8e+38], a, z]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;x \leq -8.5 \cdot 10^{+39}:\\
              \;\;\;\;z\\
              
              \mathbf{elif}\;x \leq 5.8 \cdot 10^{+38}:\\
              \;\;\;\;a\\
              
              \mathbf{else}:\\
              \;\;\;\;z\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < -8.49999999999999971e39 or 5.80000000000000013e38 < x

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

                  \[\leadsto \color{blue}{z} \]
                4. Step-by-step derivation
                  1. Simplified56.9%

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

                  if -8.49999999999999971e39 < x < 5.80000000000000013e38

                  1. Initial program 68.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 t around inf

                    \[\leadsto \color{blue}{a} \]
                  4. Step-by-step derivation
                    1. Simplified45.8%

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

                  Alternative 8: 52.6% accurate, 4.5× speedup?

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

                    1. Initial program 44.1%

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

                      \[\leadsto \color{blue}{z} \]
                    4. Step-by-step derivation
                      1. Simplified71.3%

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

                      if -8.7999999999999999e173 < x

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{a + z} \]
                      7. Step-by-step derivation
                        1. +-lowering-+.f6454.5

                          \[\leadsto \color{blue}{a + z} \]
                      8. Simplified54.5%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{+173}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \]
                    7. Add Preprocessing

                    Alternative 9: 33.3% accurate, 45.0× speedup?

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

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

                      \[\leadsto \color{blue}{a} \]
                    4. Step-by-step derivation
                      1. Simplified32.6%

                        \[\leadsto \color{blue}{a} \]
                      2. Add Preprocessing

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

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

                      Reproduce

                      ?
                      herbie shell --seed 2024201 
                      (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)))