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

Percentage Accurate: 60.5% → 87.5%
Time: 13.1s
Alternatives: 12
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 60.5% accurate, 1.0× speedup?

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

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

Alternative 1: 87.5% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 8.9%

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

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

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

    1. Initial program 99.0%

      \[\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y} \]
    2. Step-by-step derivation
      1. fma-define99.0%

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

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

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

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

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

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

Alternative 2: 87.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 4 \cdot 10^{+251}\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.0000000000000002e251 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y))

    1. Initial program 8.9%

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

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

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

    1. Initial program 99.0%

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

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

Alternative 3: 67.5% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -9.2000000000000006e-64 or 2.6000000000000001e-78 < b

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

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

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

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

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

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

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

    if -9.2000000000000006e-64 < b < 3.4000000000000001e-187

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

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

    if 3.4000000000000001e-187 < b < 2.6000000000000001e-78

    1. Initial program 83.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 0 83.8%

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

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

Alternative 4: 67.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.95 \cdot 10^{-63} \lor \neg \left(b \leq 4.4 \cdot 10^{-85}\right):\\
\;\;\;\;b \cdot \left(\left(\frac{a}{b} + \frac{z}{b}\right) - \frac{y}{x + \left(y + t\right)}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.95000000000000011e-63 or 4.4e-85 < b

    1. Initial program 61.0%

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

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

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

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

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

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

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

    if -1.95000000000000011e-63 < b < 4.4e-85

    1. Initial program 60.9%

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

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

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

Alternative 5: 60.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 7.6 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.9e-127 or 1.0000000000000001e-114 < z < 7.60000000000000024e160

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

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

    if -2.9e-127 < z < 1.0000000000000001e-114

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

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

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

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

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

    if 7.60000000000000024e160 < z

    1. Initial program 46.9%

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

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

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

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

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

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

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

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

Alternative 6: 59.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 35.1%

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

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

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

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

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

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

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

    if -7.00000000000000029e74 < x < 9.20000000000000085e130

    1. Initial program 68.0%

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

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

    if 9.20000000000000085e130 < x

    1. Initial program 54.0%

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

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

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

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

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

Alternative 7: 57.9% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 35.1%

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

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

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

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

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

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

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

    if -7.4000000000000002e74 < x < 4.1999999999999999e128

    1. Initial program 68.0%

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

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

    if 4.1999999999999999e128 < x

    1. Initial program 54.0%

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

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

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

Alternative 8: 56.3% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 35.1%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{t + x}} \]
    7. Simplified66.0%

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

    if -6.7999999999999998e74 < x < 1.9999999999999998e131

    1. Initial program 68.0%

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

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

    if 1.9999999999999998e131 < x

    1. Initial program 54.0%

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

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

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

Alternative 9: 57.7% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.79999999999999972e191 or 9.50000000000000041e125 < x

    1. Initial program 45.8%

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

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

    if -4.79999999999999972e191 < x < 9.50000000000000041e125

    1. Initial program 66.1%

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

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

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

Alternative 10: 52.9% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x \leq 7 \cdot 10^{+142}:\\
\;\;\;\;z + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.9000000000000001e231 or 6.99999999999999995e142 < x

    1. Initial program 45.1%

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

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

    if -2.9000000000000001e231 < x < 6.99999999999999995e142

    1. Initial program 65.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+231}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+142}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 44.7% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.02e69 or 2.30000000000000005e51 < x

    1. Initial program 48.8%

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

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

    if -1.02e69 < x < 2.30000000000000005e51

    1. Initial program 68.2%

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

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

Alternative 12: 32.7% accurate, 21.0× speedup?

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (! :herbie-platform default (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3581311708415056400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 12285964308315609000000000000000000000000000000000000000000000000000000000000000000) (/ 1 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b))))

  (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))