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

Percentage Accurate: 60.7% → 88.1%
Time: 18.4s
Alternatives: 15
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 60.7% accurate, 1.0× speedup?

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

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

Alternative 1: 88.1% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 4.99999999999999961e273 < (/.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.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 76.4%

      \[\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.99999999999999961e273

    1. Initial program 99.7%

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

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

Alternative 2: 63.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \left(y + t\right) \cdot a\\
t_2 := \frac{y}{y + t}\\
t_3 := y + \left(x + t\right)\\
t_4 := z \cdot \frac{x + y}{t\_3}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+103}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;z \leq -3.1 \cdot 10^{-148}:\\
\;\;\;\;\frac{t\_1 + \left(x + y\right) \cdot z}{t\_3}\\

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-238}:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{t\_3}\right)\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{-107}:\\
\;\;\;\;\frac{t\_1 - y \cdot b}{t\_3}\\

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+259}:\\
\;\;\;\;z \cdot \left(\frac{a}{z} + \left(t\_2 - t\_2 \cdot \frac{b}{z}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -4.2000000000000003e103 or 1.09999999999999996e259 < z

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

    if -4.2000000000000003e103 < z < -3.1000000000000001e-148

    1. Initial program 76.7%

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

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

    if -3.1000000000000001e-148 < z < -2.19999999999999991e-238

    1. Initial program 56.4%

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

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

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

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

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

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

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

    if -2.19999999999999991e-238 < z < 3.59999999999999976e-107

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

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

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

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

    if 3.59999999999999976e-107 < z < 9.49999999999999924e-44

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999924e-44 < z < 1.09999999999999996e259

    1. Initial program 52.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 x around 0 44.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+103}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-148}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a + \left(x + y\right) \cdot z}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-238}:\\ \;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{y + \left(x + t\right)}\right)\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-107}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-44}:\\ \;\;\;\;b \cdot \left(a \cdot \frac{t}{b \cdot \left(x + t\right)} + x \cdot \frac{\frac{z}{b}}{x + t}\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+259}:\\ \;\;\;\;z \cdot \left(\frac{a}{z} + \left(\frac{y}{y + t} - \frac{y}{y + t} \cdot \frac{b}{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 65.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -3.1 \cdot 10^{-148}:\\
\;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\

\mathbf{elif}\;y \leq 33000000000000:\\
\;\;\;\;\frac{t\_1 + \left(x + y\right) \cdot z}{t\_2}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -9e14 or 5.1999999999999995e86 < y

    1. Initial program 29.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 75.0%

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

    if -9e14 < y < -3.1000000000000001e-148

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

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

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

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

    if -3.1000000000000001e-148 < y < 3.3e13

    1. Initial program 79.1%

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

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

    if 3.3e13 < y < 5.1999999999999995e86

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{a \cdot \left(\left(t + y\right) + \frac{\color{blue}{z \cdot x} + \left(y \cdot z + y \cdot \left(-b\right)\right)}{a}\right)}{\left(x + t\right) + y} \]
      11. distribute-rgt-neg-out68.1%

        \[\leadsto \frac{a \cdot \left(\left(t + y\right) + \frac{z \cdot x + \left(y \cdot z + \color{blue}{\left(-y \cdot b\right)}\right)}{a}\right)}{\left(x + t\right) + y} \]
      12. distribute-lft-neg-in68.1%

        \[\leadsto \frac{a \cdot \left(\left(t + y\right) + \frac{z \cdot x + \left(y \cdot z + \color{blue}{\left(-y\right) \cdot b}\right)}{a}\right)}{\left(x + t\right) + y} \]
      13. cancel-sign-sub-inv68.1%

        \[\leadsto \frac{a \cdot \left(\left(t + y\right) + \frac{z \cdot x + \color{blue}{\left(y \cdot z - y \cdot b\right)}}{a}\right)}{\left(x + t\right) + y} \]
      14. distribute-lft-out--68.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 58.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -4.1 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -7.3 \cdot 10^{-199}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{+203}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.85999999999999993e208

    1. Initial program 48.7%

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

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

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

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

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

        \[\leadsto a + y \cdot \color{blue}{\frac{b}{-t}} \]
    7. Simplified81.7%

      \[\leadsto a + y \cdot \color{blue}{\frac{b}{-t}} \]

    if -1.85999999999999993e208 < t < -4.0999999999999999e-100 or -7.3e-199 < t < 4.8000000000000002e203

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

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

    if -4.0999999999999999e-100 < t < -7.3e-199

    1. Initial program 83.0%

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

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

    if 4.8000000000000002e203 < t

    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 x around 0 40.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.86 \cdot 10^{+208}:\\ \;\;\;\;a - y \cdot \frac{b}{t}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-100}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq -7.3 \cdot 10^{-199}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+203}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\frac{a}{y} + \frac{z - b}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 58.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.65 \cdot 10^{-199}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-12}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_2}\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+252}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.8000000000000002e-5 or 1.15e252 < z

    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 z around inf 39.4%

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

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

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

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

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

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

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

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

    if -3.8000000000000002e-5 < z < -1.6500000000000001e-199 or 1.4500000000000001e-12 < z < 1.15e252

    1. Initial program 58.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 64.9%

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

    if -1.6500000000000001e-199 < z < 1.4500000000000001e-12

    1. Initial program 79.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 44.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{-5}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-199}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-12}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+252}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 57.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-162}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_1}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.8e-72 or 3.40000000000000011e251 < z

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

    if -7.8e-72 < z < -1.7999999999999999e-162

    1. Initial program 65.2%

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

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

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

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

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

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

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

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

    if -1.7999999999999999e-162 < z < 2.5999999999999998e-44

    1. Initial program 76.9%

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

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

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

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

    if 2.5999999999999998e-44 < z < 3.40000000000000011e251

    1. Initial program 52.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{-72}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-162}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-44}:\\ \;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{y + t}\right)\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+251}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 59.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -8.2 \cdot 10^{-163}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_1}\\

\mathbf{elif}\;z \leq 2.05 \cdot 10^{-43}:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{t\_1}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.00000000000000053e-68 or 3.40000000000000011e251 < z

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

    if -8.00000000000000053e-68 < z < -8.19999999999999965e-163

    1. Initial program 65.2%

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

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

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

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

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

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

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

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

    if -8.19999999999999965e-163 < z < 2.0499999999999999e-43

    1. Initial program 76.9%

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

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

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

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

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

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

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

    if 2.0499999999999999e-43 < z < 3.40000000000000011e251

    1. Initial program 52.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-68}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-163}:\\ \;\;\;\;a \cdot \frac{y + t}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-43}:\\ \;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{y + \left(x + t\right)}\right)\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+251}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 60.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \frac{y}{t\_1}\\ t_3 := z \cdot \frac{x + y}{t\_1}\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+71}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-147}:\\ \;\;\;\;b \cdot \left(\frac{z}{b} - t\_2\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-44}:\\ \;\;\;\;b \cdot \left(\frac{a}{b} - t\_2\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+254}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t))) (t_2 (/ y t_1)) (t_3 (* z (/ (+ x y) t_1))))
   (if (<= z -1.3e+71)
     t_3
     (if (<= z -2.3e-147)
       (* b (- (/ z b) t_2))
       (if (<= z 1.85e-44)
         (* b (- (/ a b) t_2))
         (if (<= z 2.2e+254) (- (+ z a) b) t_3))))))
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_1;
	double t_3 = z * ((x + y) / t_1);
	double tmp;
	if (z <= -1.3e+71) {
		tmp = t_3;
	} else if (z <= -2.3e-147) {
		tmp = b * ((z / b) - t_2);
	} else if (z <= 1.85e-44) {
		tmp = b * ((a / b) - t_2);
	} else if (z <= 2.2e+254) {
		tmp = (z + a) - b;
	} 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 = y + (x + t)
    t_2 = y / t_1
    t_3 = z * ((x + y) / t_1)
    if (z <= (-1.3d+71)) then
        tmp = t_3
    else if (z <= (-2.3d-147)) then
        tmp = b * ((z / b) - t_2)
    else if (z <= 1.85d-44) then
        tmp = b * ((a / b) - t_2)
    else if (z <= 2.2d+254) then
        tmp = (z + a) - b
    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 = y + (x + t);
	double t_2 = y / t_1;
	double t_3 = z * ((x + y) / t_1);
	double tmp;
	if (z <= -1.3e+71) {
		tmp = t_3;
	} else if (z <= -2.3e-147) {
		tmp = b * ((z / b) - t_2);
	} else if (z <= 1.85e-44) {
		tmp = b * ((a / b) - t_2);
	} else if (z <= 2.2e+254) {
		tmp = (z + a) - b;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	t_2 = y / t_1
	t_3 = z * ((x + y) / t_1)
	tmp = 0
	if z <= -1.3e+71:
		tmp = t_3
	elif z <= -2.3e-147:
		tmp = b * ((z / b) - t_2)
	elif z <= 1.85e-44:
		tmp = b * ((a / b) - t_2)
	elif z <= 2.2e+254:
		tmp = (z + a) - b
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	t_2 = Float64(y / t_1)
	t_3 = Float64(z * Float64(Float64(x + y) / t_1))
	tmp = 0.0
	if (z <= -1.3e+71)
		tmp = t_3;
	elseif (z <= -2.3e-147)
		tmp = Float64(b * Float64(Float64(z / b) - t_2));
	elseif (z <= 1.85e-44)
		tmp = Float64(b * Float64(Float64(a / b) - t_2));
	elseif (z <= 2.2e+254)
		tmp = Float64(Float64(z + a) - b);
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (x + t);
	t_2 = y / t_1;
	t_3 = z * ((x + y) / t_1);
	tmp = 0.0;
	if (z <= -1.3e+71)
		tmp = t_3;
	elseif (z <= -2.3e-147)
		tmp = b * ((z / b) - t_2);
	elseif (z <= 1.85e-44)
		tmp = b * ((a / b) - t_2);
	elseif (z <= 2.2e+254)
		tmp = (z + a) - b;
	else
		tmp = t_3;
	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[(y / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+71], t$95$3, If[LessEqual[z, -2.3e-147], N[(b * N[(N[(z / b), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-44], N[(b * N[(N[(a / b), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+254], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.3 \cdot 10^{-147}:\\
\;\;\;\;b \cdot \left(\frac{z}{b} - t\_2\right)\\

\mathbf{elif}\;z \leq 1.85 \cdot 10^{-44}:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - t\_2\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.29999999999999996e71 or 2.2000000000000001e254 < z

    1. Initial program 43.0%

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

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

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

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

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

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

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

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

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

    if -1.29999999999999996e71 < z < -2.2999999999999999e-147

    1. Initial program 72.7%

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

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

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

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

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

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

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

    if -2.2999999999999999e-147 < z < 1.85e-44

    1. Initial program 74.6%

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

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

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

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

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

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

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

    if 1.85e-44 < z < 2.2000000000000001e254

    1. Initial program 52.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+71}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-147}:\\ \;\;\;\;b \cdot \left(\frac{z}{b} - \frac{y}{y + \left(x + t\right)}\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-44}:\\ \;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{y + \left(x + t\right)}\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+254}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 59.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.56 \cdot 10^{-211}:\\
\;\;\;\;b \cdot \left(\frac{z}{b} - \frac{y}{t\_1}\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.4999999999999999e71 or 3.50000000000000004e251 < z

    1. Initial program 43.0%

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

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

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

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

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

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

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

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

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

    if -3.4999999999999999e71 < z < -1.56e-211

    1. Initial program 67.5%

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

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

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

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

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

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

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

    if -1.56e-211 < z < 2.09999999999999992e-98

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

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

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

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

    if 2.09999999999999992e-98 < z < 3.50000000000000004e251

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+71}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq -1.56 \cdot 10^{-211}:\\ \;\;\;\;b \cdot \left(\frac{z}{b} - \frac{y}{y + \left(x + t\right)}\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-98}:\\ \;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+251}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 57.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := z \cdot \frac{x}{x + t}\\ \mathbf{if}\;x \leq -2.7 \cdot 10^{+177}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1.46 \cdot 10^{-211}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -2.6 \cdot 10^{-302}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+118}:\\ \;\;\;\;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 (* z (/ x (+ x t)))))
   (if (<= x -2.7e+177)
     t_2
     (if (<= x -1.46e-211)
       t_1
       (if (<= x -2.6e-302) a (if (<= x 1.75e+118) 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 = z * (x / (x + t));
	double tmp;
	if (x <= -2.7e+177) {
		tmp = t_2;
	} else if (x <= -1.46e-211) {
		tmp = t_1;
	} else if (x <= -2.6e-302) {
		tmp = a;
	} else if (x <= 1.75e+118) {
		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 = z * (x / (x + t))
    if (x <= (-2.7d+177)) then
        tmp = t_2
    else if (x <= (-1.46d-211)) then
        tmp = t_1
    else if (x <= (-2.6d-302)) then
        tmp = a
    else if (x <= 1.75d+118) 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 = z * (x / (x + t));
	double tmp;
	if (x <= -2.7e+177) {
		tmp = t_2;
	} else if (x <= -1.46e-211) {
		tmp = t_1;
	} else if (x <= -2.6e-302) {
		tmp = a;
	} else if (x <= 1.75e+118) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + a) - b
	t_2 = z * (x / (x + t))
	tmp = 0
	if x <= -2.7e+177:
		tmp = t_2
	elif x <= -1.46e-211:
		tmp = t_1
	elif x <= -2.6e-302:
		tmp = a
	elif x <= 1.75e+118:
		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(z * Float64(x / Float64(x + t)))
	tmp = 0.0
	if (x <= -2.7e+177)
		tmp = t_2;
	elseif (x <= -1.46e-211)
		tmp = t_1;
	elseif (x <= -2.6e-302)
		tmp = a;
	elseif (x <= 1.75e+118)
		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 = z * (x / (x + t));
	tmp = 0.0;
	if (x <= -2.7e+177)
		tmp = t_2;
	elseif (x <= -1.46e-211)
		tmp = t_1;
	elseif (x <= -2.6e-302)
		tmp = a;
	elseif (x <= 1.75e+118)
		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[(z * N[(x / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.7e+177], t$95$2, If[LessEqual[x, -1.46e-211], t$95$1, If[LessEqual[x, -2.6e-302], a, If[LessEqual[x, 1.75e+118], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.46 \cdot 10^{-211}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -2.6 \cdot 10^{-302}:\\
\;\;\;\;a\\

\mathbf{elif}\;x \leq 1.75 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.69999999999999991e177 or 1.75000000000000008e118 < x

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

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

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

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

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

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

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

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

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

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

    if -2.69999999999999991e177 < x < -1.4600000000000001e-211 or -2.60000000000000011e-302 < x < 1.75000000000000008e118

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

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

    if -1.4600000000000001e-211 < x < -2.60000000000000011e-302

    1. Initial program 68.3%

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

      \[\leadsto \color{blue}{a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{+177}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \mathbf{elif}\;x \leq -1.46 \cdot 10^{-211}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq -2.6 \cdot 10^{-302}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+118}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 58.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + a\right) - b\\ t_2 := a + y \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{+196}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-100}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.56 \cdot 10^{-196}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+200}:\\ \;\;\;\;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 (/ z t)))))
   (if (<= t -8.5e+196)
     t_2
     (if (<= t -3.8e-100)
       t_1
       (if (<= t -1.56e-196) z (if (<= t 1.9e+200) 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 * (z / t));
	double tmp;
	if (t <= -8.5e+196) {
		tmp = t_2;
	} else if (t <= -3.8e-100) {
		tmp = t_1;
	} else if (t <= -1.56e-196) {
		tmp = z;
	} else if (t <= 1.9e+200) {
		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 * (z / t))
    if (t <= (-8.5d+196)) then
        tmp = t_2
    else if (t <= (-3.8d-100)) then
        tmp = t_1
    else if (t <= (-1.56d-196)) then
        tmp = z
    else if (t <= 1.9d+200) 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 * (z / t));
	double tmp;
	if (t <= -8.5e+196) {
		tmp = t_2;
	} else if (t <= -3.8e-100) {
		tmp = t_1;
	} else if (t <= -1.56e-196) {
		tmp = z;
	} else if (t <= 1.9e+200) {
		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 * (z / t))
	tmp = 0
	if t <= -8.5e+196:
		tmp = t_2
	elif t <= -3.8e-100:
		tmp = t_1
	elif t <= -1.56e-196:
		tmp = z
	elif t <= 1.9e+200:
		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(y * Float64(z / t)))
	tmp = 0.0
	if (t <= -8.5e+196)
		tmp = t_2;
	elseif (t <= -3.8e-100)
		tmp = t_1;
	elseif (t <= -1.56e-196)
		tmp = z;
	elseif (t <= 1.9e+200)
		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 * (z / t));
	tmp = 0.0;
	if (t <= -8.5e+196)
		tmp = t_2;
	elseif (t <= -3.8e-100)
		tmp = t_1;
	elseif (t <= -1.56e-196)
		tmp = z;
	elseif (t <= 1.9e+200)
		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[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+196], t$95$2, If[LessEqual[t, -3.8e-100], t$95$1, If[LessEqual[t, -1.56e-196], z, If[LessEqual[t, 1.9e+200], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.8 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.56 \cdot 10^{-196}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+200}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.50000000000000041e196 or 1.89999999999999991e200 < t

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

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

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

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

        \[\leadsto a + \color{blue}{y \cdot \frac{z}{t}} \]
    7. Simplified73.6%

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

    if -8.50000000000000041e196 < t < -3.79999999999999997e-100 or -1.56e-196 < t < 1.89999999999999991e200

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

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

    if -3.79999999999999997e-100 < t < -1.56e-196

    1. Initial program 83.0%

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

      \[\leadsto \color{blue}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{+196}:\\ \;\;\;\;a + y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-100}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq -1.56 \cdot 10^{-196}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+200}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 58.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -1.4 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.45 \cdot 10^{-194}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+200}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.2499999999999998e211

    1. Initial program 48.7%

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

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

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

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

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

        \[\leadsto a + y \cdot \color{blue}{\frac{b}{-t}} \]
    7. Simplified81.7%

      \[\leadsto a + y \cdot \color{blue}{\frac{b}{-t}} \]

    if -3.2499999999999998e211 < t < -1.3999999999999999e-98 or -1.44999999999999985e-194 < t < 3.20000000000000031e200

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

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

    if -1.3999999999999999e-98 < t < -1.44999999999999985e-194

    1. Initial program 83.0%

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

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

    if 3.20000000000000031e200 < t

    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 x around 0 40.0%

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

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

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

        \[\leadsto a + \color{blue}{y \cdot \frac{z}{t}} \]
    7. Simplified72.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.25 \cdot 10^{+211}:\\ \;\;\;\;a - y \cdot \frac{b}{t}\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{-98}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-194}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+200}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 57.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -6.8 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -3.4 \cdot 10^{-196}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 5.7 \cdot 10^{+200}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.8000000000000001e213 or 5.70000000000000007e200 < t

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

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

    if -1.8000000000000001e213 < t < -6.79999999999999953e-100 or -3.4e-196 < t < 5.70000000000000007e200

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

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

    if -6.79999999999999953e-100 < t < -3.4e-196

    1. Initial program 83.0%

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

      \[\leadsto \color{blue}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+213}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{-100}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-196}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{+200}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 42.9% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+170}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.4999999999999995e131 or 1.2e170 < t

    1. Initial program 44.6%

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

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

    if -7.4999999999999995e131 < t < 1.2e170

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

      \[\leadsto \color{blue}{z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+131}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+170}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 32.7% 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 61.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 t around inf 30.4%

    \[\leadsto \color{blue}{a} \]
  4. Final simplification30.4%

    \[\leadsto a \]
  5. Add Preprocessing

Developer target: 82.4% 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 2024096 
(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)))