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

Percentage Accurate: 59.6% → 91.1%
Time: 18.0s
Alternatives: 17
Speedup: 0.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 17 alternatives:

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

Initial Program: 59.6% 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: 91.1% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 7.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.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. fma-def99.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x + y, z, \left(y + t\right) \cdot a\right) - y \cdot b}{x + \left(y + t\right)}} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification91.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 \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 5 \cdot 10^{+241}\right):\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}} + \frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x + y, z, a \cdot \left(y + t\right)\right) - y \cdot b}{x + \left(y + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 91.1% accurate, 0.3× speedup?

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

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

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

    1. Initial program 7.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.8%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification91.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 \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 5 \cdot 10^{+241}\right):\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}} + \frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\ \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} \]
  5. Add Preprocessing

Alternative 3: 90.8% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+301}\right):\\
\;\;\;\;\frac{a}{\frac{t\_1}{y + t}} + \left(z - b\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 1.00000000000000005e301 < (/.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. Add Preprocessing
    3. Taylor expanded in z around inf 5.4%

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

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

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

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

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

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

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

    1. Initial program 99.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)} \leq -\infty \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 10^{+301}\right):\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}} + \left(z - b\right)\\ \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} \]
  5. Add Preprocessing

Alternative 4: 60.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x \leq -4.1 \cdot 10^{-116}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 5.3 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.05 \cdot 10^{+54}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 1.2 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.45e206

    1. Initial program 50.4%

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

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

    if -2.45e206 < x < -4.0999999999999999e-116 or 5.3000000000000002e-20 < x < 1.04999999999999993e54

    1. Initial program 57.2%

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

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

    if -4.0999999999999999e-116 < x < 5.3000000000000002e-20 or 1.04999999999999993e54 < x < 1.1999999999999999e133

    1. Initial program 69.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{a}{1} + \frac{z}{\color{blue}{\frac{t + y}{y}}} \]
    11. Step-by-step derivation
      1. +-commutative73.3%

        \[\leadsto \frac{a}{1} + \frac{z}{\frac{\color{blue}{y + t}}{y}} \]
    12. Simplified73.3%

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

    if 1.1999999999999999e133 < x

    1. Initial program 33.6%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in a around 0 23.1%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t + x}{z}}} \]
      2. associate-/r/63.5%

        \[\leadsto \color{blue}{\frac{x}{t + x} \cdot z} \]
      3. +-commutative63.5%

        \[\leadsto \frac{x}{\color{blue}{x + t}} \cdot z \]
    6. Simplified63.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.45 \cdot 10^{+206}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -4.1 \cdot 10^{-116}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 5.3 \cdot 10^{-20}:\\ \;\;\;\;a + \frac{z}{\frac{y + t}{y}}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+54}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+133}:\\ \;\;\;\;a + \frac{z}{\frac{y + t}{y}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 57.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1350000000000:\\
\;\;\;\;\left(z + a\right) - b\\

\mathbf{elif}\;z \leq -2 \cdot 10^{-144}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+29}:\\
\;\;\;\;\frac{a}{\frac{t\_1}{y + t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.00000000000000002e136 or 8.5000000000000006e29 < z

    1. Initial program 45.7%

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

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

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

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

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

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

    if -7.00000000000000002e136 < z < -1.35e12

    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. Add Preprocessing
    3. Taylor expanded in y around inf 80.3%

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

    if -1.35e12 < z < -1.9999999999999999e-144

    1. Initial program 79.1%

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

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

    if -1.9999999999999999e-144 < z < 8.5000000000000006e29

    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. Add Preprocessing
    3. Taylor expanded in a around inf 41.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+136}:\\ \;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\ \mathbf{elif}\;z \leq -1350000000000:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-144}:\\ \;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+29}:\\ \;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 79.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{+205} \lor \neg \left(x \leq 6.2 \cdot 10^{+55}\right):\\
\;\;\;\;z + t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{y}{\frac{y + t}{z - b}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.79999999999999972e205 or 6.19999999999999987e55 < 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. Add Preprocessing
    3. Taylor expanded in z around inf 45.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999972e205 < x < 6.19999999999999987e55

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 61.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+161} \lor \neg \left(t \leq -5.2 \cdot 10^{+97} \lor \neg \left(t \leq -6.5 \cdot 10^{+59}\right) \land t \leq 9.5 \cdot 10^{+38}\right):\\
\;\;\;\;a + \frac{z}{\frac{t}{x + y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.1e161 or -5.2e97 < t < -6.50000000000000021e59 or 9.4999999999999995e38 < t

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e161 < t < -5.2e97 or -6.50000000000000021e59 < t < 9.4999999999999995e38

    1. Initial program 60.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+161} \lor \neg \left(t \leq -5.2 \cdot 10^{+97} \lor \neg \left(t \leq -6.5 \cdot 10^{+59}\right) \land t \leq 9.5 \cdot 10^{+38}\right):\\ \;\;\;\;a + \frac{z}{\frac{t}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z + \frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \mathbf{if}\;x \leq -9.6 \cdot 10^{-120}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-27}:\\ \;\;\;\;a + \frac{z}{\frac{y + t}{y}}\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+22}:\\ \;\;\;\;\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 (+ z (/ a (/ (+ y (+ x t)) (+ y t))))))
   (if (<= x -9.6e-120)
     t_1
     (if (<= x 1.95e-27)
       (+ a (/ z (/ (+ y t) y)))
       (if (<= x 1.9e+22) (- (+ z a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (a / ((y + (x + t)) / (y + t)));
	double tmp;
	if (x <= -9.6e-120) {
		tmp = t_1;
	} else if (x <= 1.95e-27) {
		tmp = a + (z / ((y + t) / y));
	} else if (x <= 1.9e+22) {
		tmp = (z + a) - b;
	} 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 / ((y + (x + t)) / (y + t)))
    if (x <= (-9.6d-120)) then
        tmp = t_1
    else if (x <= 1.95d-27) then
        tmp = a + (z / ((y + t) / y))
    else if (x <= 1.9d+22) then
        tmp = (z + a) - b
    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 / ((y + (x + t)) / (y + t)));
	double tmp;
	if (x <= -9.6e-120) {
		tmp = t_1;
	} else if (x <= 1.95e-27) {
		tmp = a + (z / ((y + t) / y));
	} else if (x <= 1.9e+22) {
		tmp = (z + a) - b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z + (a / ((y + (x + t)) / (y + t)))
	tmp = 0
	if x <= -9.6e-120:
		tmp = t_1
	elif x <= 1.95e-27:
		tmp = a + (z / ((y + t) / y))
	elif x <= 1.9e+22:
		tmp = (z + a) - b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z + Float64(a / Float64(Float64(y + Float64(x + t)) / Float64(y + t))))
	tmp = 0.0
	if (x <= -9.6e-120)
		tmp = t_1;
	elseif (x <= 1.95e-27)
		tmp = Float64(a + Float64(z / Float64(Float64(y + t) / y)));
	elseif (x <= 1.9e+22)
		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 = z + (a / ((y + (x + t)) / (y + t)));
	tmp = 0.0;
	if (x <= -9.6e-120)
		tmp = t_1;
	elseif (x <= 1.95e-27)
		tmp = a + (z / ((y + t) / y));
	elseif (x <= 1.9e+22)
		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[(z + N[(a / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.6e-120], t$95$1, If[LessEqual[x, 1.95e-27], N[(a + N[(z / N[(N[(y + t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e+22], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.5999999999999998e-120 or 1.9000000000000002e22 < x

    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. Add Preprocessing
    3. Taylor expanded in z around inf 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5999999999999998e-120 < x < 1.94999999999999986e-27

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{a}{1} + \frac{z}{\color{blue}{\frac{t + y}{y}}} \]
    11. Step-by-step derivation
      1. +-commutative74.1%

        \[\leadsto \frac{a}{1} + \frac{z}{\frac{\color{blue}{y + t}}{y}} \]
    12. Simplified74.1%

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

    if 1.94999999999999986e-27 < x < 1.9000000000000002e22

    1. Initial program 53.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.6 \cdot 10^{-120}:\\ \;\;\;\;z + \frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-27}:\\ \;\;\;\;a + \frac{z}{\frac{y + t}{y}}\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+22}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z + \frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 59.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq -2.5 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 2.8 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -4.79999999999999972e205

    1. Initial program 50.4%

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

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

    if -4.79999999999999972e205 < x < -2.50000000000000004e-195 or -9.00000000000000029e-219 < x < 2.8000000000000001e138

    1. Initial program 62.8%

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

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

    if -2.50000000000000004e-195 < x < -9.00000000000000029e-219

    1. Initial program 75.1%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in t around -inf 89.7%

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

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

        \[\leadsto \color{blue}{a - \frac{-1 \cdot \left(x \cdot z\right) - -1 \cdot \left(a \cdot x\right)}{t}} \]
      3. distribute-lft-out--89.7%

        \[\leadsto a - \frac{\color{blue}{-1 \cdot \left(x \cdot z - a \cdot x\right)}}{t} \]
      4. mul-1-neg89.7%

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

        \[\leadsto a - \frac{-\left(x \cdot z - \color{blue}{x \cdot a}\right)}{t} \]
      6. distribute-lft-out--89.7%

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

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

    if 2.8000000000000001e138 < x

    1. Initial program 35.8%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in a around 0 24.4%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t + x}{z}}} \]
      2. associate-/r/63.2%

        \[\leadsto \color{blue}{\frac{x}{t + x} \cdot z} \]
      3. +-commutative63.2%

        \[\leadsto \frac{x}{\color{blue}{x + t}} \cdot z \]
    6. Simplified63.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{+205}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -2.5 \cdot 10^{-195}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;x \leq -9 \cdot 10^{-219}:\\ \;\;\;\;a + \frac{x \cdot \left(z - a\right)}{t}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+138}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x}{x + t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 43.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+58}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq -4 \cdot 10^{-86}:\\
\;\;\;\;a\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-154}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq -2.35 \cdot 10^{-164}:\\
\;\;\;\;-b\\

\mathbf{elif}\;z \leq 21:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.64999999999999991e58 or -4.00000000000000034e-86 < z < -1.19999999999999993e-154 or 21 < z

    1. Initial program 50.0%

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

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

    if -1.64999999999999991e58 < z < -4.00000000000000034e-86 or -2.3499999999999998e-164 < z < 21

    1. Initial program 68.7%

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

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

    if -1.19999999999999993e-154 < z < -2.3499999999999998e-164

    1. Initial program 42.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+58}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-86}:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-154}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{-164}:\\ \;\;\;\;-b\\ \mathbf{elif}\;z \leq 21:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 71.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.8000000000000005e42 or 4.8e11 < a

    1. Initial program 43.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.8000000000000005e42 < a < 4.8e11

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 70.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq 120000000000:\\
\;\;\;\;a + \frac{z}{\frac{t\_1}{x + y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.00000000000000022e41

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

    if -5.00000000000000022e41 < a < 1.2e11

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2e11 < a

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 59.2% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.10000000000000001e206

    1. Initial program 50.4%

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

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

    if -1.10000000000000001e206 < x < 6.2e139

    1. Initial program 63.3%

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

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

    if 6.2e139 < x

    1. Initial program 35.8%

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

      \[\leadsto \color{blue}{\frac{a \cdot t + x \cdot z}{t + x}} \]
    4. Taylor expanded in a around 0 24.4%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t + x}{z}}} \]
      2. associate-/r/63.2%

        \[\leadsto \color{blue}{\frac{x}{t + x} \cdot z} \]
      3. +-commutative63.2%

        \[\leadsto \frac{x}{\color{blue}{x + t}} \cdot z \]
    6. Simplified63.2%

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

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

Alternative 14: 58.8% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.45e206 or 3.9999999999999998e197 < x

    1. Initial program 43.0%

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

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

    if -2.45e206 < x < 3.9999999999999998e197

    1. Initial program 61.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.45 \cdot 10^{+206}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+197}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 44.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+58}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq 13.5:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2499999999999999e58 or 13.5 < z

    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. Add Preprocessing
    3. Taylor expanded in x around inf 54.9%

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

    if -2.2499999999999999e58 < z < 13.5

    1. Initial program 67.1%

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

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

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

Alternative 16: 44.7% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1350000:\\
\;\;\;\;z - b\\

\mathbf{elif}\;z \leq 0.21:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.35e6

    1. Initial program 42.8%

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

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

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

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

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

    if -1.35e6 < z < 0.209999999999999992

    1. Initial program 67.8%

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

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

    if 0.209999999999999992 < z

    1. Initial program 53.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1350000:\\ \;\;\;\;z - b\\ \mathbf{elif}\;z \leq 0.21:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 32.6% 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.5%

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

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

    \[\leadsto a \]
  5. Add Preprocessing

Developer target: 82.5% 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 2024040 
(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)))