Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2

Percentage Accurate: 95.0% → 97.9%
Time: 16.6s
Alternatives: 17
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
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 - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 95.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
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 - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 97.9% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\right)\\


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

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing

    if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b))

    1. Initial program 0.0%

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

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

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

Alternative 2: 97.5% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right) \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
	return fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b)
	return fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0)))))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Derivation
  1. Initial program 95.7%

    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
  2. Step-by-step derivation
    1. +-commutative95.7%

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{y + \left(t - 2\right)}, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
    4. sub-neg97.7%

      \[\leadsto \mathsf{fma}\left(y + \color{blue}{\left(t + \left(-2\right)\right)}, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
    5. metadata-eval97.7%

      \[\leadsto \mathsf{fma}\left(y + \left(t + \color{blue}{-2}\right), b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
    6. sub-neg97.7%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \left(t + -1\right) \cdot a\right)\right)} \]
  4. Add Preprocessing
  5. Final simplification98.0%

    \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right) \]
  6. Add Preprocessing

Alternative 3: 84.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -5 \cdot 10^{+63} \lor \neg \left(b \leq 1.4 \cdot 10^{+129}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.00000000000000011e63 or 1.39999999999999987e129 < b

    1. Initial program 94.0%

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

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

    if -5.00000000000000011e63 < b < 1.39999999999999987e129

    1. Initial program 96.5%

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

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

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

Alternative 4: 83.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+64} \lor \neg \left(b \leq 1.4 \cdot 10^{+129}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.3e64 or 1.39999999999999987e129 < b

    1. Initial program 94.0%

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

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

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

    if -2.3e64 < b < 1.39999999999999987e129

    1. Initial program 96.5%

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

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

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

Alternative 5: 49.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -2000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.6 \cdot 10^{-210}:\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{elif}\;y \leq 8.6 \cdot 10^{+58}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2e9 or 8.59999999999999982e58 < y

    1. Initial program 91.6%

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

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

    if -2e9 < y < 1.60000000000000014e-210

    1. Initial program 98.8%

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

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

    if 1.60000000000000014e-210 < y < 8.59999999999999982e58

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 71.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{+63} \lor \neg \left(b \leq 1.4 \cdot 10^{+129}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.2000000000000001e63 or 1.39999999999999987e129 < b

    1. Initial program 94.0%

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

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

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

    if -6.2000000000000001e63 < b < 1.39999999999999987e129

    1. Initial program 96.5%

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

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg73.3%

        \[\leadsto \left(x - -1 \cdot a\right) - z \cdot \color{blue}{\left(y + \left(-1\right)\right)} \]
      3. metadata-eval73.3%

        \[\leadsto \left(x - -1 \cdot a\right) - z \cdot \left(y + \color{blue}{-1}\right) \]
      4. sub-neg73.3%

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) + \left(-z \cdot \left(y + -1\right)\right)} \]
      5. sub-neg73.3%

        \[\leadsto \color{blue}{\left(x + \left(--1 \cdot a\right)\right)} + \left(-z \cdot \left(y + -1\right)\right) \]
      6. mul-1-neg73.3%

        \[\leadsto \left(x + \left(-\color{blue}{\left(-a\right)}\right)\right) + \left(-z \cdot \left(y + -1\right)\right) \]
      7. remove-double-neg73.3%

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

        \[\leadsto \left(x + a\right) + \color{blue}{z \cdot \left(-\left(y + -1\right)\right)} \]
      9. distribute-neg-in73.3%

        \[\leadsto \left(x + a\right) + z \cdot \color{blue}{\left(\left(-y\right) + \left(--1\right)\right)} \]
      10. metadata-eval73.3%

        \[\leadsto \left(x + a\right) + z \cdot \left(\left(-y\right) + \color{blue}{1}\right) \]
      11. +-commutative73.3%

        \[\leadsto \left(x + a\right) + z \cdot \color{blue}{\left(1 + \left(-y\right)\right)} \]
      12. sub-neg73.3%

        \[\leadsto \left(x + a\right) + z \cdot \color{blue}{\left(1 - y\right)} \]
    6. Simplified73.3%

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

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

Alternative 7: 63.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{+63} \lor \neg \left(b \leq 1.4 \cdot 10^{+129}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.50000000000000004e63 or 1.39999999999999987e129 < b

    1. Initial program 94.0%

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

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

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

    if -5.50000000000000004e63 < b < 1.39999999999999987e129

    1. Initial program 96.5%

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

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

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

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

Alternative 8: 27.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{-36}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-196}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.25000000000000001e-36 or 2.3999999999999999e61 < y

    1. Initial program 91.9%

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

      \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
    4. Taylor expanded in y around inf 48.5%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg48.5%

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-lft-neg-out48.5%

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative48.5%

        \[\leadsto \color{blue}{z \cdot \left(-y\right)} \]
    6. Simplified48.5%

      \[\leadsto \color{blue}{z \cdot \left(-y\right)} \]

    if -1.25000000000000001e-36 < y < -1.7e-196

    1. Initial program 100.0%

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

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

    if -1.7e-196 < y < 2.3999999999999999e61

    1. Initial program 98.9%

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

      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
    4. Taylor expanded in b around 0 25.4%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} \]
    5. Step-by-step derivation
      1. neg-mul-125.4%

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-rgt-neg-in25.4%

        \[\leadsto \color{blue}{a \cdot \left(-t\right)} \]
    6. Simplified25.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{-36}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-196}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+61}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 26.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-36}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -1.3 \cdot 10^{-196}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{+83}:\\
\;\;\;\;t \cdot \left(-a\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.89999999999999985e-36 or 8.4999999999999995e83 < y

    1. Initial program 91.7%

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

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

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

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

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

      \[\leadsto \color{blue}{b \cdot y} \]
    7. Step-by-step derivation
      1. *-commutative36.6%

        \[\leadsto \color{blue}{y \cdot b} \]
    8. Simplified36.6%

      \[\leadsto \color{blue}{y \cdot b} \]

    if -1.89999999999999985e-36 < y < -1.2999999999999999e-196

    1. Initial program 100.0%

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

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

    if -1.2999999999999999e-196 < y < 8.4999999999999995e83

    1. Initial program 99.0%

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

      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
    4. Taylor expanded in b around 0 24.7%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} \]
    5. Step-by-step derivation
      1. neg-mul-124.7%

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-rgt-neg-in24.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{-36}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-196}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+83}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 26.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-36}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -6 \cdot 10^{-192}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{-14}:\\
\;\;\;\;z\\

\mathbf{else}:\\
\;\;\;\;y \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.7000000000000001e-36 or 1.4e-14 < y

    1. Initial program 92.7%

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

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

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

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

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

      \[\leadsto \color{blue}{b \cdot y} \]
    7. Step-by-step derivation
      1. *-commutative33.4%

        \[\leadsto \color{blue}{y \cdot b} \]
    8. Simplified33.4%

      \[\leadsto \color{blue}{y \cdot b} \]

    if -1.7000000000000001e-36 < y < -5.9999999999999998e-192

    1. Initial program 100.0%

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

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

    if -5.9999999999999998e-192 < y < 1.4e-14

    1. Initial program 98.8%

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

      \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
    4. Taylor expanded in y around 0 24.3%

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

Alternative 11: 61.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+64} \lor \neg \left(b \leq 1.55 \cdot 10^{+129}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.4000000000000002e64 or 1.55e129 < b

    1. Initial program 94.0%

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

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

    if -3.4000000000000002e64 < b < 1.55e129

    1. Initial program 96.5%

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

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

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

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

Alternative 12: 56.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1750000000000 \lor \neg \left(y \leq 3.4 \cdot 10^{+48}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.75e12 or 3.4000000000000003e48 < y

    1. Initial program 91.8%

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

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

    if -1.75e12 < y < 3.4000000000000003e48

    1. Initial program 99.2%

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

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg56.1%

        \[\leadsto \left(x - -1 \cdot a\right) - z \cdot \color{blue}{\left(y + \left(-1\right)\right)} \]
      3. metadata-eval56.1%

        \[\leadsto \left(x - -1 \cdot a\right) - z \cdot \left(y + \color{blue}{-1}\right) \]
      4. sub-neg56.1%

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) + \left(-z \cdot \left(y + -1\right)\right)} \]
      5. sub-neg56.1%

        \[\leadsto \color{blue}{\left(x + \left(--1 \cdot a\right)\right)} + \left(-z \cdot \left(y + -1\right)\right) \]
      6. mul-1-neg56.1%

        \[\leadsto \left(x + \left(-\color{blue}{\left(-a\right)}\right)\right) + \left(-z \cdot \left(y + -1\right)\right) \]
      7. remove-double-neg56.1%

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

        \[\leadsto \left(x + a\right) + \color{blue}{z \cdot \left(-\left(y + -1\right)\right)} \]
      9. distribute-neg-in56.1%

        \[\leadsto \left(x + a\right) + z \cdot \color{blue}{\left(\left(-y\right) + \left(--1\right)\right)} \]
      10. metadata-eval56.1%

        \[\leadsto \left(x + a\right) + z \cdot \left(\left(-y\right) + \color{blue}{1}\right) \]
      11. +-commutative56.1%

        \[\leadsto \left(x + a\right) + z \cdot \color{blue}{\left(1 + \left(-y\right)\right)} \]
      12. sub-neg56.1%

        \[\leadsto \left(x + a\right) + z \cdot \color{blue}{\left(1 - y\right)} \]
    6. Simplified56.1%

      \[\leadsto \color{blue}{\left(x + a\right) + z \cdot \left(1 - y\right)} \]
    7. Taylor expanded in y around 0 55.9%

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

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

Alternative 13: 47.6% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+45} \lor \neg \left(t \leq 3 \cdot 10^{+38}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.39999999999999989e45 or 3.0000000000000001e38 < t

    1. Initial program 91.7%

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

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

    if -2.39999999999999989e45 < t < 3.0000000000000001e38

    1. Initial program 98.6%

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

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

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

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

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

      \[\leadsto \color{blue}{b \cdot \left(y - 2\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+45} \lor \neg \left(t \leq 3 \cdot 10^{+38}\right):\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 35.1% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+25} \lor \neg \left(y \leq 1.6 \cdot 10^{+59}\right):\\
\;\;\;\;z \cdot \left(-y\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.00000000000000009e25 or 1.59999999999999991e59 < y

    1. Initial program 91.6%

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

      \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
    4. Taylor expanded in y around inf 50.4%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg50.4%

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-lft-neg-out50.4%

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative50.4%

        \[\leadsto \color{blue}{z \cdot \left(-y\right)} \]
    6. Simplified50.4%

      \[\leadsto \color{blue}{z \cdot \left(-y\right)} \]

    if -1.00000000000000009e25 < y < 1.59999999999999991e59

    1. Initial program 99.3%

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

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.9%

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

Alternative 15: 27.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+44} \lor \neg \left(t \leq 4.9 \cdot 10^{+39}\right):\\
\;\;\;\;t \cdot b\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.0000000000000007e44 or 4.89999999999999987e39 < t

    1. Initial program 91.8%

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

      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
    4. Taylor expanded in b around inf 37.4%

      \[\leadsto \color{blue}{b \cdot t} \]
    5. Step-by-step derivation
      1. *-commutative37.4%

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified37.4%

      \[\leadsto \color{blue}{t \cdot b} \]

    if -8.0000000000000007e44 < t < 4.89999999999999987e39

    1. Initial program 98.6%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification27.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+44} \lor \neg \left(t \leq 4.9 \cdot 10^{+39}\right):\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 20.8% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.03:\\
\;\;\;\;x\\

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

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -0.029999999999999999 or 1.0499999999999999e141 < x

    1. Initial program 92.9%

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

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

    if -0.029999999999999999 < x < 1.0499999999999999e141

    1. Initial program 97.5%

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

      \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
    4. Taylor expanded in y around 0 16.6%

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

Alternative 17: 15.7% accurate, 21.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 95.7%

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

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

Reproduce

?
herbie shell --seed 2024141 
(FPCore (x y z t a b)
  :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
  :precision binary64
  (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))