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

Percentage Accurate: 59.7% → 93.8%
Time: 10.3s
Alternatives: 18
Speedup: 0.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 59.7% 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: 93.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) + t\\ t_2 := t + \left(x + y\right)\\ \mathbf{if}\;z \leq -1.52 \cdot 10^{-78} \lor \neg \left(z \leq 1.75 \cdot 10^{-51}\right):\\ \;\;\;\;z \cdot \mathsf{fma}\left(\frac{a}{z}, \frac{t + y}{t\_2}, \frac{x + y}{t\_2}\right) - b \cdot \left({\left(\left(x + y\right) + t\right)}^{-1} \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{t\_1} + \frac{y}{t\_1}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{t\_1}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ y x) t)) (t_2 (+ t (+ x y))))
   (if (or (<= z -1.52e-78) (not (<= z 1.75e-51)))
     (-
      (* z (fma (/ a z) (/ (+ t y) t_2) (/ (+ x y) t_2)))
      (* b (* (pow (+ (+ x y) t) -1.0) y)))
     (fma (+ (/ t t_1) (/ y t_1)) a (/ (fma z x (* y (- z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y + x) + t;
	double t_2 = t + (x + y);
	double tmp;
	if ((z <= -1.52e-78) || !(z <= 1.75e-51)) {
		tmp = (z * fma((a / z), ((t + y) / t_2), ((x + y) / t_2))) - (b * (pow(((x + y) + t), -1.0) * y));
	} else {
		tmp = fma(((t / t_1) + (y / t_1)), a, (fma(z, x, (y * (z - b))) / t_1));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(y + x) + t)
	t_2 = Float64(t + Float64(x + y))
	tmp = 0.0
	if ((z <= -1.52e-78) || !(z <= 1.75e-51))
		tmp = Float64(Float64(z * fma(Float64(a / z), Float64(Float64(t + y) / t_2), Float64(Float64(x + y) / t_2))) - Float64(b * Float64((Float64(Float64(x + y) + t) ^ -1.0) * y)));
	else
		tmp = fma(Float64(Float64(t / t_1) + Float64(y / t_1)), a, Float64(fma(z, x, Float64(y * Float64(z - b))) / t_1));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.52e-78], N[Not[LessEqual[z, 1.75e-51]], $MachinePrecision]], N[(N[(z * N[(N[(a / z), $MachinePrecision] * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[Power[N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision], -1.0], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] * a + N[(N[(z * x + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y + x\right) + t\\
t_2 := t + \left(x + y\right)\\
\mathbf{if}\;z \leq -1.52 \cdot 10^{-78} \lor \neg \left(z \leq 1.75 \cdot 10^{-51}\right):\\
\;\;\;\;z \cdot \mathsf{fma}\left(\frac{a}{z}, \frac{t + y}{t\_2}, \frac{x + y}{t\_2}\right) - b \cdot \left({\left(\left(x + y\right) + t\right)}^{-1} \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.52e-78 or 1.7499999999999999e-51 < z

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-z\right) \cdot \left(-1 \cdot \mathsf{fma}\left(\frac{a}{z}, \frac{t + y}{t + \left(x + y\right)}, \frac{x + y}{t + \left(x + y\right)}\right)\right) + b \cdot \left(\color{blue}{{\left(t + \left(x + y\right)\right)}^{-1}} \cdot \left(-y\right)\right) \]
      14. lower-pow.f6498.7

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

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

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

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

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

    if -1.52e-78 < z < 1.7499999999999999e-51

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

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

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

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

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

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

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

Alternative 2: 91.6% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
    4. Applied rewrites18.7%

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

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

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

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

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

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

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

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

Alternative 3: 91.8% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+226}:\\
\;\;\;\;t\_1\\

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
    4. Applied rewrites18.7%

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

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

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

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

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

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

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

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

Alternative 4: 78.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(t + y\right) \cdot a\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{\left(x + t\right) + y}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-20} \lor \neg \left(t\_2 \leq 5 \cdot 10^{+125}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-y}{\left(x + y\right) + t}, b, a + z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.99999999999999989e-20 or 4.99999999999999962e125 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 41.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
    4. Applied rewrites43.2%

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

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

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

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

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

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

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

    if -1.99999999999999989e-20 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.99999999999999962e125

    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 b around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 73.8% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.99999999999999991e-44 or 1.00000000000000009e25 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999991e-44 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000009e25

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

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

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

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

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

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

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

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

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

Alternative 6: 68.1% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -4.9999999999999996e-41 or 9.99999999999999962e134 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999996e-41 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999962e134

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

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

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

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

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

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

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

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

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

Alternative 7: 65.9% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5.0000000000000004e49 or 4.99999999999999962e125 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 35.8%

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

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

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

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

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

    if -5.0000000000000004e49 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.99999999999999962e125

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

Alternative 8: 55.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-41} \lor \neg \left(t\_2 \leq 4 \cdot 10^{+26}\right):\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot t}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ x t) y))
        (t_2 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) t_1)))
   (if (or (<= t_2 -5e-41) (not (<= t_2 4e+26)))
     (- (+ a z) b)
     (/ (* a t) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + t) + y;
	double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
	double tmp;
	if ((t_2 <= -5e-41) || !(t_2 <= 4e+26)) {
		tmp = (a + z) - b;
	} else {
		tmp = (a * t) / t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x + t) + y
    t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1
    if ((t_2 <= (-5d-41)) .or. (.not. (t_2 <= 4d+26))) then
        tmp = (a + z) - b
    else
        tmp = (a * t) / t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + t) + y;
	double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
	double tmp;
	if ((t_2 <= -5e-41) || !(t_2 <= 4e+26)) {
		tmp = (a + z) - b;
	} else {
		tmp = (a * t) / t_1;
	}
	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_1
	tmp = 0
	if (t_2 <= -5e-41) or not (t_2 <= 4e+26):
		tmp = (a + z) - b
	else:
		tmp = (a * t) / t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + t) + y)
	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / t_1)
	tmp = 0.0
	if ((t_2 <= -5e-41) || !(t_2 <= 4e+26))
		tmp = Float64(Float64(a + z) - b);
	else
		tmp = Float64(Float64(a * t) / t_1);
	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_1;
	tmp = 0.0;
	if ((t_2 <= -5e-41) || ~((t_2 <= 4e+26)))
		tmp = (a + z) - b;
	else
		tmp = (a * t) / t_1;
	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[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -5e-41], N[Not[LessEqual[t$95$2, 4e+26]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(a * t), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{a \cdot t}{t\_1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -4.9999999999999996e-41 or 4.00000000000000019e26 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 50.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-+.f6464.2

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

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

    if -4.9999999999999996e-41 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.00000000000000019e26

    1. Initial program 98.3%

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

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

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

      \[\leadsto \frac{\color{blue}{a \cdot t}}{\left(x + t\right) + y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.1%

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

Alternative 9: 92.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y + x\right) + t\\ t_2 := t + \left(x + y\right)\\ \mathbf{if}\;z \leq -1.52 \cdot 10^{-78} \lor \neg \left(z \leq 6.5 \cdot 10^{-43}\right):\\ \;\;\;\;z \cdot \mathsf{fma}\left(\frac{a}{z}, \frac{t + y}{t\_2}, \frac{x + y}{t\_2}\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{t\_1} + \frac{y}{t\_1}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{t\_1}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ y x) t)) (t_2 (+ t (+ x y))))
   (if (or (<= z -1.52e-78) (not (<= z 6.5e-43)))
     (-
      (* z (fma (/ a z) (/ (+ t y) t_2) (/ (+ x y) t_2)))
      (* y (/ b (+ (+ t x) y))))
     (fma (+ (/ t t_1) (/ y t_1)) a (/ (fma z x (* y (- z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y + x) + t;
	double t_2 = t + (x + y);
	double tmp;
	if ((z <= -1.52e-78) || !(z <= 6.5e-43)) {
		tmp = (z * fma((a / z), ((t + y) / t_2), ((x + y) / t_2))) - (y * (b / ((t + x) + y)));
	} else {
		tmp = fma(((t / t_1) + (y / t_1)), a, (fma(z, x, (y * (z - b))) / t_1));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(y + x) + t)
	t_2 = Float64(t + Float64(x + y))
	tmp = 0.0
	if ((z <= -1.52e-78) || !(z <= 6.5e-43))
		tmp = Float64(Float64(z * fma(Float64(a / z), Float64(Float64(t + y) / t_2), Float64(Float64(x + y) / t_2))) - Float64(y * Float64(b / Float64(Float64(t + x) + y))));
	else
		tmp = fma(Float64(Float64(t / t_1) + Float64(y / t_1)), a, Float64(fma(z, x, Float64(y * Float64(z - b))) / t_1));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.52e-78], N[Not[LessEqual[z, 6.5e-43]], $MachinePrecision]], N[(N[(z * N[(N[(a / z), $MachinePrecision] * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] * a + N[(N[(z * x + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y + x\right) + t\\
t_2 := t + \left(x + y\right)\\
\mathbf{if}\;z \leq -1.52 \cdot 10^{-78} \lor \neg \left(z \leq 6.5 \cdot 10^{-43}\right):\\
\;\;\;\;z \cdot \mathsf{fma}\left(\frac{a}{z}, \frac{t + y}{t\_2}, \frac{x + y}{t\_2}\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.52e-78 or 6.50000000000000001e-43 < z

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} + \left(\mathsf{neg}\left(y\right)\right) \cdot \frac{b}{\left(x + t\right) + y}} \]
    4. Applied rewrites57.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.52e-78 < z < 6.50000000000000001e-43

    1. Initial program 69.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 a around 0

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

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

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

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

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

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

Alternative 10: 57.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+55}:\\ \;\;\;\;\left(t + y\right) \cdot \frac{a}{\left(y + x\right) + t}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+58}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -1.3e+55)
   (* (+ t y) (/ a (+ (+ y x) t)))
   (if (<= t 8e+58) (- (+ a z) b) (- (+ a z) (* y (/ b t))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -1.3e+55) {
		tmp = (t + y) * (a / ((y + x) + t));
	} else if (t <= 8e+58) {
		tmp = (a + z) - b;
	} else {
		tmp = (a + z) - (y * (b / t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (t <= (-1.3d+55)) then
        tmp = (t + y) * (a / ((y + x) + t))
    else if (t <= 8d+58) then
        tmp = (a + z) - b
    else
        tmp = (a + z) - (y * (b / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -1.3e+55) {
		tmp = (t + y) * (a / ((y + x) + t));
	} else if (t <= 8e+58) {
		tmp = (a + z) - b;
	} else {
		tmp = (a + z) - (y * (b / t));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -1.3e+55:
		tmp = (t + y) * (a / ((y + x) + t))
	elif t <= 8e+58:
		tmp = (a + z) - b
	else:
		tmp = (a + z) - (y * (b / t))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -1.3e+55)
		tmp = Float64(Float64(t + y) * Float64(a / Float64(Float64(y + x) + t)));
	elseif (t <= 8e+58)
		tmp = Float64(Float64(a + z) - b);
	else
		tmp = Float64(Float64(a + z) - Float64(y * Float64(b / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -1.3e+55)
		tmp = (t + y) * (a / ((y + x) + t));
	elseif (t <= 8e+58)
		tmp = (a + z) - b;
	else
		tmp = (a + z) - (y * (b / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.3e+55], N[(N[(t + y), $MachinePrecision] * N[(a / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+58], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+55}:\\
\;\;\;\;\left(t + y\right) \cdot \frac{a}{\left(y + x\right) + t}\\

\mathbf{elif}\;t \leq 8 \cdot 10^{+58}:\\
\;\;\;\;\left(a + z\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.3e55

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3e55 < t < 7.99999999999999955e58

    1. Initial program 68.5%

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

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

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

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

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

    if 7.99999999999999955e58 < t

    1. Initial program 56.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 57.5% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.7 \cdot 10^{+50}:\\
\;\;\;\;a + z\\

\mathbf{elif}\;t \leq 8 \cdot 10^{+58}:\\
\;\;\;\;\left(a + z\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.7000000000000002e50

    1. Initial program 53.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-+.f6444.5

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

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

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

        \[\leadsto a - \color{blue}{b} \]
      2. Taylor expanded in b around 0

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

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

        if -5.7000000000000002e50 < t < 7.99999999999999955e58

        1. Initial program 68.5%

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

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

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

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

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

        if 7.99999999999999955e58 < t

        1. Initial program 56.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.7 \cdot 10^{+50}:\\ \;\;\;\;a + z\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+58}:\\ \;\;\;\;\left(a + z\right) - b\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) - y \cdot \frac{b}{t}\\ \end{array} \]
      6. Add Preprocessing

      Alternative 12: 57.2% accurate, 1.4× speedup?

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

        1. Initial program 49.0%

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

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

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

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

          if -1.69999999999999997e82 < x < 1.02e17

          1. Initial program 66.0%

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

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

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

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

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

          if 1.02e17 < x

          1. Initial program 68.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 rewrites50.8%

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

            \[\leadsto z - \frac{b \cdot y}{x} \]
          7. Step-by-step derivation
            1. Applied rewrites52.6%

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

          Alternative 13: 55.9% accurate, 1.4× speedup?

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

            1. Initial program 48.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 rewrites50.9%

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

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

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

              if -8.2e58 < x < 1.02e17

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

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

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

              if 1.02e17 < x

              1. Initial program 68.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 rewrites50.8%

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

                \[\leadsto z - \frac{b \cdot y}{x} \]
              7. Step-by-step derivation
                1. Applied rewrites52.6%

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

              Alternative 14: 55.2% accurate, 1.7× speedup?

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

                1. Initial program 61.5%

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

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

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

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

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

                if 1.02e17 < x

                1. Initial program 68.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 rewrites50.8%

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

                  \[\leadsto z - \frac{b \cdot y}{x} \]
                7. Step-by-step derivation
                  1. Applied rewrites52.6%

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

                Alternative 15: 58.9% accurate, 2.4× speedup?

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

                  1. Initial program 53.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-+.f6465.7

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

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

                  if -3.7e-128 < y < 1.65000000000000009e-9

                  1. Initial program 78.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-+.f6432.7

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

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

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

                      \[\leadsto a - \color{blue}{b} \]
                    2. Taylor expanded in b around 0

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

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

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

                    Alternative 16: 52.5% accurate, 2.8× speedup?

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

                      1. Initial program 55.0%

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

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

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

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

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

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

                          \[\leadsto a - \color{blue}{b} \]
                        2. Taylor expanded in b around 0

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

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

                          if -4.1000000000000002e27 < a < 6.40000000000000019e-116

                          1. Initial program 73.6%

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

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

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

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

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

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

                              \[\leadsto a - \color{blue}{b} \]
                            2. Taylor expanded in a around 0

                              \[\leadsto z - \color{blue}{b} \]
                            3. Step-by-step derivation
                              1. Applied rewrites51.9%

                                \[\leadsto z - \color{blue}{b} \]
                            4. Recombined 2 regimes into one program.
                            5. Final simplification54.8%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.1 \cdot 10^{+27} \lor \neg \left(a \leq 6.4 \cdot 10^{-116}\right):\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;z - b\\ \end{array} \]
                            6. Add Preprocessing

                            Alternative 17: 51.8% accurate, 11.3× speedup?

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

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

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

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

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

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

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

                                \[\leadsto a - \color{blue}{b} \]
                              2. Taylor expanded in b around 0

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

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

                                Alternative 18: 13.0% 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 62.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{-y}{\color{blue}{\left(y + x\right)} + t} \cdot b \]
                                  12. lower-+.f6421.6

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

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

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

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

                                  Developer Target 1: 81.7% 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 2024318 
                                  (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)))