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

Percentage Accurate: 59.9% → 89.7%
Time: 14.4s
Alternatives: 14
Speedup: 1.2×

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 14 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: 59.9% accurate, 1.0× speedup?

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

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

Alternative 1: 89.7% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y + t, \frac{a}{\left(x + y\right) + t}, z - b\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.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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified56.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 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. lower-fma.f64N/A

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

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

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

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

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

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

        \[\leadsto \frac{\left(\color{blue}{\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(\color{blue}{\left(x + y\right) \cdot z} + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      3. lift-+.f64N/A

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

        \[\leadsto \frac{\left(\left(x + y\right) \cdot z + \color{blue}{\left(t + y\right) \cdot a}\right) - y \cdot b}{\left(x + t\right) + y} \]
      5. 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} \]
      6. 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} \]
      7. lift-+.f64N/A

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

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

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

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

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

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

    1. Initial program 6.7%

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

      \[\leadsto \color{blue}{-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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified31.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 y around inf

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

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

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

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

Alternative 2: 89.7% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y + t, \frac{a}{\left(x + y\right) + t}, z - b\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.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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified56.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 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. lower-fma.f64N/A

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

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

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

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

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

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

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

    1. Initial program 6.7%

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

      \[\leadsto \color{blue}{-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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified31.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 y around inf

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

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

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

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

Alternative 3: 58.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{y + t}, -b, a\right)\\
\mathbf{if}\;b \leq -8.9 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -3 \cdot 10^{-260}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{y + t}, a\right)\\

\mathbf{elif}\;b \leq 1.3 \cdot 10^{+58}:\\
\;\;\;\;z + a\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.89999999999999994e52 or 1.29999999999999994e58 < b

    1. Initial program 57.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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified63.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 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. lower-fma.f64N/A

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

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

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

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

      \[\leadsto \color{blue}{a + -1 \cdot \frac{b \cdot y}{t + y}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{y}{t + y} \cdot b}\right)\right) + a \]
      5. distribute-lft-neg-outN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{\color{blue}{y + t}}, \mathsf{neg}\left(b\right), a\right) \]
      14. lower-neg.f6456.6

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

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

    if -8.89999999999999994e52 < b < -3.0000000000000001e-260

    1. Initial program 58.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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified76.5%

      \[\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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0000000000000001e-260 < b < 1.29999999999999994e58

    1. Initial program 59.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-+.f6470.2

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

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

      \[\leadsto \color{blue}{a + z} \]
    7. Step-by-step derivation
      1. lower-+.f6473.7

        \[\leadsto \color{blue}{a + z} \]
    8. Simplified73.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.9 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{y + t}, -b, a\right)\\ \mathbf{elif}\;b \leq -3 \cdot 10^{-260}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{y + t}, a\right)\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{+58}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{y + t}, -b, a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 58.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, -\frac{b}{y + t}, a\right)\\
\mathbf{if}\;b \leq -6.5 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -3 \cdot 10^{-260}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{y + t}, a\right)\\

\mathbf{elif}\;b \leq 1.3 \cdot 10^{+58}:\\
\;\;\;\;z + a\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -6.5000000000000005e27 or 1.29999999999999994e58 < b

    1. Initial program 57.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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified64.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 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. lower-fma.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{y + t}, a\right) \]
      2. lower-neg.f6455.7

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

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

    if -6.5000000000000005e27 < b < -3.0000000000000001e-260

    1. Initial program 58.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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified75.5%

      \[\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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0000000000000001e-260 < b < 1.29999999999999994e58

    1. Initial program 59.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-+.f6470.2

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

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

      \[\leadsto \color{blue}{a + z} \]
    7. Step-by-step derivation
      1. lower-+.f6473.7

        \[\leadsto \color{blue}{a + z} \]
    8. Simplified73.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.5 \cdot 10^{+27}:\\ \;\;\;\;\mathsf{fma}\left(y, -\frac{b}{y + t}, a\right)\\ \mathbf{elif}\;b \leq -3 \cdot 10^{-260}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{y + t}, a\right)\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{+58}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, -\frac{b}{y + t}, a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 79.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, \frac{y + t}{y + \left(x + t\right)}, z\right)\\ \mathbf{if}\;x \leq -6.6 \cdot 10^{+61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+94}:\\ \;\;\;\;\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 (/ (+ y t) (+ y (+ x t))) z)))
   (if (<= x -6.6e+61)
     t_1
     (if (<= x 2.1e+94) (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, ((y + t) / (y + (x + t))), z);
	double tmp;
	if (x <= -6.6e+61) {
		tmp = t_1;
	} else if (x <= 2.1e+94) {
		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(Float64(y + t) / Float64(y + Float64(x + t))), z)
	tmp = 0.0
	if (x <= -6.6e+61)
		tmp = t_1;
	elseif (x <= 2.1e+94)
		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[(N[(y + t), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[x, -6.6e+61], t$95$1, If[LessEqual[x, 2.1e+94], 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{y + t}{y + \left(x + t\right)}, z\right)\\
\mathbf{if}\;x \leq -6.6 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 2.1 \cdot 10^{+94}:\\
\;\;\;\;\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.5999999999999995e61 or 2.09999999999999989e94 < x

    1. Initial program 53.5%

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

      \[\leadsto \color{blue}{-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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified60.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 y around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5999999999999995e61 < x < 2.09999999999999989e94

    1. Initial program 60.7%

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

      \[\leadsto \color{blue}{-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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified75.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 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. lower-fma.f64N/A

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

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

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

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

Alternative 6: 70.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.02 \cdot 10^{+116}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+192}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{y + t}, a\right)\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -1.02e+116) z (if (<= x 3.3e+192) (fma y (/ (- z b) (+ y t)) a) z)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -1.02e+116) {
		tmp = z;
	} else if (x <= 3.3e+192) {
		tmp = fma(y, ((z - b) / (y + t)), a);
	} else {
		tmp = z;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -1.02e+116)
		tmp = z;
	elseif (x <= 3.3e+192)
		tmp = fma(y, Float64(Float64(z - b) / Float64(y + t)), a);
	else
		tmp = z;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.02e+116], z, If[LessEqual[x, 3.3e+192], N[(y * N[(N[(z - b), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], z]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+116}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 3.3 \cdot 10^{+192}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{y + t}, a\right)\\

\mathbf{else}:\\
\;\;\;\;z\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.0199999999999999e116 or 3.3000000000000001e192 < x

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{-1} \]
    7. Step-by-step derivation
      1. Simplified62.1%

        \[\leadsto \left(-z\right) \cdot \color{blue}{-1} \]

      if -1.0199999999999999e116 < x < 3.3000000000000001e192

      1. Initial program 60.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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified75.1%

        \[\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. lower-fma.f64N/A

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

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

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

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

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

    Alternative 7: 57.7% accurate, 1.5× speedup?

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

      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 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-+.f6463.4

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

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

      if -8.30000000000000015e-128 < y < 7.9999999999999999e-238

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{x}{t}}, a\right) \]
      11. Simplified59.7%

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

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

    Alternative 8: 59.4% accurate, 1.7× speedup?

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

      1. Initial program 62.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-+.f6457.8

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

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

      if 6.29999999999999974e53 < t

      1. Initial program 47.7%

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

        \[\leadsto \color{blue}{-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. lower-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. lower-+.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. lower-/.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. lower-+.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. lower-+.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. Simplified60.4%

        \[\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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 57.9% accurate, 1.9× speedup?

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

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

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

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

      if 7.0000000000000003e77 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, a\right)} \]
        4. lower-/.f6466.7

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{z}{t}}, a\right) \]
      11. Simplified66.7%

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

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

    Alternative 10: 58.3% accurate, 2.4× speedup?

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

      1. Initial program 54.7%

        \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
      2. Add Preprocessing
      3. Taylor expanded in 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-+.f6439.0

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

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

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

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

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

      if -2.59999999999999999e59 < x < 1.1e173

      1. Initial program 59.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-+.f6462.6

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

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

      if 1.1e173 < x

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{-1} \]
      7. Step-by-step derivation
        1. Simplified69.7%

          \[\leadsto \left(-z\right) \cdot \color{blue}{-1} \]
      8. Recombined 3 regimes into one program.
      9. Final simplification61.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{+59}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+173}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
      10. Add Preprocessing

      Alternative 11: 53.3% accurate, 2.8× speedup?

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

        1. Initial program 57.6%

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

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

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

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

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

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

            \[\leadsto \color{blue}{a + z} \]
        8. Simplified58.2%

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

        if -2.10000000000000017e-140 < z < 5.20000000000000022e-38

        1. Initial program 60.7%

          \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
        2. Add Preprocessing
        3. Taylor expanded in 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.4

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

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

          \[\leadsto \color{blue}{a - b} \]
        7. Step-by-step derivation
          1. lower--.f6460.0

            \[\leadsto \color{blue}{a - b} \]
        8. Simplified60.0%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{-140}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-38}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \]
      5. Add Preprocessing

      Alternative 12: 56.6% accurate, 3.5× speedup?

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

        1. Initial program 54.7%

          \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
        2. Add Preprocessing
        3. Taylor expanded in 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-+.f6439.0

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

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

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

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

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

        if -2.59999999999999999e59 < x

        1. Initial program 59.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-+.f6460.9

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

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

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

      Alternative 13: 52.3% accurate, 11.3× speedup?

      \[\begin{array}{l} \\ z + a \end{array} \]
      (FPCore (x y z t a b) :precision binary64 (+ z a))
      double code(double x, double y, double z, double t, double a, double b) {
      	return z + 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 = z + a
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	return z + a;
      }
      
      def code(x, y, z, t, a, b):
      	return z + a
      
      function code(x, y, z, t, a, b)
      	return Float64(z + a)
      end
      
      function tmp = code(x, y, z, t, a, b)
      	tmp = z + a;
      end
      
      code[x_, y_, z_, t_, a_, b_] := N[(z + a), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      z + a
      \end{array}
      
      Derivation
      1. Initial program 58.6%

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

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

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

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

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

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

          \[\leadsto \color{blue}{a + z} \]
      8. Simplified52.9%

        \[\leadsto \color{blue}{a + z} \]
      9. Final simplification52.9%

        \[\leadsto z + a \]
      10. Add Preprocessing

      Alternative 14: 13.1% 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 58.6%

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot b} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(b\right)} \]
        2. lower-neg.f6412.3

          \[\leadsto \color{blue}{-b} \]
      8. Simplified12.3%

        \[\leadsto \color{blue}{-b} \]
      9. Add Preprocessing

      Developer Target 1: 82.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 2024208 
      (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)))