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

Percentage Accurate: 61.3% → 89.2%
Time: 18.0s
Alternatives: 15
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 61.3% 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: 89.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := \frac{y \cdot b}{t_1}\\ t_3 := a \cdot \left(\frac{t}{t_1} + \frac{y}{t_1}\right)\\ t_4 := z \cdot \left(x + y\right)\\ t_5 := \frac{\left(t_4 + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ t_6 := z + t_3\\ \mathbf{if}\;t_5 \leq -\infty:\\ \;\;\;\;t_6 - t_2\\ \mathbf{elif}\;t_5 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\left(t_3 + \frac{t_4}{t_1}\right) - t_2\\ \mathbf{else}:\\ \;\;\;\;t_6 - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ x y)))
        (t_2 (/ (* y b) t_1))
        (t_3 (* a (+ (/ t t_1) (/ y t_1))))
        (t_4 (* z (+ x y)))
        (t_5 (/ (- (+ t_4 (* a (+ y t))) (* y b)) (+ y (+ x t))))
        (t_6 (+ z t_3)))
   (if (<= t_5 (- INFINITY))
     (- t_6 t_2)
     (if (<= t_5 2e+277) (- (+ t_3 (/ t_4 t_1)) t_2) (- t_6 b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (x + y);
	double t_2 = (y * b) / t_1;
	double t_3 = a * ((t / t_1) + (y / t_1));
	double t_4 = z * (x + y);
	double t_5 = ((t_4 + (a * (y + t))) - (y * b)) / (y + (x + t));
	double t_6 = z + t_3;
	double tmp;
	if (t_5 <= -((double) INFINITY)) {
		tmp = t_6 - t_2;
	} else if (t_5 <= 2e+277) {
		tmp = (t_3 + (t_4 / t_1)) - t_2;
	} else {
		tmp = t_6 - b;
	}
	return tmp;
}
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 * b) / t_1;
	double t_3 = a * ((t / t_1) + (y / t_1));
	double t_4 = z * (x + y);
	double t_5 = ((t_4 + (a * (y + t))) - (y * b)) / (y + (x + t));
	double t_6 = z + t_3;
	double tmp;
	if (t_5 <= -Double.POSITIVE_INFINITY) {
		tmp = t_6 - t_2;
	} else if (t_5 <= 2e+277) {
		tmp = (t_3 + (t_4 / t_1)) - t_2;
	} else {
		tmp = t_6 - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t + (x + y)
	t_2 = (y * b) / t_1
	t_3 = a * ((t / t_1) + (y / t_1))
	t_4 = z * (x + y)
	t_5 = ((t_4 + (a * (y + t))) - (y * b)) / (y + (x + t))
	t_6 = z + t_3
	tmp = 0
	if t_5 <= -math.inf:
		tmp = t_6 - t_2
	elif t_5 <= 2e+277:
		tmp = (t_3 + (t_4 / t_1)) - t_2
	else:
		tmp = t_6 - b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(x + y))
	t_2 = Float64(Float64(y * b) / t_1)
	t_3 = Float64(a * Float64(Float64(t / t_1) + Float64(y / t_1)))
	t_4 = Float64(z * Float64(x + y))
	t_5 = Float64(Float64(Float64(t_4 + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t)))
	t_6 = Float64(z + t_3)
	tmp = 0.0
	if (t_5 <= Float64(-Inf))
		tmp = Float64(t_6 - t_2);
	elseif (t_5 <= 2e+277)
		tmp = Float64(Float64(t_3 + Float64(t_4 / t_1)) - t_2);
	else
		tmp = Float64(t_6 - b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t + (x + y);
	t_2 = (y * b) / t_1;
	t_3 = a * ((t / t_1) + (y / t_1));
	t_4 = z * (x + y);
	t_5 = ((t_4 + (a * (y + t))) - (y * b)) / (y + (x + t));
	t_6 = z + t_3;
	tmp = 0.0;
	if (t_5 <= -Inf)
		tmp = t_6 - t_2;
	elseif (t_5 <= 2e+277)
		tmp = (t_3 + (t_4 / t_1)) - t_2;
	else
		tmp = t_6 - b;
	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[(N[(y * b), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$4 + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(z + t$95$3), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], N[(t$95$6 - t$95$2), $MachinePrecision], If[LessEqual[t$95$5, 2e+277], N[(N[(t$95$3 + N[(t$95$4 / t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], N[(t$95$6 - b), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_5 \leq 2 \cdot 10^{+277}:\\
\;\;\;\;\left(t_3 + \frac{t_4}{t_1}\right) - t_2\\

\mathbf{else}:\\
\;\;\;\;t_6 - 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.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 40.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. Taylor expanded in x around inf 78.1%

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

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

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

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

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

    1. Initial program 5.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 31.9%

      \[\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. Taylor expanded in x around inf 59.3%

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

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

    \[\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:\\ \;\;\;\;\left(z + a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right) - \frac{y \cdot b}{t + \left(x + y\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 2 \cdot 10^{+277}:\\ \;\;\;\;\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{y \cdot b}{t + \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right) - b\\ \end{array} \]

Alternative 2: 90.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 5.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 36.0%

      \[\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. Taylor expanded in x around inf 68.3%

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

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

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

    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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.7%

    \[\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 \lor \neg \left(\frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq 2 \cdot 10^{+277}\right):\\ \;\;\;\;\left(z + a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right) - b\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\ \end{array} \]

Alternative 3: 89.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)\\ t_3 := z + a \cdot \left(\frac{t}{t_2} + \frac{y}{t_2}\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_3 - \frac{y \cdot b}{t_2}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3 - 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)))
        (t_3 (+ z (* a (+ (/ t t_2) (/ y t_2))))))
   (if (<= t_1 (- INFINITY))
     (- t_3 (/ (* y b) t_2))
     (if (<= t_1 2e+277) t_1 (- t_3 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 t_3 = z + (a * ((t / t_2) + (y / t_2)));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_3 - ((y * b) / t_2);
	} else if (t_1 <= 2e+277) {
		tmp = t_1;
	} else {
		tmp = t_3 - 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 t_3 = z + (a * ((t / t_2) + (y / t_2)));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t_3 - ((y * b) / t_2);
	} else if (t_1 <= 2e+277) {
		tmp = t_1;
	} else {
		tmp = t_3 - 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)
	t_3 = z + (a * ((t / t_2) + (y / t_2)))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t_3 - ((y * b) / t_2)
	elif t_1 <= 2e+277:
		tmp = t_1
	else:
		tmp = t_3 - 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))
	t_3 = Float64(z + Float64(a * Float64(Float64(t / t_2) + Float64(y / t_2))))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(t_3 - Float64(Float64(y * b) / t_2));
	elseif (t_1 <= 2e+277)
		tmp = t_1;
	else
		tmp = Float64(t_3 - 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);
	t_3 = z + (a * ((t / t_2) + (y / t_2)));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t_3 - ((y * b) / t_2);
	elseif (t_1 <= 2e+277)
		tmp = t_1;
	else
		tmp = t_3 - 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]}, Block[{t$95$3 = N[(z + N[(a * N[(N[(t / t$95$2), $MachinePrecision] + N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t$95$3 - N[(N[(y * b), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+277], t$95$1, N[(t$95$3 - 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)\\
t_3 := z + a \cdot \left(\frac{t}{t_2} + \frac{y}{t_2}\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_3 - \frac{y \cdot b}{t_2}\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+277}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_3 - 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.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 40.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. Taylor expanded in x around inf 78.1%

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

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

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

    1. Initial program 5.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 31.9%

      \[\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. Taylor expanded in x around inf 59.3%

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

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

    \[\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:\\ \;\;\;\;\left(z + a \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right) - \frac{y \cdot b}{t + \left(x + y\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 2 \cdot 10^{+277}:\\ \;\;\;\;\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 \cdot \left(\frac{t}{t + \left(x + y\right)} + \frac{y}{t + \left(x + y\right)}\right)\right) - b\\ \end{array} \]

Alternative 4: 70.8% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.4499999999999999e79 or 1.45e61 < t

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

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

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

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

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

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

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

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

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

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

    if -2.4499999999999999e79 < t < -7e-126

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

      \[\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. Taylor expanded in x around inf 65.1%

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

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

    if -7e-126 < t < 1.45e61

    1. Initial program 63.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 70.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. Taylor expanded in x around inf 88.8%

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

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

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

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

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

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

Alternative 5: 70.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+91} \lor \neg \left(t \leq 1.5 \cdot 10^{+61}\right):\\
\;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.65000000000000009e91 or 1.5e61 < t

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

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

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

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

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

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

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

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

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

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

    if -1.65000000000000009e91 < t < 1.5e61

    1. Initial program 65.4%

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

      \[\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. Taylor expanded in x around inf 82.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+91} \lor \neg \left(t \leq 1.5 \cdot 10^{+61}\right):\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + \frac{a}{\frac{x + y}{y}}\right) - \frac{y \cdot b}{t + \left(x + y\right)}\\ \end{array} \]

Alternative 6: 60.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 2.95 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2 \cdot 10^{+42}:\\
\;\;\;\;\frac{z}{1 + \frac{t}{x + y}}\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+61}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.50000000000000054e26 or 1.29999999999999986e61 < t

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000054e26 < t < 2.95e21 or 2.00000000000000009e42 < t < 1.29999999999999986e61

    1. Initial program 63.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 y around inf 66.1%

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

    if 2.95e21 < t < 2.00000000000000009e42

    1. Initial program 80.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. Step-by-step derivation
      1. +-commutative80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z}{\color{blue}{1 + \frac{t}{x + y}}} \]
    10. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto \frac{z}{1 + \frac{t}{\color{blue}{y + x}}} \]
    11. Simplified99.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+26}:\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{+21}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+42}:\\ \;\;\;\;\frac{z}{1 + \frac{t}{x + y}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+61}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \end{array} \]

Alternative 7: 62.6% accurate, 1.1× speedup?

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

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

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

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

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


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

    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 t around inf 57.5%

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

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

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

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

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

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

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

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

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

    if -9.50000000000000054e26 < t < -1.35999999999999997e-219

    1. Initial program 67.5%

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

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

    if -1.35999999999999997e-219 < t < 3.1e162

    1. Initial program 63.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 72.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. Taylor expanded in x around inf 87.2%

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

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

    if 3.1e162 < t

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+26}:\\ \;\;\;\;a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\ \mathbf{elif}\;t \leq -1.36 \cdot 10^{-219}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+162}:\\ \;\;\;\;\left(z + a\right) - \frac{y \cdot b}{t + \left(x + y\right)}\\ \mathbf{else}:\\ \;\;\;\;a + z \cdot \left(\frac{y}{t} + \frac{x}{t}\right)\\ \end{array} \]

Alternative 8: 58.8% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := a - y \cdot \frac{b}{t}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+128}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.59999999999999965e128 or 8.50000000000000007e80 < t

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

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

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

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

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

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

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

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

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

      \[\leadsto a + \color{blue}{-1 \cdot \frac{b \cdot y}{t}} \]
    6. Step-by-step derivation
      1. mul-1-neg55.9%

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

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

        \[\leadsto a + \left(-\color{blue}{y \cdot \frac{b}{t}}\right) \]
      4. distribute-rgt-neg-in61.9%

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

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

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

    if -5.59999999999999965e128 < t < 2.95e21

    1. Initial program 66.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 y around inf 62.3%

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

    if 2.95e21 < t < 8.50000000000000007e80

    1. Initial program 61.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. Step-by-step derivation
      1. +-commutative61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+128}:\\ \;\;\;\;a - y \cdot \frac{b}{t}\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{+21}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+80}:\\ \;\;\;\;\left(x + y\right) \cdot \frac{z}{x + \left(y + t\right)}\\ \mathbf{else}:\\ \;\;\;\;a - y \cdot \frac{b}{t}\\ \end{array} \]

Alternative 9: 58.9% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := a - y \cdot \frac{b}{t}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+129}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 3.5 \cdot 10^{+80}:\\
\;\;\;\;\frac{z}{1 + \frac{t}{x + y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.49999999999999984e129 or 3.49999999999999994e80 < t

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

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

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

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

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

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

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

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

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

      \[\leadsto a + \color{blue}{-1 \cdot \frac{b \cdot y}{t}} \]
    6. Step-by-step derivation
      1. mul-1-neg55.9%

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

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

        \[\leadsto a + \left(-\color{blue}{y \cdot \frac{b}{t}}\right) \]
      4. distribute-rgt-neg-in61.9%

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

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

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

    if -5.49999999999999984e129 < t < 2.7e21

    1. Initial program 66.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 y around inf 62.3%

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

    if 2.7e21 < t < 3.49999999999999994e80

    1. Initial program 61.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. Step-by-step derivation
      1. +-commutative61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z}{\color{blue}{1 + \frac{t}{x + y}}} \]
    10. Step-by-step derivation
      1. +-commutative75.6%

        \[\leadsto \frac{z}{1 + \frac{t}{\color{blue}{y + x}}} \]
    11. Simplified75.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+129}:\\ \;\;\;\;a - y \cdot \frac{b}{t}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+21}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+80}:\\ \;\;\;\;\frac{z}{1 + \frac{t}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;a - y \cdot \frac{b}{t}\\ \end{array} \]

Alternative 10: 58.3% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+99} \lor \neg \left(x \leq 5.5 \cdot 10^{+216}\right):\\
\;\;\;\;\frac{z}{\frac{x + t}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.00000000000000008e99 or 5.5e216 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000008e99 < x < 5.5e216

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{+99} \lor \neg \left(x \leq 5.5 \cdot 10^{+216}\right):\\ \;\;\;\;\frac{z}{\frac{x + t}{x}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 11: 60.3% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+129} \lor \neg \left(t \leq 2.45 \cdot 10^{+162}\right):\\
\;\;\;\;a - y \cdot \frac{b}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.0000000000000003e129 or 2.45000000000000017e162 < t

    1. Initial program 46.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto a + \color{blue}{-1 \cdot \frac{b \cdot y}{t}} \]
    6. Step-by-step derivation
      1. mul-1-neg56.7%

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

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

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

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

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

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

    if -9.0000000000000003e129 < t < 2.45000000000000017e162

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+129} \lor \neg \left(t \leq 2.45 \cdot 10^{+162}\right):\\ \;\;\;\;a - y \cdot \frac{b}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 12: 57.7% accurate, 2.3× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.39999999999999993e153 or 8.8000000000000006e219 < x

    1. Initial program 45.7%

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

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

    if -1.39999999999999993e153 < x < 8.8000000000000006e219

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{+153}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{+219}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]

Alternative 13: 47.1% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;x \leq 5.8 \cdot 10^{+138}:\\
\;\;\;\;a - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.3999999999999997e119 or 5.80000000000000019e138 < x

    1. Initial program 48.8%

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

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

    if -5.3999999999999997e119 < x < 5.80000000000000019e138

    1. Initial program 64.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. Step-by-step derivation
      1. +-commutative64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a - b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.4 \cdot 10^{+119}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+138}:\\ \;\;\;\;a - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]

Alternative 14: 44.8% accurate, 4.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{+28}:\\
\;\;\;\;a\\

\mathbf{elif}\;a \leq 1.52 \cdot 10^{-6}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.0000000000000002e28 or 1.52000000000000006e-6 < a

    1. Initial program 49.9%

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

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

    if -6.0000000000000002e28 < a < 1.52000000000000006e-6

    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 x around inf 40.2%

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

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

Alternative 15: 32.2% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 59.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.9%

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

    \[\leadsto a \]

Developer target: 82.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t_1}{t_2}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023285 
(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)))