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

Percentage Accurate: 60.8% → 88.5%
Time: 12.2s
Alternatives: 16
Speedup: 1.0×

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

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

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

Alternative 1: 88.5% accurate, 0.1× speedup?

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

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


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

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

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

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

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

      \[\leadsto \color{blue}{\left(\frac{y}{\left(t + x\right) + y} - \frac{\mathsf{fma}\left(z, \frac{y + x}{\left(t + x\right) + y}, a \cdot \frac{t + y}{\left(t + x\right) + y}\right)}{b}\right) \cdot \left(-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.9999999999999999e304

    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 simplification93.2%

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

Alternative 2: 87.0% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{z \cdot \left(\frac{x + y}{t\_1} + \frac{a}{z} \cdot \frac{y + t}{t\_1}\right)}{b} - \frac{y}{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 6.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 77.7%

      \[\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)) < 1.9999999999999999e304

    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

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

    1. Initial program 4.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 b around -inf 19.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 6.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 73.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)) < 4.9999999999999998e274

    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 simplification89.2%

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

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{a + y \cdot \frac{z}{y + t}}{b} - \frac{y}{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 6.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 77.7%

      \[\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)) < 1.9999999999999999e304

    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

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

    1. Initial program 4.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 b around -inf 19.8%

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

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

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

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

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

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

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

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

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

Alternative 5: 91.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(x + y\right)\\ t_2 := \frac{x + y}{t\_1}\\ \mathbf{if}\;a \leq -1.2 \cdot 10^{-53} \lor \neg \left(a \leq 3.9 \cdot 10^{-38}\right):\\ \;\;\;\;a \cdot \left(\frac{t}{t\_1} + \left(\left(\frac{y}{t\_1} + \frac{z}{a} \cdot t\_2\right) - b \cdot \frac{y}{a \cdot t\_1}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\frac{z \cdot \left(t\_2 + \frac{a}{z} \cdot \frac{y + t}{t\_1}\right)}{b} - \frac{y}{y + \left(x + t\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ t (+ x y))) (t_2 (/ (+ x y) t_1)))
   (if (or (<= a -1.2e-53) (not (<= a 3.9e-38)))
     (*
      a
      (+ (/ t t_1) (- (+ (/ y t_1) (* (/ z a) t_2)) (* b (/ y (* a t_1))))))
     (*
      b
      (-
       (/ (* z (+ t_2 (* (/ a z) (/ (+ y t) t_1)))) b)
       (/ y (+ y (+ x t))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (x + y);
	double t_2 = (x + y) / t_1;
	double tmp;
	if ((a <= -1.2e-53) || !(a <= 3.9e-38)) {
		tmp = a * ((t / t_1) + (((y / t_1) + ((z / a) * t_2)) - (b * (y / (a * t_1)))));
	} else {
		tmp = b * (((z * (t_2 + ((a / z) * ((y + t) / t_1)))) / b) - (y / (y + (x + t))));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t + (x + y)
    t_2 = (x + y) / t_1
    if ((a <= (-1.2d-53)) .or. (.not. (a <= 3.9d-38))) then
        tmp = a * ((t / t_1) + (((y / t_1) + ((z / a) * t_2)) - (b * (y / (a * t_1)))))
    else
        tmp = b * (((z * (t_2 + ((a / z) * ((y + t) / t_1)))) / b) - (y / (y + (x + t))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t + (x + y);
	double t_2 = (x + y) / t_1;
	double tmp;
	if ((a <= -1.2e-53) || !(a <= 3.9e-38)) {
		tmp = a * ((t / t_1) + (((y / t_1) + ((z / a) * t_2)) - (b * (y / (a * t_1)))));
	} else {
		tmp = b * (((z * (t_2 + ((a / z) * ((y + t) / t_1)))) / b) - (y / (y + (x + t))));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t + (x + y)
	t_2 = (x + y) / t_1
	tmp = 0
	if (a <= -1.2e-53) or not (a <= 3.9e-38):
		tmp = a * ((t / t_1) + (((y / t_1) + ((z / a) * t_2)) - (b * (y / (a * t_1)))))
	else:
		tmp = b * (((z * (t_2 + ((a / z) * ((y + t) / t_1)))) / b) - (y / (y + (x + t))))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t + Float64(x + y))
	t_2 = Float64(Float64(x + y) / t_1)
	tmp = 0.0
	if ((a <= -1.2e-53) || !(a <= 3.9e-38))
		tmp = Float64(a * Float64(Float64(t / t_1) + Float64(Float64(Float64(y / t_1) + Float64(Float64(z / a) * t_2)) - Float64(b * Float64(y / Float64(a * t_1))))));
	else
		tmp = Float64(b * Float64(Float64(Float64(z * Float64(t_2 + Float64(Float64(a / z) * Float64(Float64(y + t) / t_1)))) / b) - Float64(y / Float64(y + Float64(x + t)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t + (x + y);
	t_2 = (x + y) / t_1;
	tmp = 0.0;
	if ((a <= -1.2e-53) || ~((a <= 3.9e-38)))
		tmp = a * ((t / t_1) + (((y / t_1) + ((z / a) * t_2)) - (b * (y / (a * t_1)))));
	else
		tmp = b * (((z * (t_2 + ((a / z) * ((y + t) / t_1)))) / b) - (y / (y + (x + t))));
	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[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[a, -1.2e-53], N[Not[LessEqual[a, 3.9e-38]], $MachinePrecision]], N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z / a), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(N[(z * N[(t$95$2 + N[(N[(a / z), $MachinePrecision] * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision] - N[(y / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.20000000000000004e-53 or 3.8999999999999999e-38 < a

    1. Initial program 58.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 inf 73.5%

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000004e-53 < a < 3.8999999999999999e-38

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 70.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+55} \lor \neg \left(y \leq 5.5 \cdot 10^{-43}\right):\\
\;\;\;\;\left(z + a\right) - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.4000000000000004e55 or 5.50000000000000013e-43 < y

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

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

    if -7.4000000000000004e55 < y < 5.50000000000000013e-43

    1. Initial program 74.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 b around -inf 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\frac{x}{x + t} + \frac{a}{z} \cdot \frac{t}{\color{blue}{x + t}}\right) \]
    11. Simplified69.8%

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

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

Alternative 7: 47.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-215}:\\
\;\;\;\;a - b\\

\mathbf{elif}\;z \leq 7.7 \cdot 10^{-109}:\\
\;\;\;\;a\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+116}:\\
\;\;\;\;a - b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.4000000000000003e42 or 1.14999999999999997e116 < z

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

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

    if -4.4000000000000003e42 < z < 4.39999999999999993e-215 or 7.70000000000000025e-109 < z < 1.14999999999999997e116

    1. Initial program 73.5%

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

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

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

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

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

    if 4.39999999999999993e-215 < z < 7.70000000000000025e-109

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

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

Alternative 8: 62.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+67} \lor \neg \left(b \leq 2 \cdot 10^{+48}\right):\\ \;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{y + \left(x + t\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) - b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= b -1e+67) (not (<= b 2e+48)))
   (* b (- (/ a 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 <= -1e+67) || !(b <= 2e+48)) {
		tmp = b * ((a / 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 <= (-1d+67)) .or. (.not. (b <= 2d+48))) then
        tmp = b * ((a / 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 <= -1e+67) || !(b <= 2e+48)) {
		tmp = b * ((a / b) - (y / (y + (x + t))));
	} else {
		tmp = (z + a) - b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (b <= -1e+67) or not (b <= 2e+48):
		tmp = b * ((a / 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 <= -1e+67) || !(b <= 2e+48))
		tmp = Float64(b * Float64(Float64(a / b) - Float64(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 <= -1e+67) || ~((b <= 2e+48)))
		tmp = b * ((a / 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, -1e+67], N[Not[LessEqual[b, 2e+48]], $MachinePrecision]], N[(b * N[(N[(a / b), $MachinePrecision] - N[(y / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+67} \lor \neg \left(b \leq 2 \cdot 10^{+48}\right):\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{y + \left(x + t\right)}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -9.99999999999999983e66 or 2.00000000000000009e48 < b

    1. Initial program 58.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 b around -inf 68.2%

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

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

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

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

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

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

    if -9.99999999999999983e66 < b < 2.00000000000000009e48

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

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

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

Alternative 9: 65.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.3999999999999999e-64 or 1.60000000000000012e-42 < y

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

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

    if -4.3999999999999999e-64 < y < 1.60000000000000012e-42

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

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

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

Alternative 10: 56.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.99999999999999985e-19

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

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

    if -5.99999999999999985e-19 < z < 2.3e110

    1. Initial program 73.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 0 61.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.3e110 < z

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

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

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

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

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

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

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

Alternative 11: 58.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+86}:\\
\;\;\;\;a - b \cdot \frac{y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2e86

    1. Initial program 48.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 0 39.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(b \cdot \frac{y}{a \cdot \left(t + y\right)} + -1\right)} \]
    10. Taylor expanded in y around 0 60.9%

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

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

        \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]
      3. associate-/l*73.9%

        \[\leadsto a - \color{blue}{b \cdot \frac{y}{t}} \]
    12. Simplified73.9%

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

    if -2e86 < t < 2.4e115

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

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

    if 2.4e115 < t

    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 z around 0 40.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \frac{y}{t + y} + \frac{a}{b}\right)} \]
    11. Step-by-step derivation
      1. +-commutative57.7%

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

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

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

        \[\leadsto b \cdot \left(\frac{a}{b} - \frac{y}{\color{blue}{y + t}}\right) \]
    12. Simplified57.7%

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

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

Alternative 12: 59.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+86}:\\
\;\;\;\;a - b \cdot \frac{y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.5000000000000005e86

    1. Initial program 48.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 0 39.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(b \cdot \frac{y}{a \cdot \left(t + y\right)} + -1\right)} \]
    10. Taylor expanded in y around 0 60.9%

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

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

        \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]
      3. associate-/l*73.9%

        \[\leadsto a - \color{blue}{b \cdot \frac{y}{t}} \]
    12. Simplified73.9%

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

    if -8.5000000000000005e86 < t < 4.00000000000000007e141

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

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

    if 4.00000000000000007e141 < t

    1. Initial program 50.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 inf 37.0%

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

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

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

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

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

Alternative 13: 59.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.8 \cdot 10^{+85} \lor \neg \left(t \leq 4.1 \cdot 10^{+141}\right):\\
\;\;\;\;a - b \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.8000000000000007e85 or 4.10000000000000022e141 < t

    1. Initial program 49.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 0 39.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(b \cdot \frac{y}{a \cdot \left(t + y\right)} + -1\right)} \]
    10. Taylor expanded in y around 0 59.6%

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

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

        \[\leadsto \color{blue}{a - \frac{b \cdot y}{t}} \]
      3. associate-/l*66.7%

        \[\leadsto a - \color{blue}{b \cdot \frac{y}{t}} \]
    12. Simplified66.7%

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

    if -8.8000000000000007e85 < t < 4.10000000000000022e141

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

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

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

Alternative 14: 58.2% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.55e130 or 5.59999999999999996e143 < t

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

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

    if -1.55e130 < t < 5.59999999999999996e143

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+130}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+143}:\\ \;\;\;\;\left(z + a\right) - b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 43.6% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 8.2 \cdot 10^{+42}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.1499999999999999e174 or 8.2000000000000001e42 < x

    1. Initial program 51.4%

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

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

    if -1.1499999999999999e174 < x < 8.2000000000000001e42

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

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

Alternative 16: 33.1% 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 62.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 t around inf 33.3%

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

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

  :alt
  (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)))