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

Percentage Accurate: 60.9% → 88.3%
Time: 15.4s
Alternatives: 15
Speedup: 1.2×

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.9% accurate, 1.0× speedup?

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

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

Alternative 1: 88.3% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 6.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. Taylor expanded in a around 0 39.2%

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

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

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

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

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

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

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

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

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

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

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

    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.9999999999999998e274

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x + y, z, \mathsf{fma}\left(\color{blue}{y + t}, a, -y \cdot b\right)\right)}{\left(x + t\right) + y} \]
      5. distribute-lft-neg-out99.7%

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

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

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

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

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

    if 4.9999999999999998e274 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 7.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. Taylor expanded in y around inf 77.7%

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

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

Alternative 2: 88.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+274}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 6.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. Taylor expanded in a around 0 39.2%

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

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

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

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

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

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

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

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

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

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

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

    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.9999999999999998e274

    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} \]

    if 4.9999999999999998e274 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 7.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. Taylor expanded in y around inf 77.7%

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

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

Alternative 3: 61.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ t_2 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+130}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -475:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-38}:\\ \;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{-245}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-114}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-67}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (- (* a (+ y t)) (* y b)) (+ y (+ x t)))) (t_2 (- (+ z a) b)))
   (if (<= y -6.5e+130)
     t_2
     (if (<= y -475.0)
       t_1
       (if (<= y -5.1e-38)
         (+ z (/ a (/ (+ x y) y)))
         (if (<= y -1.2e-119)
           t_1
           (if (<= y 2.65e-245)
             (/ (+ (* t a) (* x z)) (+ x t))
             (if (<= y 6e-114) (+ z a) (if (<= y 1.65e-67) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((a * (y + t)) - (y * b)) / (y + (x + t));
	double t_2 = (z + a) - b;
	double tmp;
	if (y <= -6.5e+130) {
		tmp = t_2;
	} else if (y <= -475.0) {
		tmp = t_1;
	} else if (y <= -5.1e-38) {
		tmp = z + (a / ((x + y) / y));
	} else if (y <= -1.2e-119) {
		tmp = t_1;
	} else if (y <= 2.65e-245) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 6e-114) {
		tmp = z + a;
	} else if (y <= 1.65e-67) {
		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 = ((a * (y + t)) - (y * b)) / (y + (x + t))
    t_2 = (z + a) - b
    if (y <= (-6.5d+130)) then
        tmp = t_2
    else if (y <= (-475.0d0)) then
        tmp = t_1
    else if (y <= (-5.1d-38)) then
        tmp = z + (a / ((x + y) / y))
    else if (y <= (-1.2d-119)) then
        tmp = t_1
    else if (y <= 2.65d-245) then
        tmp = ((t * a) + (x * z)) / (x + t)
    else if (y <= 6d-114) then
        tmp = z + a
    else if (y <= 1.65d-67) 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 = ((a * (y + t)) - (y * b)) / (y + (x + t));
	double t_2 = (z + a) - b;
	double tmp;
	if (y <= -6.5e+130) {
		tmp = t_2;
	} else if (y <= -475.0) {
		tmp = t_1;
	} else if (y <= -5.1e-38) {
		tmp = z + (a / ((x + y) / y));
	} else if (y <= -1.2e-119) {
		tmp = t_1;
	} else if (y <= 2.65e-245) {
		tmp = ((t * a) + (x * z)) / (x + t);
	} else if (y <= 6e-114) {
		tmp = z + a;
	} else if (y <= 1.65e-67) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((a * (y + t)) - (y * b)) / (y + (x + t))
	t_2 = (z + a) - b
	tmp = 0
	if y <= -6.5e+130:
		tmp = t_2
	elif y <= -475.0:
		tmp = t_1
	elif y <= -5.1e-38:
		tmp = z + (a / ((x + y) / y))
	elif y <= -1.2e-119:
		tmp = t_1
	elif y <= 2.65e-245:
		tmp = ((t * a) + (x * z)) / (x + t)
	elif y <= 6e-114:
		tmp = z + a
	elif y <= 1.65e-67:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(a * Float64(y + t)) - Float64(y * b)) / Float64(y + Float64(x + t)))
	t_2 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (y <= -6.5e+130)
		tmp = t_2;
	elseif (y <= -475.0)
		tmp = t_1;
	elseif (y <= -5.1e-38)
		tmp = Float64(z + Float64(a / Float64(Float64(x + y) / y)));
	elseif (y <= -1.2e-119)
		tmp = t_1;
	elseif (y <= 2.65e-245)
		tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t));
	elseif (y <= 6e-114)
		tmp = Float64(z + a);
	elseif (y <= 1.65e-67)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((a * (y + t)) - (y * b)) / (y + (x + t));
	t_2 = (z + a) - b;
	tmp = 0.0;
	if (y <= -6.5e+130)
		tmp = t_2;
	elseif (y <= -475.0)
		tmp = t_1;
	elseif (y <= -5.1e-38)
		tmp = z + (a / ((x + y) / y));
	elseif (y <= -1.2e-119)
		tmp = t_1;
	elseif (y <= 2.65e-245)
		tmp = ((t * a) + (x * z)) / (x + t);
	elseif (y <= 6e-114)
		tmp = z + a;
	elseif (y <= 1.65e-67)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -6.5e+130], t$95$2, If[LessEqual[y, -475.0], t$95$1, If[LessEqual[y, -5.1e-38], N[(z + N[(a / N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.2e-119], t$95$1, If[LessEqual[y, 2.65e-245], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-114], N[(z + a), $MachinePrecision], If[LessEqual[y, 1.65e-67], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -475:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -5.1 \cdot 10^{-38}:\\
\;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-119}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 6 \cdot 10^{-114}:\\
\;\;\;\;z + a\\

\mathbf{elif}\;y \leq 1.65 \cdot 10^{-67}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.5e130 or 1.6500000000000001e-67 < y

    1. Initial program 49.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. Taylor expanded in y around inf 76.7%

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

    if -6.5e130 < y < -475 or -5.10000000000000028e-38 < y < -1.20000000000000004e-119 or 6.0000000000000003e-114 < y < 1.6500000000000001e-67

    1. Initial program 78.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. Taylor expanded in z around 0 64.1%

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

    if -475 < y < -5.10000000000000028e-38

    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. Taylor expanded in a around 0 62.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{x + y}{y}}} + z \]
      2. +-commutative87.6%

        \[\leadsto \frac{a}{\frac{\color{blue}{y + x}}{y}} + z \]
    8. Simplified87.6%

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

    if -1.20000000000000004e-119 < y < 2.64999999999999998e-245

    1. Initial program 88.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. Taylor expanded in y around 0 77.2%

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

    if 2.64999999999999998e-245 < y < 6.0000000000000003e-114

    1. Initial program 66.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. Taylor expanded in a around 0 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+130}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -475:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-38}:\\ \;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-119}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{-245}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-114}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-67}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 4: 65.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(y + t\right)\\ t_2 := y + \left(x + t\right)\\ t_3 := \frac{t_1 - y \cdot b}{t_2}\\ t_4 := \left(z + a\right) - b\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+130}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y \leq -42:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-38}:\\ \;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{-119}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-32}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) + t_1}{t_2}\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (+ y t)))
        (t_2 (+ y (+ x t)))
        (t_3 (/ (- t_1 (* y b)) t_2))
        (t_4 (- (+ z a) b)))
   (if (<= y -6.5e+130)
     t_4
     (if (<= y -42.0)
       t_3
       (if (<= y -5.6e-38)
         (+ z (/ a (/ (+ x y) y)))
         (if (<= y -6.2e-119)
           t_3
           (if (<= y 4e-32) (/ (+ (* z (+ x y)) t_1) t_2) t_4)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (y + t);
	double t_2 = y + (x + t);
	double t_3 = (t_1 - (y * b)) / t_2;
	double t_4 = (z + a) - b;
	double tmp;
	if (y <= -6.5e+130) {
		tmp = t_4;
	} else if (y <= -42.0) {
		tmp = t_3;
	} else if (y <= -5.6e-38) {
		tmp = z + (a / ((x + y) / y));
	} else if (y <= -6.2e-119) {
		tmp = t_3;
	} else if (y <= 4e-32) {
		tmp = ((z * (x + y)) + 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 = a * (y + t)
    t_2 = y + (x + t)
    t_3 = (t_1 - (y * b)) / t_2
    t_4 = (z + a) - b
    if (y <= (-6.5d+130)) then
        tmp = t_4
    else if (y <= (-42.0d0)) then
        tmp = t_3
    else if (y <= (-5.6d-38)) then
        tmp = z + (a / ((x + y) / y))
    else if (y <= (-6.2d-119)) then
        tmp = t_3
    else if (y <= 4d-32) then
        tmp = ((z * (x + y)) + 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 = a * (y + t);
	double t_2 = y + (x + t);
	double t_3 = (t_1 - (y * b)) / t_2;
	double t_4 = (z + a) - b;
	double tmp;
	if (y <= -6.5e+130) {
		tmp = t_4;
	} else if (y <= -42.0) {
		tmp = t_3;
	} else if (y <= -5.6e-38) {
		tmp = z + (a / ((x + y) / y));
	} else if (y <= -6.2e-119) {
		tmp = t_3;
	} else if (y <= 4e-32) {
		tmp = ((z * (x + y)) + t_1) / t_2;
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (y + t)
	t_2 = y + (x + t)
	t_3 = (t_1 - (y * b)) / t_2
	t_4 = (z + a) - b
	tmp = 0
	if y <= -6.5e+130:
		tmp = t_4
	elif y <= -42.0:
		tmp = t_3
	elif y <= -5.6e-38:
		tmp = z + (a / ((x + y) / y))
	elif y <= -6.2e-119:
		tmp = t_3
	elif y <= 4e-32:
		tmp = ((z * (x + y)) + t_1) / t_2
	else:
		tmp = t_4
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(y + t))
	t_2 = Float64(y + Float64(x + t))
	t_3 = Float64(Float64(t_1 - Float64(y * b)) / t_2)
	t_4 = Float64(Float64(z + a) - b)
	tmp = 0.0
	if (y <= -6.5e+130)
		tmp = t_4;
	elseif (y <= -42.0)
		tmp = t_3;
	elseif (y <= -5.6e-38)
		tmp = Float64(z + Float64(a / Float64(Float64(x + y) / y)));
	elseif (y <= -6.2e-119)
		tmp = t_3;
	elseif (y <= 4e-32)
		tmp = Float64(Float64(Float64(z * Float64(x + y)) + t_1) / t_2);
	else
		tmp = t_4;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (y + t);
	t_2 = y + (x + t);
	t_3 = (t_1 - (y * b)) / t_2;
	t_4 = (z + a) - b;
	tmp = 0.0;
	if (y <= -6.5e+130)
		tmp = t_4;
	elseif (y <= -42.0)
		tmp = t_3;
	elseif (y <= -5.6e-38)
		tmp = z + (a / ((x + y) / y));
	elseif (y <= -6.2e-119)
		tmp = t_3;
	elseif (y <= 4e-32)
		tmp = ((z * (x + y)) + 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[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -6.5e+130], t$95$4, If[LessEqual[y, -42.0], t$95$3, If[LessEqual[y, -5.6e-38], N[(z + N[(a / N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.2e-119], t$95$3, If[LessEqual[y, 4e-32], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$4]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -42:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -5.6 \cdot 10^{-38}:\\
\;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\

\mathbf{elif}\;y \leq -6.2 \cdot 10^{-119}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 4 \cdot 10^{-32}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) + t_1}{t_2}\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.5e130 or 4.00000000000000022e-32 < y

    1. Initial program 47.0%

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

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

    if -6.5e130 < y < -42 or -5.6e-38 < y < -6.19999999999999956e-119

    1. Initial program 77.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. Taylor expanded in z around 0 64.7%

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

    if -42 < y < -5.6e-38

    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. Taylor expanded in a around 0 62.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{x + y}{y}}} + z \]
      2. +-commutative87.6%

        \[\leadsto \frac{a}{\frac{\color{blue}{y + x}}{y}} + z \]
    8. Simplified87.6%

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

    if -6.19999999999999956e-119 < y < 4.00000000000000022e-32

    1. Initial program 81.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+130}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -42:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-38}:\\ \;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{-119}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-32}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) + a \cdot \left(y + t\right)}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 5: 67.2% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 2.5 \cdot 10^{+77}:\\
\;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{t_2}\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.29999999999999992e-61 or 2.50000000000000002e77 < a

    1. Initial program 55.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999992e-61 < a < -1.64999999999999995e-192

    1. Initial program 69.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. Taylor expanded in y around inf 81.2%

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

    if -1.64999999999999995e-192 < a < 1.79999999999999996e-87

    1. Initial program 73.5%

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

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

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

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

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

    if 1.79999999999999996e-87 < a < 2.50000000000000002e77

    1. Initial program 77.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. Taylor expanded in z around 0 60.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-61}:\\ \;\;\;\;z + a \cdot \left(\frac{y}{t + \left(x + y\right)} + \frac{t}{t + \left(x + y\right)}\right)\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-192}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-87}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+77}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;z + a \cdot \left(\frac{y}{t + \left(x + y\right)} + \frac{t}{t + \left(x + y\right)}\right)\\ \end{array} \]

Alternative 6: 58.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := z + \frac{a}{\frac{x + y}{y}}\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+79}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 2.9 \cdot 10^{+166}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.44999999999999996e79 or 1.50000000000000008e109 < x < 2.9000000000000001e166

    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. Taylor expanded in a around 0 64.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{x + y}{y}}} + z \]
      2. +-commutative75.1%

        \[\leadsto \frac{a}{\frac{\color{blue}{y + x}}{y}} + z \]
    8. Simplified75.1%

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

    if -1.44999999999999996e79 < x < 1.50000000000000008e109

    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. Taylor expanded in y around inf 67.4%

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

    if 2.9000000000000001e166 < x

    1. Initial program 61.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. Taylor expanded in a around 0 54.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+79}:\\ \;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+109}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{+166}:\\ \;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{y + \left(x + t\right)}\\ \end{array} \]

Alternative 7: 61.7% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq -3:\\
\;\;\;\;\frac{y \cdot t_1}{y + \left(x + t\right)}\\

\mathbf{elif}\;y \leq -4.1 \cdot 10^{-83}:\\
\;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.7999999999999996e92 or 2.64999999999999998e-245 < y

    1. Initial program 55.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. Taylor expanded in y around inf 69.9%

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

    if -6.7999999999999996e92 < y < -3

    1. Initial program 70.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. Taylor expanded in y around inf 55.3%

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

    if -3 < y < -4.1e-83

    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. Taylor expanded in a around 0 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{x + y}{y}}} + z \]
      2. +-commutative70.9%

        \[\leadsto \frac{a}{\frac{\color{blue}{y + x}}{y}} + z \]
    8. Simplified70.9%

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

    if -4.1e-83 < y < 2.64999999999999998e-245

    1. Initial program 89.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. Taylor expanded in y around 0 75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+92}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -3:\\ \;\;\;\;\frac{y \cdot \left(\left(z + a\right) - b\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-83}:\\ \;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{-245}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 8: 57.2% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{z}{1 + \frac{t}{x}}\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+137}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.4 \cdot 10^{+245}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 3.9 \cdot 10^{+301}:\\
\;\;\;\;a \cdot \frac{1}{\frac{x + t}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.05e137 or 6.19999999999999998e122 < x < 1.39999999999999989e245

    1. Initial program 60.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. Taylor expanded in z around inf 40.3%

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

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

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

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

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

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

    if -1.05e137 < x < 6.19999999999999998e122

    1. Initial program 66.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. Taylor expanded in y around inf 67.5%

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

    if 1.39999999999999989e245 < x < 3.9000000000000001e301

    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. Taylor expanded in a around inf 16.7%

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{t + x}{t}}} \]
    5. Simplified64.0%

      \[\leadsto \color{blue}{\frac{a}{\frac{t + x}{t}}} \]
    6. Step-by-step derivation
      1. div-inv64.2%

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

        \[\leadsto a \cdot \frac{1}{\frac{\color{blue}{x + t}}{t}} \]
    7. Applied egg-rr64.2%

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

    if 3.9000000000000001e301 < x

    1. Initial program 68.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{+137}:\\ \;\;\;\;\frac{z}{1 + \frac{t}{x}}\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+122}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{+245}:\\ \;\;\;\;\frac{z}{1 + \frac{t}{x}}\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+301}:\\ \;\;\;\;a \cdot \frac{1}{\frac{x + t}{t}}\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]

Alternative 9: 58.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := z + \frac{a}{\frac{x + y}{y}}\\
\mathbf{if}\;x \leq -8 \cdot 10^{+86}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.2 \cdot 10^{+241}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 3.9 \cdot 10^{+301}:\\
\;\;\;\;a \cdot \frac{1}{\frac{x + t}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.0000000000000001e86 or 2.84999999999999993e104 < x < 1.1999999999999999e241

    1. Initial program 57.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. Taylor expanded in a around 0 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{x + y}{y}}} + z \]
      2. +-commutative70.0%

        \[\leadsto \frac{a}{\frac{\color{blue}{y + x}}{y}} + z \]
    8. Simplified70.0%

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

    if -8.0000000000000001e86 < x < 2.84999999999999993e104

    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. Taylor expanded in y around inf 67.4%

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

    if 1.1999999999999999e241 < x < 3.9000000000000001e301

    1. Initial program 57.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. Taylor expanded in a around inf 15.7%

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{t + x}{t}}} \]
    5. Simplified57.7%

      \[\leadsto \color{blue}{\frac{a}{\frac{t + x}{t}}} \]
    6. Step-by-step derivation
      1. div-inv57.8%

        \[\leadsto \color{blue}{a \cdot \frac{1}{\frac{t + x}{t}}} \]
      2. +-commutative57.8%

        \[\leadsto a \cdot \frac{1}{\frac{\color{blue}{x + t}}{t}} \]
    7. Applied egg-rr57.8%

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

    if 3.9000000000000001e301 < x

    1. Initial program 68.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{+86}:\\ \;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\ \mathbf{elif}\;x \leq 2.85 \cdot 10^{+104}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+241}:\\ \;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+301}:\\ \;\;\;\;a \cdot \frac{1}{\frac{x + t}{t}}\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]

Alternative 10: 62.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq -7.4 \cdot 10^{-78}:\\
\;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.1999999999999999e80 or 2.64999999999999998e-245 < y

    1. Initial program 55.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. Taylor expanded in y around inf 69.1%

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

    if -1.1999999999999999e80 < y < -7.40000000000000011e-78

    1. Initial program 70.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. Taylor expanded in a around 0 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{x + y}{y}}} + z \]
      2. +-commutative56.7%

        \[\leadsto \frac{a}{\frac{\color{blue}{y + x}}{y}} + z \]
    8. Simplified56.7%

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

    if -7.40000000000000011e-78 < y < 2.64999999999999998e-245

    1. Initial program 89.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. Taylor expanded in y around 0 75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+80}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{-78}:\\ \;\;\;\;z + \frac{a}{\frac{x + y}{y}}\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{-245}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 11: 57.1% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{z}{1 + \frac{t}{x}}\\
\mathbf{if}\;x \leq -7.8 \cdot 10^{+134}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 1.4 \cdot 10^{+245}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 3.9 \cdot 10^{+301}:\\
\;\;\;\;\frac{a}{1 + \frac{x}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.79999999999999967e134 or 3.20000000000000005e117 < x < 1.39999999999999989e245

    1. Initial program 60.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. Taylor expanded in z around inf 40.3%

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

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

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

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

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

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

    if -7.79999999999999967e134 < x < 3.20000000000000005e117

    1. Initial program 66.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. Taylor expanded in y around inf 67.5%

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

    if 1.39999999999999989e245 < x < 3.9000000000000001e301

    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. Taylor expanded in a around inf 16.7%

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

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

        \[\leadsto \color{blue}{\frac{a}{\frac{t + x}{t}}} \]
    5. Simplified64.0%

      \[\leadsto \color{blue}{\frac{a}{\frac{t + x}{t}}} \]
    6. Taylor expanded in t around 0 64.0%

      \[\leadsto \frac{a}{\color{blue}{1 + \frac{x}{t}}} \]
    7. Step-by-step derivation
      1. +-commutative64.0%

        \[\leadsto \frac{a}{\color{blue}{\frac{x}{t} + 1}} \]
    8. Simplified64.0%

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

    if 3.9000000000000001e301 < x

    1. Initial program 68.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.8 \cdot 10^{+134}:\\ \;\;\;\;\frac{z}{1 + \frac{t}{x}}\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{+117}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{+245}:\\ \;\;\;\;\frac{z}{1 + \frac{t}{x}}\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+301}:\\ \;\;\;\;\frac{a}{1 + \frac{x}{t}}\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]

Alternative 12: 58.6% accurate, 2.3× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.90000000000000006e165 or 4.20000000000000032e122 < x

    1. Initial program 57.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. Taylor expanded in x around inf 54.9%

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

    if -6.90000000000000006e165 < x < 4.20000000000000032e122

    1. Initial program 67.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.9 \cdot 10^{+165}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{+122}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]

Alternative 13: 44.6% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 4 \cdot 10^{+45}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.99999999999999948e79 or 3.9999999999999997e45 < x

    1. Initial program 59.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. Taylor expanded in x around inf 49.1%

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

    if -5.99999999999999948e79 < x < 3.9999999999999997e45

    1. Initial program 68.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. Taylor expanded in t around inf 45.2%

      \[\leadsto \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{+79}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+45}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]

Alternative 14: 51.5% accurate, 7.0× speedup?

\[\begin{array}{l} \\ z + a \end{array} \]
(FPCore (x y z t a b) :precision binary64 (+ z a))
double code(double x, double y, double z, double t, double a, double b) {
	return z + 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 = z + a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return z + a;
}
def code(x, y, z, t, a, b):
	return z + a
function code(x, y, z, t, a, b)
	return Float64(z + a)
end
function tmp = code(x, y, z, t, a, b)
	tmp = z + a;
end
code[x_, y_, z_, t_, a_, b_] := N[(z + a), $MachinePrecision]
\begin{array}{l}

\\
z + a
\end{array}
Derivation
  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. Taylor expanded in a around 0 76.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{a} + z \]
  7. Final simplification52.3%

    \[\leadsto z + a \]

Alternative 15: 32.5% 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 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. Taylor expanded in t around inf 32.8%

    \[\leadsto \color{blue}{a} \]
  3. Final simplification32.8%

    \[\leadsto a \]

Developer target: 82.2% 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 2023318 
(FPCore (x y z t a b)
  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
  :precision binary64

  :herbie-target
  (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)))