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

Percentage Accurate: 59.2% → 99.5%
Time: 16.4s
Alternatives: 14
Speedup: 1.9×

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 14 alternatives:

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{y + x}{\frac{\left(y + t\right) + x}{z}} + \left(a \cdot \left(\frac{y}{\left(y + t\right) + x} + \frac{t}{\left(y + t\right) + x}\right) - \color{blue}{\frac{y}{y + \left(x + t\right)} \cdot b}\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)) < 4.9999999999999996e292

    1. Initial program 99.6%

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

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

Alternative 2: 96.0% accurate, 0.3× speedup?

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

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

\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 4.9999999999999996e292 < (/.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.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 32.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{y + x}{\frac{\left(y + t\right) + x}{z}} + \left(\color{blue}{a} - \frac{y}{y + \left(x + t\right)} \cdot b\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)) < 4.9999999999999996e292

    1. Initial program 99.6%

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

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

Alternative 3: 88.3% accurate, 0.3× speedup?

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

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

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


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

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

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

    1. Initial program 99.6%

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

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

Alternative 4: 67.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x + t\right)\\ t_2 := \left(z + a\right) - b\\ t_3 := \frac{a \cdot \left(y + t\right) + z \cdot \left(x + y\right)}{t_1}\\ \mathbf{if}\;y \leq -48000000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-76}:\\ \;\;\;\;\frac{t \cdot a - y \cdot b}{t_1}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-144}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -8.8 \cdot 10^{-167}:\\ \;\;\;\;\frac{x \cdot z - y \cdot b}{t_1}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+26}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ y (+ x t)))
        (t_2 (- (+ z a) b))
        (t_3 (/ (+ (* a (+ y t)) (* z (+ x y))) t_1)))
   (if (<= y -48000000000000.0)
     t_2
     (if (<= y -4.1e-76)
       (/ (- (* t a) (* y b)) t_1)
       (if (<= y -8e-144)
         t_3
         (if (<= y -8.8e-167)
           (/ (- (* x z) (* y b)) t_1)
           (if (<= y 1.9e+26) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = (z + a) - b;
	double t_3 = ((a * (y + t)) + (z * (x + y))) / t_1;
	double tmp;
	if (y <= -48000000000000.0) {
		tmp = t_2;
	} else if (y <= -4.1e-76) {
		tmp = ((t * a) - (y * b)) / t_1;
	} else if (y <= -8e-144) {
		tmp = t_3;
	} else if (y <= -8.8e-167) {
		tmp = ((x * z) - (y * b)) / t_1;
	} else if (y <= 1.9e+26) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_1 = y + (x + t)
    t_2 = (z + a) - b
    t_3 = ((a * (y + t)) + (z * (x + y))) / t_1
    if (y <= (-48000000000000.0d0)) then
        tmp = t_2
    else if (y <= (-4.1d-76)) then
        tmp = ((t * a) - (y * b)) / t_1
    else if (y <= (-8d-144)) then
        tmp = t_3
    else if (y <= (-8.8d-167)) then
        tmp = ((x * z) - (y * b)) / t_1
    else if (y <= 1.9d+26) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y + (x + t);
	double t_2 = (z + a) - b;
	double t_3 = ((a * (y + t)) + (z * (x + y))) / t_1;
	double tmp;
	if (y <= -48000000000000.0) {
		tmp = t_2;
	} else if (y <= -4.1e-76) {
		tmp = ((t * a) - (y * b)) / t_1;
	} else if (y <= -8e-144) {
		tmp = t_3;
	} else if (y <= -8.8e-167) {
		tmp = ((x * z) - (y * b)) / t_1;
	} else if (y <= 1.9e+26) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y + (x + t)
	t_2 = (z + a) - b
	t_3 = ((a * (y + t)) + (z * (x + y))) / t_1
	tmp = 0
	if y <= -48000000000000.0:
		tmp = t_2
	elif y <= -4.1e-76:
		tmp = ((t * a) - (y * b)) / t_1
	elif y <= -8e-144:
		tmp = t_3
	elif y <= -8.8e-167:
		tmp = ((x * z) - (y * b)) / t_1
	elif y <= 1.9e+26:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y + Float64(x + t))
	t_2 = Float64(Float64(z + a) - b)
	t_3 = Float64(Float64(Float64(a * Float64(y + t)) + Float64(z * Float64(x + y))) / t_1)
	tmp = 0.0
	if (y <= -48000000000000.0)
		tmp = t_2;
	elseif (y <= -4.1e-76)
		tmp = Float64(Float64(Float64(t * a) - Float64(y * b)) / t_1);
	elseif (y <= -8e-144)
		tmp = t_3;
	elseif (y <= -8.8e-167)
		tmp = Float64(Float64(Float64(x * z) - Float64(y * b)) / t_1);
	elseif (y <= 1.9e+26)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y + (x + t);
	t_2 = (z + a) - b;
	t_3 = ((a * (y + t)) + (z * (x + y))) / t_1;
	tmp = 0.0;
	if (y <= -48000000000000.0)
		tmp = t_2;
	elseif (y <= -4.1e-76)
		tmp = ((t * a) - (y * b)) / t_1;
	elseif (y <= -8e-144)
		tmp = t_3;
	elseif (y <= -8.8e-167)
		tmp = ((x * z) - (y * b)) / t_1;
	elseif (y <= 1.9e+26)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[y, -48000000000000.0], t$95$2, If[LessEqual[y, -4.1e-76], N[(N[(N[(t * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, -8e-144], t$95$3, If[LessEqual[y, -8.8e-167], N[(N[(N[(x * z), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 1.9e+26], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4.1 \cdot 10^{-76}:\\
\;\;\;\;\frac{t \cdot a - y \cdot b}{t_1}\\

\mathbf{elif}\;y \leq -8 \cdot 10^{-144}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -8.8 \cdot 10^{-167}:\\
\;\;\;\;\frac{x \cdot z - y \cdot b}{t_1}\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+26}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.8e13 or 1.9000000000000001e26 < y

    1. Initial program 34.0%

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

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

    if -4.8e13 < y < -4.0999999999999998e-76

    1. Initial program 89.1%

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

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

    if -4.0999999999999998e-76 < y < -7.9999999999999996e-144 or -8.7999999999999999e-167 < y < 1.9000000000000001e26

    1. Initial program 76.0%

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

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

    if -7.9999999999999996e-144 < y < -8.7999999999999999e-167

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -48000000000000:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-76}:\\ \;\;\;\;\frac{t \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-144}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) + z \cdot \left(x + y\right)}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -8.8 \cdot 10^{-167}:\\ \;\;\;\;\frac{x \cdot z - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+26}:\\ \;\;\;\;\frac{a \cdot \left(y + t\right) + z \cdot \left(x + y\right)}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 5: 62.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq -1 \cdot 10^{-75}:\\
\;\;\;\;\frac{t \cdot a - y \cdot b}{t_1}\\

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

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

\mathbf{elif}\;y \leq 3 \cdot 10^{+64}:\\
\;\;\;\;z \cdot \frac{x + y}{t_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.7e12 or 3.0000000000000002e64 < y

    1. Initial program 33.9%

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

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

    if -2.7e12 < y < -9.9999999999999996e-76

    1. Initial program 89.1%

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

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

    if -9.9999999999999996e-76 < y < -2.40000000000000014e-117

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

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

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

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

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

    if -2.40000000000000014e-117 < y < 1.6e-51

    1. Initial program 77.3%

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

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

    if 1.6e-51 < y < 3.0000000000000002e64

    1. Initial program 63.2%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y + x}{\frac{\left(y + t\right) + x}{z}}} \]
    5. Step-by-step derivation
      1. associate-/r/78.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2700000000000:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-75}:\\ \;\;\;\;\frac{t \cdot a - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-117}:\\ \;\;\;\;\frac{x + y}{\frac{x + \left(y + t\right)}{z}}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-51}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+64}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 6: 63.5% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.60000000000000016e-113 or 4.19999999999999983e65 < y

    1. Initial program 43.0%

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

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

    if -4.60000000000000016e-113 < y < 7.50000000000000006e-52

    1. Initial program 76.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 0 62.6%

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

    if 7.50000000000000006e-52 < y < 4.19999999999999983e65

    1. Initial program 63.2%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y + x}{\frac{\left(y + t\right) + x}{z}}} \]
    5. Step-by-step derivation
      1. associate-/r/78.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{-113}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-52}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+65}:\\ \;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 7: 58.2% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.9 \cdot 10^{-73} \lor \neg \left(y \leq 3 \cdot 10^{+64}\right):\\
\;\;\;\;\left(z + a\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.90000000000000028e-73 or 3.0000000000000002e64 < y

    1. Initial program 41.1%

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

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

    if -4.90000000000000028e-73 < y < 3.0000000000000002e64

    1. Initial program 75.2%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y + x}{\frac{\left(y + t\right) + x}{z}}} \]
    5. Step-by-step derivation
      1. associate-/r/49.8%

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

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

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

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

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

Alternative 8: 47.7% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;t \leq -6.5 \cdot 10^{+64}:\\
\;\;\;\;z - b\\

\mathbf{elif}\;t \leq -3.1 \cdot 10^{-41}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{+18}:\\
\;\;\;\;z - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.89999999999999969e93 or -6.50000000000000007e64 < t < -3.10000000000000001e-41 or 2.1e18 < t

    1. Initial program 52.2%

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

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

    if -4.89999999999999969e93 < t < -6.50000000000000007e64 or -3.10000000000000001e-41 < t < 2.1e18

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.9 \cdot 10^{+93}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{+64}:\\ \;\;\;\;z - b\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-41}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+18}:\\ \;\;\;\;z - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 9: 61.2% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+203} \lor \neg \left(x \leq 1.6 \cdot 10^{+124}\right):\\
\;\;\;\;z - \frac{b}{\frac{x}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.45000000000000005e203 or 1.59999999999999996e124 < x

    1. Initial program 40.2%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot b}{x} + z} \]
    5. Step-by-step derivation
      1. +-commutative62.3%

        \[\leadsto \color{blue}{z + -1 \cdot \frac{y \cdot b}{x}} \]
      2. mul-1-neg62.3%

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

        \[\leadsto \color{blue}{z - \frac{y \cdot b}{x}} \]
      4. *-commutative62.3%

        \[\leadsto z - \frac{\color{blue}{b \cdot y}}{x} \]
      5. associate-/l*63.6%

        \[\leadsto z - \color{blue}{\frac{b}{\frac{x}{y}}} \]
    6. Simplified63.6%

      \[\leadsto \color{blue}{z - \frac{b}{\frac{x}{y}}} \]

    if -1.45000000000000005e203 < x < 1.59999999999999996e124

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+203} \lor \neg \left(x \leq 1.6 \cdot 10^{+124}\right):\\ \;\;\;\;z - \frac{b}{\frac{x}{y}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]

Alternative 10: 58.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-137} \lor \neg \left(y \leq 6 \cdot 10^{-113}\right):\\
\;\;\;\;\left(z + a\right) - b\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{x + t}{x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.89999999999999985e-137 or 6.0000000000000002e-113 < y

    1. Initial program 48.3%

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

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

    if -2.89999999999999985e-137 < y < 6.0000000000000002e-113

    1. Initial program 77.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{t + x}{x}}} \]
      2. +-commutative45.5%

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

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

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

Alternative 11: 43.9% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{-70}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq -1.4 \cdot 10^{-303}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 7 \cdot 10^{-296}:\\
\;\;\;\;-b\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{+80}:\\
\;\;\;\;z\\

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


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

    1. Initial program 51.3%

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

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

    if -1.12e-70 < t < -1.4e-303 or 6.9999999999999998e-296 < t < 8.50000000000000007e80

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

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

    if -1.4e-303 < t < 6.9999999999999998e-296

    1. Initial program 67.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot b} \]
    6. Step-by-step derivation
      1. mul-1-neg69.9%

        \[\leadsto \color{blue}{-b} \]
    7. Simplified69.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.12 \cdot 10^{-70}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{-303}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-296}:\\ \;\;\;\;-b\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+80}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 12: 58.4% accurate, 3.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 5.2000000000000001e175

    1. Initial program 60.2%

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

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

    if 5.2000000000000001e175 < t

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.2 \cdot 10^{+175}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 13: 44.4% accurate, 4.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{-70}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 5.8 \cdot 10^{+80}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.12e-70 or 5.79999999999999971e80 < t

    1. Initial program 51.3%

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

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

    if -1.12e-70 < t < 5.79999999999999971e80

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.12 \cdot 10^{-70}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+80}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 14: 33.3% 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 58.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 t around inf 30.9%

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

    \[\leadsto a \]

Developer target: 82.9% 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 2023274 
(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)))