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

Percentage Accurate: 60.5% → 88.4%
Time: 9.4s
Alternatives: 14
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 60.5% accurate, 1.0× speedup?

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

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

Alternative 1: 88.4% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(a + z\right) - b\\

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


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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

    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 2.0000000000000001e238 < (/.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 10.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-+.f6484.9

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

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

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

Alternative 2: 87.2% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+238}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-b, t\_4, \mathsf{fma}\left(\mathsf{fma}\left(t\_1, b, \frac{a}{y + x} - \mathsf{fma}\left(t\_1, a, \frac{z}{y + x}\right)\right), t, \mathsf{fma}\left(t\_4, a, z\right)\right)\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.2%

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

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

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

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

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

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

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

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

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

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

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

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

    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 2.0000000000000001e238 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.4% accurate, 0.2× speedup?

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

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+136}:\\
\;\;\;\;\frac{z \cdot x - b \cdot y}{t\_1}\\

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


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

    1. Initial program 17.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-+.f6473.7

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{a \cdot t + \left(y \cdot a + \left(y \cdot z - \color{blue}{y \cdot b}\right)\right)}{t + y} \]
      7. distribute-lft-out--N/A

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

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

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

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

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

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

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

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

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

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

    if -2e51 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999924e-25

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

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

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

    if 9.99999999999999924e-25 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000006e136

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

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

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

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

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

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

Alternative 4: 64.4% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+136}:\\
\;\;\;\;\frac{z \cdot x - b \cdot y}{t\_1}\\

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


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

    1. Initial program 22.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-+.f6474.7

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

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

    if -1e148 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999924e-25

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

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

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

    if 9.99999999999999924e-25 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000006e136

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

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

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

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

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

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

Alternative 5: 87.7% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 6.7%

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

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

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

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

    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. Recombined 2 regimes into one program.
  4. Final simplification88.6%

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

Alternative 6: 64.8% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 34.7%

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

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

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

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

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

    if -1e148 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.9999999999999999e-13

    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-+.f6468.7

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

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

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

Alternative 7: 66.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 8.3 \cdot 10^{+61}:\\
\;\;\;\;\left(\frac{t + y}{\left(y + x\right) + t} - \frac{-z}{a}\right) \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.3000000000000001e-50 or 8.30000000000000051e61 < y

    1. Initial program 43.3%

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

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

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

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

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

    if -1.3000000000000001e-50 < y < 8.30000000000000051e61

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 58.4% accurate, 1.0× speedup?

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

      1. Initial program 37.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-+.f6479.2

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

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

      if -9.9999999999999995e59 < y < 3.10000000000000007e-75

      1. Initial program 74.7%

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

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

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

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

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

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

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

        if 3.10000000000000007e-75 < y < 6.1999999999999998e61

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

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

          \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{a}{\left(y + x\right) + t}} \]
      8. Recombined 3 regimes into one program.
      9. Final simplification69.0%

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

      Alternative 9: 58.4% accurate, 1.7× speedup?

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

        1. Initial program 45.9%

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

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

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

          \[\leadsto \frac{a \cdot t}{\color{blue}{t + x}} \]
        7. Step-by-step derivation
          1. Applied rewrites69.8%

            \[\leadsto a \cdot \color{blue}{\frac{t}{t + x}} \]

          if -3.3e118 < t

          1. Initial program 59.4%

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

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

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

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

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

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

        Alternative 10: 60.0% accurate, 2.4× speedup?

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

          1. Initial program 37.4%

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

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

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

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

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

          if -9.9999999999999995e59 < y < 3.54999999999999996e50

          1. Initial program 74.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-+.f6446.9

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

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

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

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

          Alternative 11: 53.4% accurate, 2.8× speedup?

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

            1. Initial program 53.2%

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

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

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

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

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

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

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

              if -1.1e-111 < z < 1.04999999999999996e-190

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

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

                \[\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 rewrites63.0%

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

              Alternative 12: 57.8% accurate, 3.2× speedup?

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

                1. Initial program 45.9%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(-a\right) \cdot -1 \]
                7. Step-by-step derivation
                  1. Applied rewrites67.8%

                    \[\leadsto \left(-a\right) \cdot -1 \]

                  if -1.26e120 < t

                  1. Initial program 59.4%

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

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

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

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

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

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

                Alternative 13: 52.0% 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 57.2%

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

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

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

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

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

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

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

                  Alternative 14: 13.6% 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 57.2%

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

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

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

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

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

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

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

                    Developer Target 1: 82.1% 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 2024276 
                    (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)))