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

Percentage Accurate: 61.0% → 90.4%
Time: 13.9s
Alternatives: 15
Speedup: 1.1×

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 15 alternatives:

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

Initial Program: 61.0% accurate, 1.0× speedup?

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

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

Alternative 1: 90.4% accurate, 0.1× speedup?

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

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

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

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_5\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(z, \frac{x + y}{b \cdot t\_2}, \frac{y + t}{t\_2} \cdot \frac{a}{b}\right) - \frac{y}{t\_2}\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 or 5.0000000000000001e215 < (/.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 12.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+46.7%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+82.0%

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

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

      \[\leadsto \color{blue}{a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{y + x}{y + \left(t + x\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)) < 5.0000000000000001e215

    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. Step-by-step derivation
      1. fma-define99.1%

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

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

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

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

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

    if +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 0.0%

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

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

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

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

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

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

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

Alternative 2: 90.8% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 10.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+42.4%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+78.7%

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

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

      \[\leadsto \color{blue}{a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{y + x}{y + \left(t + x\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)) < 5.0000000000000001e215

    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. Step-by-step derivation
      1. fma-define99.1%

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

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

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

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

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

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

Alternative 3: 90.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\ \mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 5 \cdot 10^{+215}\right):\\ \;\;\;\;a \cdot \frac{y + t}{t\_1} + z \cdot \frac{x + y}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t)))
        (t_2 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) t_1)))
   (if (or (<= t_2 (- INFINITY)) (not (<= t_2 5e+215)))
     (+ (* a (/ (+ y t) t_1)) (* z (/ (+ x y) t_1)))
     t_2)))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
	double tmp;
	if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 5e+215)) {
		tmp = (a * ((y + t) / t_1)) + (z * ((x + y) / 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 = y + (x + t);
	double t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
	double tmp;
	if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 5e+215)) {
		tmp = (a * ((y + t) / t_1)) + (z * ((x + y) / t_1));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1
	tmp = 0
	if (t_2 <= -math.inf) or not (t_2 <= 5e+215):
		tmp = (a * ((y + t) / t_1)) + (z * ((x + y) / t_1))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1)
	tmp = 0.0
	if ((t_2 <= Float64(-Inf)) || !(t_2 <= 5e+215))
		tmp = Float64(Float64(a * Float64(Float64(y + t) / t_1)) + Float64(z * Float64(Float64(x + y) / t_1)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (x + t);
	t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
	tmp = 0.0;
	if ((t_2 <= -Inf) || ~((t_2 <= 5e+215)))
		tmp = (a * ((y + t) / t_1)) + (z * ((x + y) / t_1));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 5e+215]], $MachinePrecision]], N[(N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 5 \cdot 10^{+215}\right):\\
\;\;\;\;a \cdot \frac{y + t}{t\_1} + z \cdot \frac{x + y}{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 5.0000000000000001e215 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 10.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+42.4%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+78.7%

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

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

      \[\leadsto \color{blue}{a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{y + x}{y + \left(t + x\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)) < 5.0000000000000001e215

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

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

Alternative 4: 88.0% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 11.5%

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

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

    if -5.00000000000000009e305 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000001e215

    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 simplification87.3%

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

Alternative 5: 57.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq -4.2 \cdot 10^{+67}:\\
\;\;\;\;a \cdot \frac{y + t}{x + \left(y + t\right)}\\

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

\mathbf{elif}\;b \leq 10^{+116}:\\
\;\;\;\;z + a \cdot \frac{y}{x + y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.25000000000000006e148 or 1.00000000000000002e116 < b

    1. Initial program 55.8%

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

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

        \[\leadsto -1 \cdot \frac{\color{blue}{y \cdot b}}{t + \left(x + y\right)} \]
      2. +-commutative35.1%

        \[\leadsto -1 \cdot \frac{y \cdot b}{\color{blue}{\left(x + y\right) + t}} \]
      3. associate-+r+35.1%

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

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

        \[\leadsto \color{blue}{-y \cdot \frac{b}{x + \left(y + t\right)}} \]
      6. distribute-lft-neg-in58.3%

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

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

    if -1.25000000000000006e148 < b < -4.2000000000000003e67

    1. Initial program 75.8%

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

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

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

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

        \[\leadsto a \cdot \frac{y + t}{\color{blue}{\left(x + y\right) + t}} \]
      4. associate-+r+66.4%

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

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

    if -4.2000000000000003e67 < b < -1.21999999999999997e-151

    1. Initial program 69.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 73.5%

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

    if -1.21999999999999997e-151 < b < 1.00000000000000002e116

    1. Initial program 59.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+71.7%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+93.3%

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

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

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

      \[\leadsto \color{blue}{z + \frac{a \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. associate-/l*67.4%

        \[\leadsto z + \color{blue}{a \cdot \frac{y}{x + y}} \]
    11. Simplified67.4%

      \[\leadsto \color{blue}{z + a \cdot \frac{y}{x + y}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification65.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.25 \cdot 10^{+148}:\\ \;\;\;\;y \cdot \frac{b}{\left(-x\right) - \left(y + t\right)}\\ \mathbf{elif}\;b \leq -4.2 \cdot 10^{+67}:\\ \;\;\;\;a \cdot \frac{y + t}{x + \left(y + t\right)}\\ \mathbf{elif}\;b \leq -1.22 \cdot 10^{-151}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;b \leq 10^{+116}:\\ \;\;\;\;z + a \cdot \frac{y}{x + y}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{b}{\left(-x\right) - \left(y + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 58.1% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;b \leq 8.5 \cdot 10^{+115}:\\
\;\;\;\;z + a \cdot \frac{y}{x + y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.29999999999999998e155 or 8.50000000000000057e115 < b

    1. Initial program 55.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 b around inf 35.5%

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

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

        \[\leadsto -1 \cdot \frac{y \cdot b}{\color{blue}{\left(x + y\right) + t}} \]
      3. associate-+r+35.5%

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

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

        \[\leadsto \color{blue}{-y \cdot \frac{b}{x + \left(y + t\right)}} \]
      6. distribute-lft-neg-in59.0%

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

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

    if -2.29999999999999998e155 < b < -9.0000000000000008e-152

    1. Initial program 71.6%

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

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

    if -9.0000000000000008e-152 < b < 8.50000000000000057e115

    1. Initial program 59.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+71.7%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+93.3%

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

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

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

      \[\leadsto \color{blue}{z + \frac{a \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. associate-/l*67.4%

        \[\leadsto z + \color{blue}{a \cdot \frac{y}{x + y}} \]
    11. Simplified67.4%

      \[\leadsto \color{blue}{z + a \cdot \frac{y}{x + y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.8%

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

Alternative 7: 66.6% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 1620000:\\
\;\;\;\;a + z \cdot \frac{x}{x + t}\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{+174}:\\
\;\;\;\;z + a \cdot \frac{y}{x + y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.9000000000000003e-28 or 5.7999999999999999e174 < y

    1. Initial program 39.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 74.4%

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

    if -4.9000000000000003e-28 < y < 1.62e6

    1. Initial program 72.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+64.7%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+82.3%

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

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

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

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

      \[\leadsto a \cdot 1 + z \cdot \color{blue}{\frac{x}{t + x}} \]
    11. Step-by-step derivation
      1. +-commutative61.2%

        \[\leadsto a \cdot 1 + z \cdot \frac{x}{\color{blue}{x + t}} \]
    12. Simplified61.2%

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

    if 1.62e6 < y < 5.7999999999999999e174

    1. Initial program 67.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+71.0%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+78.2%

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

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

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

      \[\leadsto \color{blue}{z + \frac{a \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. associate-/l*71.0%

        \[\leadsto z + \color{blue}{a \cdot \frac{y}{x + y}} \]
    11. Simplified71.0%

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

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

Alternative 8: 67.2% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;z + a \cdot \frac{y}{x + y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.50000000000000006e145

    1. Initial program 52.0%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in t around 0 70.8%

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

    if -7.50000000000000006e145 < x < 2.79999999999999981e101

    1. Initial program 67.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+65.4%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+74.5%

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

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

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

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

    if 2.79999999999999981e101 < x

    1. Initial program 43.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+45.5%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+79.2%

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

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

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

      \[\leadsto \color{blue}{z + \frac{a \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. associate-/l*62.2%

        \[\leadsto z + \color{blue}{a \cdot \frac{y}{x + y}} \]
    11. Simplified62.2%

      \[\leadsto \color{blue}{z + a \cdot \frac{y}{x + y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification69.3%

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

Alternative 9: 59.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \frac{t}{x + t}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+180}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.65 \cdot 10^{+73}:\\
\;\;\;\;z + a \cdot \frac{y}{x + y}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.1e180 or 9.5e178 < t

    1. Initial program 52.9%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in a around inf 29.3%

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

        \[\leadsto \color{blue}{a \cdot \frac{t}{t + x}} \]
    6. Simplified67.9%

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

    if -1.1e180 < t < 2.64999999999999998e73

    1. Initial program 65.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 54.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+58.5%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+76.9%

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

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

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

      \[\leadsto \color{blue}{z + \frac{a \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. associate-/l*62.3%

        \[\leadsto z + \color{blue}{a \cdot \frac{y}{x + y}} \]
    11. Simplified62.3%

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

    if 2.64999999999999998e73 < t < 9.5e178

    1. Initial program 46.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 62.5%

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

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

Alternative 10: 61.8% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;x \leq 5.2 \cdot 10^{+63}:\\
\;\;\;\;\left(z + a\right) - b\\

\mathbf{else}:\\
\;\;\;\;z + a \cdot \frac{y}{x + y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.1e124

    1. Initial program 55.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 42.4%

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in t around 0 66.6%

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

    if -1.1e124 < x < 5.2000000000000002e63

    1. Initial program 66.7%

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

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

    if 5.2000000000000002e63 < x

    1. Initial program 47.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+52.4%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+83.2%

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

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

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

      \[\leadsto \color{blue}{z + \frac{a \cdot y}{x + y}} \]
    10. Step-by-step derivation
      1. associate-/l*63.9%

        \[\leadsto z + \color{blue}{a \cdot \frac{y}{x + y}} \]
    11. Simplified63.9%

      \[\leadsto \color{blue}{z + a \cdot \frac{y}{x + y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.7%

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

Alternative 11: 59.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+181} \lor \neg \left(t \leq 1.12 \cdot 10^{+179}\right):\\
\;\;\;\;a \cdot \frac{t}{x + t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.35000000000000004e181 or 1.11999999999999997e179 < t

    1. Initial program 52.9%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in a around inf 29.3%

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

        \[\leadsto \color{blue}{a \cdot \frac{t}{t + x}} \]
    6. Simplified67.9%

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

    if -1.35000000000000004e181 < t < 1.11999999999999997e179

    1. Initial program 62.8%

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

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

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

Alternative 12: 58.8% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2e180 or 8.79999999999999989e178 < t

    1. Initial program 52.9%

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

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

    if -2e180 < t < 8.79999999999999989e178

    1. Initial program 62.8%

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

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

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

Alternative 13: 43.6% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+170}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+20}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= z -1.05e+170) z (if (<= z 2.5e+20) a z)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -1.05e+170) {
		tmp = z;
	} else if (z <= 2.5e+20) {
		tmp = a;
	} else {
		tmp = z;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (z <= (-1.05d+170)) then
        tmp = z
    else if (z <= 2.5d+20) then
        tmp = a
    else
        tmp = z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -1.05e+170) {
		tmp = z;
	} else if (z <= 2.5e+20) {
		tmp = a;
	} else {
		tmp = z;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -1.05e+170:
		tmp = z
	elif z <= 2.5e+20:
		tmp = a
	else:
		tmp = z
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -1.05e+170)
		tmp = z;
	elseif (z <= 2.5e+20)
		tmp = a;
	else
		tmp = z;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -1.05e+170)
		tmp = z;
	elseif (z <= 2.5e+20)
		tmp = a;
	else
		tmp = z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.05e+170], z, If[LessEqual[z, 2.5e+20], a, z]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+170}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+20}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.04999999999999999e170 or 2.5e20 < z

    1. Initial program 46.9%

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

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

    if -1.04999999999999999e170 < z < 2.5e20

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

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

Alternative 14: 52.1% accurate, 2.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.50000000000000019e111

    1. Initial program 50.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 x around inf 47.7%

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

    if -9.50000000000000019e111 < x

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t + y}{t + \left(x + y\right)}} + \frac{z \cdot \left(x + y\right)}{t + \left(x + y\right)} \]
      2. associate-+r+62.9%

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

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

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

        \[\leadsto a \cdot \frac{t + y}{y + \left(t + x\right)} + z \cdot \frac{\color{blue}{y + x}}{t + \left(x + y\right)} \]
      6. associate-+r+75.9%

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

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

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

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

        \[\leadsto \color{blue}{z + a} \]
    11. Simplified53.5%

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

Alternative 15: 32.1% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 60.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 t around inf 34.1%

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

Developer Target 1: 82.3% 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 2024133 
(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)))