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

Percentage Accurate: 60.5% → 87.6%
Time: 13.4s
Alternatives: 12
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

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

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(y + t\right)\\ t_2 := t + \left(x + y\right)\\ t_3 := \frac{\left(z \cdot \left(x + y\right) + t\_1\right) - y \cdot b}{y + \left(x + t\right)}\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+259}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x + y, z, t\_1\right) - y \cdot b}{x + \left(y + t\right)}\\ \mathbf{else}:\\ \;\;\;\;z + a \cdot \left(\frac{y}{t\_2} + \frac{t}{t\_2}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (+ y t)))
        (t_2 (+ t (+ x y)))
        (t_3 (/ (- (+ (* z (+ x y)) t_1) (* y b)) (+ y (+ x t)))))
   (if (<= t_3 (- INFINITY))
     (- (+ z a) b)
     (if (<= t_3 5e+259)
       (/ (- (fma (+ x y) z t_1) (* y b)) (+ x (+ y t)))
       (+ z (* a (+ (/ y t_2) (/ t t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (y + t);
	double t_2 = t + (x + y);
	double t_3 = (((z * (x + y)) + t_1) - (y * b)) / (y + (x + t));
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = (z + a) - b;
	} else if (t_3 <= 5e+259) {
		tmp = (fma((x + y), z, t_1) - (y * b)) / (x + (y + t));
	} else {
		tmp = z + (a * ((y / t_2) + (t / t_2)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(y + t))
	t_2 = Float64(t + Float64(x + y))
	t_3 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + t_1) - Float64(y * b)) / Float64(y + Float64(x + t)))
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = Float64(Float64(z + a) - b);
	elseif (t_3 <= 5e+259)
		tmp = Float64(Float64(fma(Float64(x + y), z, t_1) - Float64(y * b)) / Float64(x + Float64(y + t)));
	else
		tmp = Float64(z + Float64(a * Float64(Float64(y / t_2) + Float64(t / t_2))));
	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[(t + N[(x + y), $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] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t$95$3, 5e+259], 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], N[(z + N[(a * N[(N[(y / t$95$2), $MachinePrecision] + N[(t / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

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


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

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

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

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

    1. Initial program 99.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. Step-by-step derivation
      1. fma-define99.0%

        \[\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.0%

        \[\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.0%

        \[\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.0%

        \[\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.0%

      \[\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

    if 5.00000000000000033e259 < (/.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.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 a around 0 29.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+259}:\\
\;\;\;\;t\_2\\

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


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

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

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

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

    1. Initial program 99.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

    if 5.00000000000000033e259 < (/.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.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 a around 0 29.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 71.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
\mathbf{if}\;b \leq -2.9 \cdot 10^{+115} \lor \neg \left(b \leq 1.72 \cdot 10^{+53}\right):\\
\;\;\;\;b \cdot \frac{z \cdot \frac{x + y}{b} - y}{y + \left(x + t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.90000000000000005e115 or 1.72e53 < b

    1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

    if -2.90000000000000005e115 < b < 1.72e53

    1. Initial program 64.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 a around 0 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.9 \cdot 10^{+104} \lor \neg \left(b \leq 2700000000\right):\\
\;\;\;\;b \cdot \frac{z \cdot \frac{x + y}{b} - y}{y + \left(x + t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.89999999999999985e104 or 2.7e9 < b

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

    if -4.89999999999999985e104 < b < 2.7e9

    1. Initial program 61.9%

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

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

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

Alternative 5: 60.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+74}:\\
\;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\

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

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


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

    1. Initial program 35.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 20.3%

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

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

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

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

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

    if -6.7999999999999998e74 < x < 7.5999999999999994e51

    1. Initial program 68.4%

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

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

    if 7.5999999999999994e51 < x

    1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 52.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq -5.2 \cdot 10^{-94}:\\
\;\;\;\;z + a\\

\mathbf{elif}\;x \leq 4.8 \cdot 10^{-247}:\\
\;\;\;\;a - b\\

\mathbf{elif}\;x \leq 1.05 \cdot 10^{+149}:\\
\;\;\;\;z + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.99999999999999995e233 or 1.0500000000000001e149 < x

    1. Initial program 45.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 x around inf 69.3%

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

    if -1.99999999999999995e233 < x < -5.19999999999999988e-94 or 4.80000000000000022e-247 < x < 1.0500000000000001e149

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.19999999999999988e-94 < x < 4.80000000000000022e-247

    1. Initial program 68.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+233}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq -5.2 \cdot 10^{-94}:\\ \;\;\;\;z + a\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-247}:\\ \;\;\;\;a - b\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+149}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 61.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+188} \lor \neg \left(x \leq 8.5 \cdot 10^{+124}\right):\\
\;\;\;\;z + a \cdot \frac{y + t}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.75000000000000004e188 or 8.4999999999999997e124 < x

    1. Initial program 45.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{\color{blue}{y + t}}{x} + z \]
    9. Simplified74.7%

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

    if -1.75000000000000004e188 < x < 8.4999999999999997e124

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

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

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

Alternative 8: 60.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+74}:\\
\;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\

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

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


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

    1. Initial program 35.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 20.3%

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

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

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

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

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

    if -6.20000000000000043e74 < x < 2.2500000000000002e124

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

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

    if 2.2500000000000002e124 < x

    1. Initial program 54.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 a around 0 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{\color{blue}{y + t}}{x} + z \]
    9. Simplified74.3%

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

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

Alternative 9: 57.7% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.1000000000000001e190 or 1.84999999999999998e131 < x

    1. Initial program 45.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 x around inf 64.1%

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

    if -2.1000000000000001e190 < x < 1.84999999999999998e131

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

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

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

Alternative 10: 52.9% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x \leq 1.32 \cdot 10^{+144}:\\
\;\;\;\;z + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.40000000000000003e233 or 1.32e144 < x

    1. Initial program 45.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 x around inf 69.3%

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

    if -2.40000000000000003e233 < x < 1.32e144

    1. Initial program 65.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 a around 0 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.4 \cdot 10^{+233}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 1.32 \cdot 10^{+144}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 44.6% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 9.2 \cdot 10^{+51}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.09999999999999965e65 or 9.2000000000000002e51 < x

    1. Initial program 48.8%

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

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

    if -6.09999999999999965e65 < x < 9.2000000000000002e51

    1. Initial program 68.2%

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

      \[\leadsto \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 32.7% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 61.0%

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

    \[\leadsto \color{blue}{a} \]
  4. Add Preprocessing

Developer Target 1: 81.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024135 
(FPCore (x y z t a b)
  :name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3581311708415056400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 12285964308315609000000000000000000000000000000000000000000000000000000000000000000) (/ 1 (/ (+ (+ 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)))