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

Percentage Accurate: 59.9% → 88.0%
Time: 14.7s
Alternatives: 17
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 59.9% accurate, 1.0× speedup?

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

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

Alternative 1: 88.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(y + t\right)\\ t_2 := \frac{\left(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 5 \cdot 10^{+235}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \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 (/ (- (+ (* (+ x y) z) t_1) (* y b)) (+ y (+ x t)))))
   (if (or (<= t_2 (- INFINITY)) (not (<= t_2 5e+235)))
     (- (+ z a) b)
     (/ (- (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 = ((((x + y) * z) + t_1) - (y * b)) / (y + (x + t));
	double tmp;
	if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 5e+235)) {
		tmp = (z + a) - b;
	} 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(Float64(Float64(Float64(Float64(x + y) * z) + t_1) - Float64(y * b)) / Float64(y + Float64(x + t)))
	tmp = 0.0
	if ((t_2 <= Float64(-Inf)) || !(t_2 <= 5e+235))
		tmp = Float64(Float64(z + a) - b);
	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[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 5e+235]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $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 := \frac{\left(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 5 \cdot 10^{+235}\right):\\
\;\;\;\;\left(z + a\right) - b\\

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

    1. Initial program 6.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 72.3%

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

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

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Step-by-step derivation
      1. fma-define99.8%

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

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

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

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

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

    \[\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^{+235}\right):\\ \;\;\;\;\left(z + a\right) - b\\ \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 2: 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 -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+235}\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 (- INFINITY)) (not (<= t_1 5e+235))) (- (+ 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 <= -((double) INFINITY)) || !(t_1 <= 5e+235)) {
		tmp = (z + a) - b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+235)) {
		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 <= -math.inf) or not (t_1 <= 5e+235):
		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 <= Float64(-Inf)) || !(t_1 <= 5e+235))
		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 <= -Inf) || ~((t_1 <= 5e+235)))
		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, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+235]], $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 -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+235}\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)) < -inf.0 or 5.00000000000000027e235 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 6.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 72.3%

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

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

    1. Initial program 99.7%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification88.7%

    \[\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^{+235}\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 3: 63.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -7 \cdot 10^{-208}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t\_1}\\

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-67}:\\
\;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{+33}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.4e-73

    1. Initial program 44.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 74.3%

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

    if -4.4e-73 < y < -6.99999999999999982e-208

    1. Initial program 82.0%

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

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

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

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

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

    if -6.99999999999999982e-208 < y < 4.6000000000000001e-67

    1. Initial program 82.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 66.0%

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

    if 4.6000000000000001e-67 < y < 2.69999999999999991e33

    1. Initial program 72.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 a around inf 49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.69999999999999991e33 < y

    1. Initial program 45.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 41.1%

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

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

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

        \[\leadsto {\left(\frac{\color{blue}{y + \left(x + t\right)}}{y \cdot \left(\left(a + z\right) - b\right)}\right)}^{-1} \]
      4. associate--l+41.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{-73}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-208}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-67}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+33}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{y + \left(x + t\right)}{y}}{a + \left(z - b\right)}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.6% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.8e12 or 2.94999999999999993e35 < y

    1. Initial program 40.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 35.0%

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

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

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

        \[\leadsto {\left(\frac{\color{blue}{y + \left(x + t\right)}}{y \cdot \left(\left(a + z\right) - b\right)}\right)}^{-1} \]
      4. associate--l+34.9%

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

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

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

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

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

    if -8.8e12 < y < -8.2e-143

    1. Initial program 84.2%

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

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

    if -8.2e-143 < y < 2.94999999999999993e35

    1. Initial program 79.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 a around inf 80.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(\left(\left(\frac{y}{x + \left(y + t\right)} + \frac{t}{x + \left(y + t\right)}\right) + \frac{z \cdot \left(y + x\right)}{a \cdot \color{blue}{\left(x + \left(y + t\right)\right)}}\right) - \frac{b \cdot y}{a \cdot \left(t + \left(x + y\right)\right)}\right) \]
      10. associate-/r*78.8%

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

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

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

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

Alternative 5: 66.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -9.8 \cdot 10^{-175}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t\_1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.04e-81

    1. Initial program 44.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 74.3%

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

    if -1.04e-81 < y < -9.79999999999999996e-175

    1. Initial program 87.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 z around 0 68.4%

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

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

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

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

    if -9.79999999999999996e-175 < y < 2.0999999999999999e35

    1. Initial program 79.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 a around inf 80.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(\left(\left(\frac{y}{x + \left(y + t\right)} + \frac{t}{x + \left(y + t\right)}\right) + \frac{z \cdot \left(y + x\right)}{a \cdot \color{blue}{\left(x + \left(y + t\right)\right)}}\right) - \frac{b \cdot y}{a \cdot \left(t + \left(x + y\right)\right)}\right) \]
      10. associate-/r*78.8%

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

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

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

    if 2.0999999999999999e35 < y

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

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

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

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

        \[\leadsto {\left(\frac{\color{blue}{y + \left(x + t\right)}}{y \cdot \left(\left(a + z\right) - b\right)}\right)}^{-1} \]
      4. associate--l+41.7%

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

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

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

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

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

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

Alternative 6: 59.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{-52}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_2}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.20000000000000006e100

    1. Initial program 48.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 a around inf 30.7%

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

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

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

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

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

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

    if -1.20000000000000006e100 < a < -5.1999999999999995e-243 or 2.79999999999999995e-52 < a < 2.00000000000000001e41

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

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

    if -5.1999999999999995e-243 < a < 2.79999999999999995e-52

    1. Initial program 75.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 z around inf 40.9%

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

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

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

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

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

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

    if 2.00000000000000001e41 < a

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 59.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -3.7 \cdot 10^{-241}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.2 \cdot 10^{-51}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_2}\\

\mathbf{elif}\;a \leq 3.05 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.9999999999999999e99 or 3.04999999999999999e41 < a

    1. Initial program 52.5%

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

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

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

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

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

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

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

    if -3.9999999999999999e99 < a < -3.6999999999999999e-241 or 1.2e-51 < a < 3.04999999999999999e41

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

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

    if -3.6999999999999999e-241 < a < 1.2e-51

    1. Initial program 75.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 z around inf 40.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{+99}:\\ \;\;\;\;a \cdot \frac{y + t}{x + \left(y + t\right)}\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-241}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-51}:\\ \;\;\;\;z \cdot \frac{x + y}{x + \left(y + t\right)}\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{+41}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{y + t}{x + \left(y + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 63.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 6.7 \cdot 10^{-65}:\\
\;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\

\mathbf{elif}\;y \leq 2.35 \cdot 10^{+33}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.60000000000000013e-200

    1. Initial program 54.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 67.4%

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

    if -5.60000000000000013e-200 < y < 6.7000000000000004e-65

    1. Initial program 81.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 66.2%

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

    if 6.7000000000000004e-65 < y < 2.3499999999999999e33

    1. Initial program 72.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 a around inf 49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.3499999999999999e33 < y

    1. Initial program 45.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 41.1%

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

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

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

        \[\leadsto {\left(\frac{\color{blue}{y + \left(x + t\right)}}{y \cdot \left(\left(a + z\right) - b\right)}\right)}^{-1} \]
      4. associate--l+41.0%

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

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

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

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

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

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

Alternative 9: 62.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-67}:\\
\;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\

\mathbf{elif}\;y \leq 2.25 \cdot 10^{+33}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.39999999999999965e-200

    1. Initial program 54.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 67.4%

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

    if -6.39999999999999965e-200 < y < 4.6000000000000001e-67

    1. Initial program 81.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 66.2%

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

    if 4.6000000000000001e-67 < y < 2.25e33

    1. Initial program 72.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 a around inf 49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.25e33 < y

    1. Initial program 45.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 41.1%

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

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

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

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

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

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

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

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

Alternative 10: 61.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -2.8 \cdot 10^{-200}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{-68}:\\ \;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{+30}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{a}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ z a) b)))
   (if (<= y -2.8e-200)
     t_1
     (if (<= y 4.3e-68)
       (/ (+ (* x z) (* t a)) (+ x t))
       (if (<= y 1.95e+30) (* (+ y t) (/ a (+ y (+ x t)))) 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 <= -2.8e-200) {
		tmp = t_1;
	} else if (y <= 4.3e-68) {
		tmp = ((x * z) + (t * a)) / (x + t);
	} else if (y <= 1.95e+30) {
		tmp = (y + t) * (a / (y + (x + t)));
	} 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 <= (-2.8d-200)) then
        tmp = t_1
    else if (y <= 4.3d-68) then
        tmp = ((x * z) + (t * a)) / (x + t)
    else if (y <= 1.95d+30) then
        tmp = (y + t) * (a / (y + (x + t)))
    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 <= -2.8e-200) {
		tmp = t_1;
	} else if (y <= 4.3e-68) {
		tmp = ((x * z) + (t * a)) / (x + t);
	} else if (y <= 1.95e+30) {
		tmp = (y + t) * (a / (y + (x + t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + a) - b
	tmp = 0
	if y <= -2.8e-200:
		tmp = t_1
	elif y <= 4.3e-68:
		tmp = ((x * z) + (t * a)) / (x + t)
	elif y <= 1.95e+30:
		tmp = (y + t) * (a / (y + (x + t)))
	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 <= -2.8e-200)
		tmp = t_1;
	elseif (y <= 4.3e-68)
		tmp = Float64(Float64(Float64(x * z) + Float64(t * a)) / Float64(x + t));
	elseif (y <= 1.95e+30)
		tmp = Float64(Float64(y + t) * Float64(a / Float64(y + Float64(x + t))));
	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 <= -2.8e-200)
		tmp = t_1;
	elseif (y <= 4.3e-68)
		tmp = ((x * z) + (t * a)) / (x + t);
	elseif (y <= 1.95e+30)
		tmp = (y + t) * (a / (y + (x + t)));
	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, -2.8e-200], t$95$1, If[LessEqual[y, 4.3e-68], N[(N[(N[(x * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e+30], N[(N[(y + t), $MachinePrecision] * N[(a / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 4.3 \cdot 10^{-68}:\\
\;\;\;\;\frac{x \cdot z + t \cdot a}{x + t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.80000000000000007e-200 or 1.95000000000000005e30 < y

    1. Initial program 50.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 70.7%

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

    if -2.80000000000000007e-200 < y < 4.3000000000000001e-68

    1. Initial program 81.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 66.2%

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

    if 4.3000000000000001e-68 < y < 1.95000000000000005e30

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 58.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{+98} \lor \neg \left(a \leq 3.3 \cdot 10^{+41}\right):\\
\;\;\;\;a \cdot \frac{y + t}{x + \left(y + t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.75e98 or 3.3e41 < a

    1. Initial program 52.5%

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

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

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

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

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

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

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

    if -1.75e98 < a < 3.3e41

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

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

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

Alternative 12: 58.7% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 53.2%

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

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

    if -4.00000000000000019e223 < t < 4.7e82

    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 60.9%

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

    if 4.7e82 < t

    1. Initial program 49.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{t}{t + x}} \]
      2. +-commutative64.7%

        \[\leadsto a \cdot \frac{t}{\color{blue}{x + t}} \]
    12. Simplified64.7%

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

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

Alternative 13: 58.0% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.25e223 or 5.6000000000000001e83 < t

    1. Initial program 50.0%

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

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

    if -2.25e223 < t < 5.6000000000000001e83

    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 60.9%

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

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

Alternative 14: 48.3% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.5000000000000002e104

    1. Initial program 52.3%

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

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

    if -7.5000000000000002e104 < z < 4.1999999999999998e25

    1. Initial program 67.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 57.7%

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

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

    if 4.1999999999999998e25 < z

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

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

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

Alternative 15: 48.2% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.00000000000000073e106 or 1.25e26 < z

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

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

    if -8.00000000000000073e106 < z < 1.25e26

    1. Initial program 67.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 57.7%

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

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

Alternative 16: 44.6% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;z \leq 5 \cdot 10^{+26}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.14999999999999992e104 or 5.0000000000000001e26 < z

    1. Initial program 53.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 53.7%

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

    if -1.14999999999999992e104 < z < 5.0000000000000001e26

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

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

Alternative 17: 32.8% 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 62.3%

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

    \[\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 2024165 
(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)))