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

Percentage Accurate: 60.1% → 91.0%
Time: 13.2s
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: 60.1% 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: 91.0% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y + t, t\_3, 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.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. Applied rewrites43.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 z around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e281 < (/.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. Applied rewrites40.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 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--.f6492.2

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

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

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

Alternative 2: 58.6% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-29}:\\
\;\;\;\;a \cdot \frac{t}{x + t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5e11 or 4.99999999999999986e-29 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 49.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-+.f6467.7

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

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

    if -5e11 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.99999999999999998e-159

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999998e-159 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.99999999999999986e-29

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{t}{\color{blue}{x + t}} \]
      5. lower-+.f6471.4

        \[\leadsto a \cdot \frac{t}{\color{blue}{x + t}} \]
    11. Applied rewrites71.4%

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

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

Alternative 3: 56.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{y + \left(x + t\right)}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;t\_1 \leq -50000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-139}:\\ \;\;\;\;a \cdot \frac{z}{a}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-29}:\\ \;\;\;\;a \cdot \frac{t}{x + t}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (+ (* z (+ x y)) (* (+ y t) a)) (* y b)) (+ y (+ x t))))
        (t_2 (- (+ z a) b)))
   (if (<= t_1 -50000000000.0)
     t_2
     (if (<= t_1 -5e-139)
       (* a (/ z a))
       (if (<= t_1 5e-29) (* a (/ t (+ x t))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t));
	double t_2 = (z + a) - b;
	double tmp;
	if (t_1 <= -50000000000.0) {
		tmp = t_2;
	} else if (t_1 <= -5e-139) {
		tmp = a * (z / a);
	} else if (t_1 <= 5e-29) {
		tmp = a * (t / (x + t));
	} else {
		tmp = t_2;
	}
	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) :: tmp
    t_1 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t))
    t_2 = (z + a) - b
    if (t_1 <= (-50000000000.0d0)) then
        tmp = t_2
    else if (t_1 <= (-5d-139)) then
        tmp = a * (z / a)
    else if (t_1 <= 5d-29) then
        tmp = a * (t / (x + t))
    else
        tmp = t_2
    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 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t));
	double t_2 = (z + a) - b;
	double tmp;
	if (t_1 <= -50000000000.0) {
		tmp = t_2;
	} else if (t_1 <= -5e-139) {
		tmp = a * (z / a);
	} else if (t_1 <= 5e-29) {
		tmp = a * (t / (x + t));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t))
	t_2 = (z + a) - b
	tmp = 0
	if t_1 <= -50000000000.0:
		tmp = t_2
	elif t_1 <= -5e-139:
		tmp = a * (z / a)
	elif t_1 <= 5e-29:
		tmp = a * (t / (x + t))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(Float64(y + t) * a)) - Float64(y * b)) / Float64(y + Float64(x + t)))
	t_2 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (t_1 <= -50000000000.0)
		tmp = t_2;
	elseif (t_1 <= -5e-139)
		tmp = Float64(a * Float64(z / a));
	elseif (t_1 <= 5e-29)
		tmp = Float64(a * Float64(t / Float64(x + t)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t));
	t_2 = (z + a) - b;
	tmp = 0.0;
	if (t_1 <= -50000000000.0)
		tmp = t_2;
	elseif (t_1 <= -5e-139)
		tmp = a * (z / a);
	elseif (t_1 <= 5e-29)
		tmp = a * (t / (x + t));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000000.0], t$95$2, If[LessEqual[t$95$1, -5e-139], N[(a * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-29], N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-139}:\\
\;\;\;\;a \cdot \frac{z}{a}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-29}:\\
\;\;\;\;a \cdot \frac{t}{x + t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5e10 or 4.99999999999999986e-29 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 49.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-+.f6467.4

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

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

    if -5e10 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5.00000000000000034e-139

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(-1 \cdot \frac{z}{a}\right)} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\frac{-1 \cdot z}{a}} \]
      3. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \frac{\color{blue}{\mathsf{neg}\left(z\right)}}{a} \]
      4. lower-neg.f6453.1

        \[\leadsto \left(-a\right) \cdot \frac{\color{blue}{-z}}{a} \]
    8. Applied rewrites53.1%

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

    if -5.00000000000000034e-139 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.99999999999999986e-29

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{t}{\color{blue}{x + t}} \]
      5. lower-+.f6468.4

        \[\leadsto a \cdot \frac{t}{\color{blue}{x + t}} \]
    11. Applied rewrites68.4%

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

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

Alternative 4: 90.5% accurate, 0.3× speedup?

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

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

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

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


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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t + y, \frac{a}{t + \left(y + x\right)}, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{t + \left(y + x\right)}\right)} \]
    6. Taylor expanded in 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--.f6488.0

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

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

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

    1. Initial program 99.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. Recombined 2 regimes into one program.
  4. Final simplification94.7%

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

Alternative 5: 57.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-29}:\\
\;\;\;\;a \cdot \frac{t}{x + t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -9.99999999999999915e-146 or 4.99999999999999986e-29 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 55.1%

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

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

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

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

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

    if -9.99999999999999915e-146 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.99999999999999986e-29

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{t}{\color{blue}{x + t}} \]
      5. lower-+.f6470.3

        \[\leadsto a \cdot \frac{t}{\color{blue}{x + t}} \]
    11. Applied rewrites70.3%

      \[\leadsto \color{blue}{a \cdot \frac{t}{x + t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.4%

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

Alternative 6: 71.7% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;x \leq 3.7 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -9.20000000000000042e109 or 1.18e-57 < x < 3.7e186

    1. Initial program 55.6%

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

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

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

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

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

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

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

        \[\leadsto \left(t + y\right) \cdot \frac{a}{t + \left(x + y\right)} + \color{blue}{\left(\frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      7. 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. Applied rewrites67.9%

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

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

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

    if -9.20000000000000042e109 < x < 1.18e-57

    1. Initial program 65.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. Applied rewrites68.6%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - b}{t + y}} + a \]
      3. 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-+.f6485.4

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

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

    if 3.7e186 < x < 6.6000000000000002e268

    1. Initial program 72.3%

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

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

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

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

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

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

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

    if 6.6000000000000002e268 < x

    1. Initial program 31.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. Applied rewrites38.9%

      \[\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 z around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{+109}:\\ \;\;\;\;\mathsf{fma}\left(y + t, \frac{a}{t + \left(x + y\right)}, z - b\right)\\ \mathbf{elif}\;x \leq 1.18 \cdot 10^{-57}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - b}{y + t}, a\right)\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{+186}:\\ \;\;\;\;\mathsf{fma}\left(y + t, \frac{a}{t + \left(x + y\right)}, z - b\right)\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{+268}:\\ \;\;\;\;z - \frac{\mathsf{fma}\left(y + t, z, -\mathsf{fma}\left(a, t, y \cdot \left(\left(z + a\right) - b\right)\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y}{x + y}, z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 69.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
\mathbf{if}\;y \leq -2.25 \cdot 10^{-38}:\\
\;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{t\_1}\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{-79}:\\
\;\;\;\;a \cdot \left(\frac{z}{a} + \frac{y + t}{t\_1}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.25000000000000004e-38

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.25000000000000004e-38 < y < 1.55e-79

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.55e-79 < y

    1. Initial program 47.2%

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

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

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

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

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

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

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

        \[\leadsto \left(t + y\right) \cdot \frac{a}{t + \left(x + y\right)} + \color{blue}{\left(\frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      7. 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. Applied rewrites58.6%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - b}{t + y}} + a \]
      3. 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.4

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

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

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

Alternative 8: 71.5% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.15e-5 or 7.4000000000000003e143 < t

    1. Initial program 51.2%

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

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

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

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

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

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

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

        \[\leadsto \left(t + y\right) \cdot \frac{a}{t + \left(x + y\right)} + \color{blue}{\left(\frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} - \frac{b \cdot y}{t + \left(x + y\right)}\right)} \]
      7. 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. Applied rewrites63.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-+.f6485.1

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

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

    if -1.15e-5 < t < 7.4000000000000003e143

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t + y, \frac{a}{t + \left(y + x\right)}, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{t + \left(y + x\right)}\right)} \]
    6. Taylor expanded in 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--.f6474.0

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

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

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

Alternative 9: 73.2% accurate, 1.2× speedup?

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

\mathbf{elif}\;x \leq 2.05 \cdot 10^{+102}:\\
\;\;\;\;\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 < -1.39999999999999993e110 or 2.05e102 < x

    1. Initial program 44.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.39999999999999993e110 < x < 2.05e102

    1. Initial program 67.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. Applied rewrites71.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-+.f6479.9

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

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

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

Alternative 10: 52.2% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-73}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+95}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -5e-73) (+ z a) (if (<= z 5.4e+95) (- a b) (+ z a))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -5e-73) {
		tmp = z + a;
	} else if (z <= 5.4e+95) {
		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 <= (-5d-73)) then
        tmp = z + a
    else if (z <= 5.4d+95) 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 <= -5e-73) {
		tmp = z + a;
	} else if (z <= 5.4e+95) {
		tmp = a - b;
	} else {
		tmp = z + a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -5e-73:
		tmp = z + a
	elif z <= 5.4e+95:
		tmp = a - b
	else:
		tmp = z + a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -5e-73)
		tmp = Float64(z + a);
	elseif (z <= 5.4e+95)
		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 <= -5e-73)
		tmp = z + a;
	elseif (z <= 5.4e+95)
		tmp = a - b;
	else
		tmp = z + a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5e-73], N[(z + a), $MachinePrecision], If[LessEqual[z, 5.4e+95], N[(a - b), $MachinePrecision], N[(z + a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-73}:\\
\;\;\;\;z + a\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+95}:\\
\;\;\;\;a - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.9999999999999998e-73 or 5.4e95 < z

    1. Initial program 48.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-+.f6462.5

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

      \[\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. +-commutativeN/A

        \[\leadsto \color{blue}{z + a} \]
      2. lower-+.f6458.8

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

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

    if -4.9999999999999998e-73 < z < 5.4e95

    1. Initial program 71.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-+.f6454.4

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

        \[\leadsto \color{blue}{a - b} \]
    8. Applied rewrites53.9%

      \[\leadsto \color{blue}{a - b} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 57.3% accurate, 3.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{+186}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -9.2e+186) a (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -9.2e+186) {
		tmp = 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 (t <= (-9.2d+186)) then
        tmp = 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 (t <= -9.2e+186) {
		tmp = a;
	} else {
		tmp = (z + a) - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -9.2e+186:
		tmp = a
	else:
		tmp = (z + a) - b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -9.2e+186)
		tmp = 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 (t <= -9.2e+186)
		tmp = a;
	else
		tmp = (z + a) - b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -9.2e+186], a, N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{+186}:\\
\;\;\;\;a\\

\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.20000000000000054e186

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto a \cdot \color{blue}{1} \]
    10. Step-by-step derivation
      1. Applied rewrites67.9%

        \[\leadsto a \cdot \color{blue}{1} \]

      if -9.20000000000000054e186 < t

      1. Initial program 61.2%

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

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

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

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

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

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

    Alternative 12: 50.7% accurate, 4.5× speedup?

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

      1. Initial program 60.3%

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

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

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

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

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

        \[\leadsto \color{blue}{z - b} \]
      7. Step-by-step derivation
        1. lower--.f6451.5

          \[\leadsto \color{blue}{z - b} \]
      8. Applied rewrites51.5%

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

      if -6.2e18 < b

      1. Initial program 61.3%

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

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

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

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

          \[\leadsto \color{blue}{z + a} \]
        2. lower-+.f6456.6

          \[\leadsto \color{blue}{z + a} \]
      8. Applied rewrites56.6%

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

    Alternative 13: 52.1% accurate, 4.5× speedup?

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

      1. Initial program 40.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-+.f6469.0

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

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

          \[\leadsto \color{blue}{-b} \]
      8. Applied rewrites62.1%

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

      if -3.2000000000000001e208 < b

      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.2

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

          \[\leadsto \color{blue}{z + a} \]
        2. lower-+.f6452.7

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

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

    Alternative 14: 12.9% 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 61.1%

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

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

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

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

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

        \[\leadsto \color{blue}{-b} \]
    8. Applied rewrites15.1%

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

    Developer Target 1: 81.9% 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 2024219 
    (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)))