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

Percentage Accurate: 60.4% → 88.0%
Time: 13.2s
Alternatives: 17
Speedup: 1.0×

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: 60.4% 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.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + \left(x \cdot z + y \cdot t\_3\right)}{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 4.9999999999999999e284 < (/.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.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 75.6%

      \[\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)) < 4.9999999999999999e284

    1. Initial program 99.6%

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

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

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

Alternative 2: 65.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t \cdot a + x \cdot z}{x + t}\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{1}{\frac{\frac{t\_2}{y}}{a + \left(z - b\right)}}\\ \mathbf{if}\;y \leq -2.7 \cdot 10^{+156}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{+111}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-137}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-226}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-265}:\\ \;\;\;\;\left(z + \frac{y \cdot a}{x}\right) - \frac{y \cdot b}{x}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-135}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+49}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ (* t a) (* x z)) (+ x t)))
        (t_2 (+ y (+ x t)))
        (t_3 (/ 1.0 (/ (/ t_2 y) (+ a (- z b))))))
   (if (<= y -2.7e+156)
     t_3
     (if (<= y -5.2e+111)
       (- (+ z a) b)
       (if (<= y -6e-137)
         t_3
         (if (<= y -1.15e-226)
           t_1
           (if (<= y -2.1e-265)
             (- (+ z (/ (* y a) x)) (/ (* y b) x))
             (if (<= y 1.7e-135)
               t_1
               (if (<= y 1.3e+49)
                 (/ (- (* z (+ x y)) (* y b)) t_2)
                 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((t * a) + (x * z)) / (x + t);
	double t_2 = y + (x + t);
	double t_3 = 1.0 / ((t_2 / y) / (a + (z - b)));
	double tmp;
	if (y <= -2.7e+156) {
		tmp = t_3;
	} else if (y <= -5.2e+111) {
		tmp = (z + a) - b;
	} else if (y <= -6e-137) {
		tmp = t_3;
	} else if (y <= -1.15e-226) {
		tmp = t_1;
	} else if (y <= -2.1e-265) {
		tmp = (z + ((y * a) / x)) - ((y * b) / x);
	} else if (y <= 1.7e-135) {
		tmp = t_1;
	} else if (y <= 1.3e+49) {
		tmp = ((z * (x + y)) - (y * b)) / t_2;
	} 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 = ((t * a) + (x * z)) / (x + t)
    t_2 = y + (x + t)
    t_3 = 1.0d0 / ((t_2 / y) / (a + (z - b)))
    if (y <= (-2.7d+156)) then
        tmp = t_3
    else if (y <= (-5.2d+111)) then
        tmp = (z + a) - b
    else if (y <= (-6d-137)) then
        tmp = t_3
    else if (y <= (-1.15d-226)) then
        tmp = t_1
    else if (y <= (-2.1d-265)) then
        tmp = (z + ((y * a) / x)) - ((y * b) / x)
    else if (y <= 1.7d-135) then
        tmp = t_1
    else if (y <= 1.3d+49) then
        tmp = ((z * (x + y)) - (y * b)) / t_2
    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 = ((t * a) + (x * z)) / (x + t);
	double t_2 = y + (x + t);
	double t_3 = 1.0 / ((t_2 / y) / (a + (z - b)));
	double tmp;
	if (y <= -2.7e+156) {
		tmp = t_3;
	} else if (y <= -5.2e+111) {
		tmp = (z + a) - b;
	} else if (y <= -6e-137) {
		tmp = t_3;
	} else if (y <= -1.15e-226) {
		tmp = t_1;
	} else if (y <= -2.1e-265) {
		tmp = (z + ((y * a) / x)) - ((y * b) / x);
	} else if (y <= 1.7e-135) {
		tmp = t_1;
	} else if (y <= 1.3e+49) {
		tmp = ((z * (x + y)) - (y * b)) / t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((t * a) + (x * z)) / (x + t)
	t_2 = y + (x + t)
	t_3 = 1.0 / ((t_2 / y) / (a + (z - b)))
	tmp = 0
	if y <= -2.7e+156:
		tmp = t_3
	elif y <= -5.2e+111:
		tmp = (z + a) - b
	elif y <= -6e-137:
		tmp = t_3
	elif y <= -1.15e-226:
		tmp = t_1
	elif y <= -2.1e-265:
		tmp = (z + ((y * a) / x)) - ((y * b) / x)
	elif y <= 1.7e-135:
		tmp = t_1
	elif y <= 1.3e+49:
		tmp = ((z * (x + y)) - (y * b)) / t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t))
	t_2 = Float64(y + Float64(x + t))
	t_3 = Float64(1.0 / Float64(Float64(t_2 / y) / Float64(a + Float64(z - b))))
	tmp = 0.0
	if (y <= -2.7e+156)
		tmp = t_3;
	elseif (y <= -5.2e+111)
		tmp = Float64(Float64(z + a) - b);
	elseif (y <= -6e-137)
		tmp = t_3;
	elseif (y <= -1.15e-226)
		tmp = t_1;
	elseif (y <= -2.1e-265)
		tmp = Float64(Float64(z + Float64(Float64(y * a) / x)) - Float64(Float64(y * b) / x));
	elseif (y <= 1.7e-135)
		tmp = t_1;
	elseif (y <= 1.3e+49)
		tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_2);
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((t * a) + (x * z)) / (x + t);
	t_2 = y + (x + t);
	t_3 = 1.0 / ((t_2 / y) / (a + (z - b)));
	tmp = 0.0;
	if (y <= -2.7e+156)
		tmp = t_3;
	elseif (y <= -5.2e+111)
		tmp = (z + a) - b;
	elseif (y <= -6e-137)
		tmp = t_3;
	elseif (y <= -1.15e-226)
		tmp = t_1;
	elseif (y <= -2.1e-265)
		tmp = (z + ((y * a) / x)) - ((y * b) / x);
	elseif (y <= 1.7e-135)
		tmp = t_1;
	elseif (y <= 1.3e+49)
		tmp = ((z * (x + y)) - (y * b)) / t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 / N[(N[(t$95$2 / y), $MachinePrecision] / N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+156], t$95$3, If[LessEqual[y, -5.2e+111], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[y, -6e-137], t$95$3, If[LessEqual[y, -1.15e-226], t$95$1, If[LessEqual[y, -2.1e-265], N[(N[(z + N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-135], t$95$1, If[LessEqual[y, 1.3e+49], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -6 \cdot 10^{-137}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq -1.15 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 1.7 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.3 \cdot 10^{+49}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t\_2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.7e156 or -5.1999999999999997e111 < y < -5.9999999999999996e-137 or 1.29999999999999994e49 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7e156 < y < -5.1999999999999997e111

    1. Initial program 31.3%

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

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

    if -5.9999999999999996e-137 < y < -1.15e-226 or -2.10000000000000004e-265 < y < 1.69999999999999995e-135

    1. Initial program 79.7%

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

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

    if -1.15e-226 < y < -2.10000000000000004e-265

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

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

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

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

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

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

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

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

    if 1.69999999999999995e-135 < y < 1.29999999999999994e49

    1. Initial program 77.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+156}:\\ \;\;\;\;\frac{1}{\frac{\frac{y + \left(x + t\right)}{y}}{a + \left(z - b\right)}}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{+111}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-137}:\\ \;\;\;\;\frac{1}{\frac{\frac{y + \left(x + t\right)}{y}}{a + \left(z - b\right)}}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-226}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-265}:\\ \;\;\;\;\left(z + \frac{y \cdot a}{x}\right) - \frac{y \cdot b}{x}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-135}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+49}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{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 3: 64.6% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;y \leq -8.1 \cdot 10^{-137}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -1.15 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 1.55 \cdot 10^{-78}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.7000000000000001e164 or -5.1999999999999997e111 < y < -8.1000000000000003e-137 or 1.55000000000000009e-78 < y

    1. Initial program 51.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 41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7000000000000001e164 < y < -5.1999999999999997e111

    1. Initial program 31.3%

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

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

    if -8.1000000000000003e-137 < y < -1.15e-226 or -2.10000000000000004e-265 < y < 1.55000000000000009e-78

    1. Initial program 78.4%

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

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

    if -1.15e-226 < y < -2.10000000000000004e-265

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{+164}:\\ \;\;\;\;\frac{1}{\frac{\frac{y + \left(x + t\right)}{y}}{a + \left(z - b\right)}}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{+111}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -8.1 \cdot 10^{-137}:\\ \;\;\;\;\frac{1}{\frac{\frac{y + \left(x + t\right)}{y}}{a + \left(z - b\right)}}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-226}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-265}:\\ \;\;\;\;\left(z + \frac{y \cdot a}{x}\right) - \frac{y \cdot b}{x}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-78}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{y + \left(x + t\right)}{y}}{a + \left(z - b\right)}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 68.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{1}{\frac{\frac{t\_1}{y}}{a + \left(z - b\right)}}\\ \mathbf{if}\;y \leq -4.5 \cdot 10^{+162}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{+111}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -8.1 \cdot 10^{-137} \lor \neg \left(y \leq 4200000000\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a + z \cdot \left(x + y\right)}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t))) (t_2 (/ 1.0 (/ (/ t_1 y) (+ a (- z b))))))
   (if (<= y -4.5e+162)
     t_2
     (if (<= y -5.2e+111)
       (- (+ z a) b)
       (if (or (<= y -8.1e-137) (not (<= y 4200000000.0)))
         t_2
         (/ (+ (* (+ y t) a) (* z (+ x y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = 1.0 / ((t_1 / y) / (a + (z - b)));
	double tmp;
	if (y <= -4.5e+162) {
		tmp = t_2;
	} else if (y <= -5.2e+111) {
		tmp = (z + a) - b;
	} else if ((y <= -8.1e-137) || !(y <= 4200000000.0)) {
		tmp = t_2;
	} else {
		tmp = (((y + t) * a) + (z * (x + y))) / t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y + (x + t)
    t_2 = 1.0d0 / ((t_1 / y) / (a + (z - b)))
    if (y <= (-4.5d+162)) then
        tmp = t_2
    else if (y <= (-5.2d+111)) then
        tmp = (z + a) - b
    else if ((y <= (-8.1d-137)) .or. (.not. (y <= 4200000000.0d0))) then
        tmp = t_2
    else
        tmp = (((y + t) * a) + (z * (x + y))) / 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 t_2 = 1.0 / ((t_1 / y) / (a + (z - b)));
	double tmp;
	if (y <= -4.5e+162) {
		tmp = t_2;
	} else if (y <= -5.2e+111) {
		tmp = (z + a) - b;
	} else if ((y <= -8.1e-137) || !(y <= 4200000000.0)) {
		tmp = t_2;
	} else {
		tmp = (((y + t) * a) + (z * (x + y))) / t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	t_2 = 1.0 / ((t_1 / y) / (a + (z - b)))
	tmp = 0
	if y <= -4.5e+162:
		tmp = t_2
	elif y <= -5.2e+111:
		tmp = (z + a) - b
	elif (y <= -8.1e-137) or not (y <= 4200000000.0):
		tmp = t_2
	else:
		tmp = (((y + t) * a) + (z * (x + y))) / t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	t_2 = Float64(1.0 / Float64(Float64(t_1 / y) / Float64(a + Float64(z - b))))
	tmp = 0.0
	if (y <= -4.5e+162)
		tmp = t_2;
	elseif (y <= -5.2e+111)
		tmp = Float64(Float64(z + a) - b);
	elseif ((y <= -8.1e-137) || !(y <= 4200000000.0))
		tmp = t_2;
	else
		tmp = Float64(Float64(Float64(Float64(y + t) * a) + Float64(z * Float64(x + y))) / t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (x + t);
	t_2 = 1.0 / ((t_1 / y) / (a + (z - b)));
	tmp = 0.0;
	if (y <= -4.5e+162)
		tmp = t_2;
	elseif (y <= -5.2e+111)
		tmp = (z + a) - b;
	elseif ((y <= -8.1e-137) || ~((y <= 4200000000.0)))
		tmp = t_2;
	else
		tmp = (((y + t) * a) + (z * (x + y))) / 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]}, Block[{t$95$2 = N[(1.0 / N[(N[(t$95$1 / y), $MachinePrecision] / N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+162], t$95$2, If[LessEqual[y, -5.2e+111], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[Or[LessEqual[y, -8.1e-137], N[Not[LessEqual[y, 4200000000.0]], $MachinePrecision]], t$95$2, N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -8.1 \cdot 10^{-137} \lor \neg \left(y \leq 4200000000\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.49999999999999972e162 or -5.1999999999999997e111 < y < -8.1000000000000003e-137 or 4.2e9 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999972e162 < y < -5.1999999999999997e111

    1. Initial program 31.3%

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

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

    if -8.1000000000000003e-137 < y < 4.2e9

    1. Initial program 76.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+162}:\\ \;\;\;\;\frac{1}{\frac{\frac{y + \left(x + t\right)}{y}}{a + \left(z - b\right)}}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{+111}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -8.1 \cdot 10^{-137} \lor \neg \left(y \leq 4200000000\right):\\ \;\;\;\;\frac{1}{\frac{\frac{y + \left(x + t\right)}{y}}{a + \left(z - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a + z \cdot \left(x + y\right)}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 60.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := \frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{if}\;y \leq -5 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.05 \cdot 10^{-139}:\\ \;\;\;\;\frac{y \cdot t\_1}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -1.18 \cdot 10^{-226}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-265}:\\ \;\;\;\;\left(z + \frac{y \cdot a}{x}\right) - \frac{y \cdot b}{x}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-157}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ z a) b)) (t_2 (/ (+ (* t a) (* x z)) (+ x t))))
   (if (<= y -5e+111)
     t_1
     (if (<= y -3.05e-139)
       (/ (* y t_1) (+ y (+ x t)))
       (if (<= y -1.18e-226)
         t_2
         (if (<= y -2.1e-265)
           (- (+ z (/ (* y a) x)) (/ (* y b) x))
           (if (<= y 3.1e-157) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + a) - b;
	double t_2 = ((t * a) + (x * z)) / (x + t);
	double tmp;
	if (y <= -5e+111) {
		tmp = t_1;
	} else if (y <= -3.05e-139) {
		tmp = (y * t_1) / (y + (x + t));
	} else if (y <= -1.18e-226) {
		tmp = t_2;
	} else if (y <= -2.1e-265) {
		tmp = (z + ((y * a) / x)) - ((y * b) / x);
	} else if (y <= 3.1e-157) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (z + a) - b
    t_2 = ((t * a) + (x * z)) / (x + t)
    if (y <= (-5d+111)) then
        tmp = t_1
    else if (y <= (-3.05d-139)) then
        tmp = (y * t_1) / (y + (x + t))
    else if (y <= (-1.18d-226)) then
        tmp = t_2
    else if (y <= (-2.1d-265)) then
        tmp = (z + ((y * a) / x)) - ((y * b) / x)
    else if (y <= 3.1d-157) then
        tmp = t_2
    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 t_2 = ((t * a) + (x * z)) / (x + t);
	double tmp;
	if (y <= -5e+111) {
		tmp = t_1;
	} else if (y <= -3.05e-139) {
		tmp = (y * t_1) / (y + (x + t));
	} else if (y <= -1.18e-226) {
		tmp = t_2;
	} else if (y <= -2.1e-265) {
		tmp = (z + ((y * a) / x)) - ((y * b) / x);
	} else if (y <= 3.1e-157) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + a) - b
	t_2 = ((t * a) + (x * z)) / (x + t)
	tmp = 0
	if y <= -5e+111:
		tmp = t_1
	elif y <= -3.05e-139:
		tmp = (y * t_1) / (y + (x + t))
	elif y <= -1.18e-226:
		tmp = t_2
	elif y <= -2.1e-265:
		tmp = (z + ((y * a) / x)) - ((y * b) / x)
	elif y <= 3.1e-157:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + a) - b)
	t_2 = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t))
	tmp = 0.0
	if (y <= -5e+111)
		tmp = t_1;
	elseif (y <= -3.05e-139)
		tmp = Float64(Float64(y * t_1) / Float64(y + Float64(x + t)));
	elseif (y <= -1.18e-226)
		tmp = t_2;
	elseif (y <= -2.1e-265)
		tmp = Float64(Float64(z + Float64(Float64(y * a) / x)) - Float64(Float64(y * b) / x));
	elseif (y <= 3.1e-157)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + a) - b;
	t_2 = ((t * a) + (x * z)) / (x + t);
	tmp = 0.0;
	if (y <= -5e+111)
		tmp = t_1;
	elseif (y <= -3.05e-139)
		tmp = (y * t_1) / (y + (x + t));
	elseif (y <= -1.18e-226)
		tmp = t_2;
	elseif (y <= -2.1e-265)
		tmp = (z + ((y * a) / x)) - ((y * b) / x);
	elseif (y <= 3.1e-157)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+111], t$95$1, If[LessEqual[y, -3.05e-139], N[(N[(y * t$95$1), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.18e-226], t$95$2, If[LessEqual[y, -2.1e-265], N[(N[(z + N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e-157], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -3.05 \cdot 10^{-139}:\\
\;\;\;\;\frac{y \cdot t\_1}{y + \left(x + t\right)}\\

\mathbf{elif}\;y \leq -1.18 \cdot 10^{-226}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 3.1 \cdot 10^{-157}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.9999999999999997e111 or 3.0999999999999998e-157 < y

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

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

    if -4.9999999999999997e111 < y < -3.0499999999999999e-139

    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 y around inf 62.9%

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

    if -3.0499999999999999e-139 < y < -1.1799999999999999e-226 or -2.10000000000000004e-265 < y < 3.0999999999999998e-157

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

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

    if -1.1799999999999999e-226 < y < -2.10000000000000004e-265

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+111}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -3.05 \cdot 10^{-139}:\\ \;\;\;\;\frac{y \cdot \left(\left(z + a\right) - b\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -1.18 \cdot 10^{-226}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-265}:\\ \;\;\;\;\left(z + \frac{y \cdot a}{x}\right) - \frac{y \cdot b}{x}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-157}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 58.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.55 \cdot 10^{-121}:\\
\;\;\;\;y \cdot \frac{z - b}{y + t}\\

\mathbf{elif}\;a \leq 2.7 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.00000000000000011e32 or 2.7000000000000002e194 < a

    1. Initial program 49.6%

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

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

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

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

    if -2.00000000000000011e32 < a < -1.89999999999999997e-131 or 2.5499999999999999e-121 < a < 2.7000000000000002e194

    1. Initial program 64.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.4%

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

    if -1.89999999999999997e-131 < a < -6.10000000000000034e-299

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

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

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

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

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

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

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

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

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

    if -6.10000000000000034e-299 < a < 2.5499999999999999e-121

    1. Initial program 62.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 39.3%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - b}{t + y}} \]
    7. Simplified65.6%

      \[\leadsto \color{blue}{y \cdot \frac{z - b}{t + y}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification68.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{+32}:\\ \;\;\;\;a \cdot \frac{y + t}{t + \left(x + y\right)}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-131}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;a \leq -6.1 \cdot 10^{-299}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{-121}:\\ \;\;\;\;y \cdot \frac{z - b}{y + t}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+194}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{y + t}{t + \left(x + y\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 61.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -1.18 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 3.7 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 49.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 39.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.7999999999999999e-137 < y < -1.1799999999999999e-226 or -1.7e-265 < y < 3.69999999999999977e-160

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

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

    if -1.1799999999999999e-226 < y < -1.7e-265

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

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

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

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

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

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

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

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

    if 3.69999999999999977e-160 < y

    1. Initial program 53.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.8 \cdot 10^{-137}:\\ \;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{y + t}\\ \mathbf{elif}\;y \leq -1.18 \cdot 10^{-226}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-265}:\\ \;\;\;\;\left(z + \frac{y \cdot a}{x}\right) - \frac{y \cdot b}{x}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-160}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 59.2% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.54999999999999997e32 or 8.99999999999999952e97 < a

    1. Initial program 48.8%

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

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

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

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

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

    if -1.54999999999999997e32 < a < -1.15000000000000011e-131

    1. Initial program 76.0%

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

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

    if -1.15000000000000011e-131 < a < -4.0000000000000001e-300

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e-300 < a < 8.99999999999999952e97

    1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.55 \cdot 10^{+32}:\\ \;\;\;\;a \cdot \frac{y + t}{t + \left(x + y\right)}\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-131}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-300}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+97}:\\ \;\;\;\;\left(a + \left(z - b\right)\right) \cdot \frac{y}{y + t}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{y + t}{t + \left(x + y\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 57.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-297}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-122}:\\
\;\;\;\;y \cdot \frac{z - b}{y + t}\\

\mathbf{elif}\;a \leq 1.52 \cdot 10^{+193}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.00000000000000011e32 or 1.52e193 < a

    1. Initial program 49.6%

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

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

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

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

    if -2.00000000000000011e32 < a < -4.20000000000000027e-297 or 5.40000000000000019e-122 < a < 1.52e193

    1. Initial program 65.1%

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

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

    if -4.20000000000000027e-297 < a < 5.40000000000000019e-122

    1. Initial program 62.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 39.3%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - b}{t + y}} \]
    7. Simplified65.6%

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

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

Alternative 10: 62.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 49.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 39.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.4999999999999995e-137 < y < 3.0999999999999998e-157

    1. Initial program 78.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 0 64.8%

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

    if 3.0999999999999998e-157 < y

    1. Initial program 53.0%

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

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

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

Alternative 11: 57.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+95} \lor \neg \left(b \leq 2 \cdot 10^{+161}\right):\\
\;\;\;\;b \cdot \frac{y}{\left(-y\right) - \left(x + t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.00000000000000016e95 or 2.0000000000000001e161 < b

    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 b around inf 30.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \frac{-y}{\color{blue}{\left(y + t\right) + x}} \]
      10. associate-+l+58.3%

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

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

    if -8.00000000000000016e95 < b < 2.0000000000000001e161

    1. Initial program 62.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 65.6%

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

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

Alternative 12: 51.6% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{+223} \lor \neg \left(b \leq 2.4 \cdot 10^{+190}\right):\\
\;\;\;\;-b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.3999999999999999e223 or 2.3999999999999999e190 < b

    1. Initial program 40.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot b} \]
    7. Step-by-step derivation
      1. neg-mul-141.9%

        \[\leadsto \color{blue}{-b} \]
    8. Simplified41.9%

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

    if -4.3999999999999999e223 < b < 2.3999999999999999e190

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

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

      \[\leadsto \color{blue}{a + z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.4 \cdot 10^{+223} \lor \neg \left(b \leq 2.4 \cdot 10^{+190}\right):\\ \;\;\;\;-b\\ \mathbf{else}:\\ \;\;\;\;z + a\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 52.5% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.75 \cdot 10^{+219}:\\
\;\;\;\;a - b\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{+185}:\\
\;\;\;\;z + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.74999999999999986e219

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

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

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

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

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

    if -2.74999999999999986e219 < b < 2.60000000000000001e185

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

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

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

    if 2.60000000000000001e185 < b

    1. Initial program 43.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.75 \cdot 10^{+219}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{+185}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 51.9% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.24999999999999994e222

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

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

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

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

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

    if -2.24999999999999994e222 < b < 2.5000000000000001e188

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

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

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

    if 2.5000000000000001e188 < b

    1. Initial program 43.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot b} \]
    7. Step-by-step derivation
      1. neg-mul-137.2%

        \[\leadsto \color{blue}{-b} \]
    8. Simplified37.2%

      \[\leadsto \color{blue}{-b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.25 \cdot 10^{+222}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+188}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;-b\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 42.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.8 \cdot 10^{-19}:\\
\;\;\;\;a\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{-156}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.7999999999999999e-19 or 3.2999999999999999e-156 < a

    1. Initial program 56.8%

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

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

    if -7.7999999999999999e-19 < a < 3.2999999999999999e-156

    1. Initial program 64.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 44.3%

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

Alternative 16: 57.1% accurate, 2.1× speedup?

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

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

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


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

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

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

    if -2.3500000000000001e145 < t

    1. Initial program 60.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 60.4%

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

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

Alternative 17: 32.2% 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 59.8%

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

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

Developer target: 82.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + t\right) + y\\ t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\ t_3 := \frac{t\_2}{t\_1}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\ \;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ x t) y))
        (t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
        (t_3 (/ t_2 t_1))
        (t_4 (- (+ z a) b)))
   (if (< t_3 -3.5813117084150564e+153)
     t_4
     (if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + t) + y;
	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
	double t_3 = t_2 / t_1;
	double t_4 = (z + a) - b;
	double tmp;
	if (t_3 < -3.5813117084150564e+153) {
		tmp = t_4;
	} else if (t_3 < 1.2285964308315609e+82) {
		tmp = 1.0 / (t_1 / t_2);
	} else {
		tmp = t_4;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = (x + t) + y
    t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
    t_3 = t_2 / t_1
    t_4 = (z + a) - b
    if (t_3 < (-3.5813117084150564d+153)) then
        tmp = t_4
    else if (t_3 < 1.2285964308315609d+82) then
        tmp = 1.0d0 / (t_1 / t_2)
    else
        tmp = t_4
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + t) + y;
	double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
	double t_3 = t_2 / t_1;
	double t_4 = (z + a) - b;
	double tmp;
	if (t_3 < -3.5813117084150564e+153) {
		tmp = t_4;
	} else if (t_3 < 1.2285964308315609e+82) {
		tmp = 1.0 / (t_1 / t_2);
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + t) + y
	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
	t_3 = t_2 / t_1
	t_4 = (z + a) - b
	tmp = 0
	if t_3 < -3.5813117084150564e+153:
		tmp = t_4
	elif t_3 < 1.2285964308315609e+82:
		tmp = 1.0 / (t_1 / t_2)
	else:
		tmp = t_4
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + t) + y)
	t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b))
	t_3 = Float64(t_2 / t_1)
	t_4 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (t_3 < -3.5813117084150564e+153)
		tmp = t_4;
	elseif (t_3 < 1.2285964308315609e+82)
		tmp = Float64(1.0 / Float64(t_1 / t_2));
	else
		tmp = t_4;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + t) + y;
	t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
	t_3 = t_2 / t_1;
	t_4 = (z + a) - b;
	tmp = 0.0;
	if (t_3 < -3.5813117084150564e+153)
		tmp = t_4;
	elseif (t_3 < 1.2285964308315609e+82)
		tmp = 1.0 / (t_1 / t_2);
	else
		tmp = t_4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024088 
(FPCore (x y z t a b)
  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
  :precision binary64

  :alt
  (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ 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)))