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

Percentage Accurate: 95.2% → 98.5%
Time: 17.4s
Alternatives: 23
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 23 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.2% 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: 98.5% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 + \left(\left(\frac{x}{z} + b \cdot \frac{t\_1}{z}\right) + \left(a \cdot \frac{1 - t}{z} - y\right)\right)\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. Step-by-step derivation
      1. +-commutative100.0%

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

        \[\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+100.0%

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

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

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

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

        \[\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-neg100.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-neg100.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-eval100.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-neg100.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-neg100.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-eval100.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. Simplified100.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

    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 z around inf 40.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.5% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 + \left(\left(\frac{x}{z} + b \cdot \frac{y + \left(t + -2\right)}{z}\right) + \left(a \cdot \frac{1 - t}{z} - y\right)\right)\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 z around inf 40.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \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 (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
   (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 * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
	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 * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
	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 * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b)
	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(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(Float64(Float64(y + t) - 2.0) * b))
	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 * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
	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[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $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(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\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 73.8%

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

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

Alternative 4: 88.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.6000000000000003e-7 or 2.6e-24 < b

    1. Initial program 90.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 0 90.0%

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

    if -6.6000000000000003e-7 < b < 2.6e-24

    1. Initial program 99.1%

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

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

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

Alternative 5: 53.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z + \left(x + a\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{+41}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-117}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-222}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 12200000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ z (+ x a))) (t_2 (* t (- b a))))
   (if (<= t -8.5e+41)
     t_2
     (if (<= t -1.1e-117)
       t_1
       (if (<= t 3.7e-222)
         (* b (- y 2.0))
         (if (<= t 12200000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (x + a);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -8.5e+41) {
		tmp = t_2;
	} else if (t <= -1.1e-117) {
		tmp = t_1;
	} else if (t <= 3.7e-222) {
		tmp = b * (y - 2.0);
	} else if (t <= 12200000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = z + (x + a)
    t_2 = t * (b - a)
    if (t <= (-8.5d+41)) then
        tmp = t_2
    else if (t <= (-1.1d-117)) then
        tmp = t_1
    else if (t <= 3.7d-222) then
        tmp = b * (y - 2.0d0)
    else if (t <= 12200000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (x + a);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -8.5e+41) {
		tmp = t_2;
	} else if (t <= -1.1e-117) {
		tmp = t_1;
	} else if (t <= 3.7e-222) {
		tmp = b * (y - 2.0);
	} else if (t <= 12200000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z + (x + a)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -8.5e+41:
		tmp = t_2
	elif t <= -1.1e-117:
		tmp = t_1
	elif t <= 3.7e-222:
		tmp = b * (y - 2.0)
	elif t <= 12200000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z + Float64(x + a))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -8.5e+41)
		tmp = t_2;
	elseif (t <= -1.1e-117)
		tmp = t_1;
	elseif (t <= 3.7e-222)
		tmp = Float64(b * Float64(y - 2.0));
	elseif (t <= 12200000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z + (x + a);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -8.5e+41)
		tmp = t_2;
	elseif (t <= -1.1e-117)
		tmp = t_1;
	elseif (t <= 3.7e-222)
		tmp = b * (y - 2.0);
	elseif (t <= 12200000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+41], t$95$2, If[LessEqual[t, -1.1e-117], t$95$1, If[LessEqual[t, 3.7e-222], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 12200000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.1 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.7 \cdot 10^{-222}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\

\mathbf{elif}\;t \leq 12200000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.49999999999999938e41 or 1.22e10 < t

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

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

    if -8.49999999999999938e41 < t < -1.1000000000000001e-117 or 3.6999999999999999e-222 < t < 1.22e10

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

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

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

        \[\leadsto \color{blue}{x + \left(-\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)} \]
      2. neg-mul-156.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + \left(x + z\right)} \]
    8. Step-by-step derivation
      1. +-commutative54.4%

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

        \[\leadsto \color{blue}{\left(z + x\right)} + a \]
      3. associate-+l+54.4%

        \[\leadsto \color{blue}{z + \left(x + a\right)} \]
    9. Simplified54.4%

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

    if -1.1000000000000001e-117 < t < 3.6999999999999999e-222

    1. Initial program 94.4%

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

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

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in51.0%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 86.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -5.2 \cdot 10^{-6} \lor \neg \left(b \leq 6.8 \cdot 10^{-47}\right):\\ \;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\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 -5.2e-6) (not (<= b 6.8e-47)))
     (+ (+ x (* (- (+ y t) 2.0) b)) 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 <= -5.2e-6) || !(b <= 6.8e-47)) {
		tmp = (x + (((y + t) - 2.0) * b)) + 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 <= (-5.2d-6)) .or. (.not. (b <= 6.8d-47))) then
        tmp = (x + (((y + t) - 2.0d0) * b)) + 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 <= -5.2e-6) || !(b <= 6.8e-47)) {
		tmp = (x + (((y + t) - 2.0) * b)) + 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 <= -5.2e-6) or not (b <= 6.8e-47):
		tmp = (x + (((y + t) - 2.0) * b)) + 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 <= -5.2e-6) || !(b <= 6.8e-47))
		tmp = Float64(Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)) + 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 <= -5.2e-6) || ~((b <= 6.8e-47)))
		tmp = (x + (((y + t) - 2.0) * b)) + 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, -5.2e-6], N[Not[LessEqual[b, 6.8e-47]], $MachinePrecision]], N[(N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $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.2 \cdot 10^{-6} \lor \neg \left(b \leq 6.8 \cdot 10^{-47}\right):\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\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.20000000000000019e-6 or 6.8000000000000003e-47 < b

    1. Initial program 90.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 0 89.7%

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

    if -5.20000000000000019e-6 < b < 6.8000000000000003e-47

    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 b around 0 94.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{-6} \lor \neg \left(b \leq 6.8 \cdot 10^{-47}\right):\\ \;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\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 7: 35.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+50}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq 6 \cdot 10^{-5}:\\
\;\;\;\;x + z\\

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

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+174}:\\
\;\;\;\;y \cdot \left(-z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.10000000000000008e50 or 6.2e174 < y

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

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

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

    if -1.10000000000000008e50 < y < 6.00000000000000015e-5

    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 a around 0 73.8%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg36.3%

        \[\leadsto \color{blue}{x + \left(--1 \cdot z\right)} \]
      2. neg-mul-136.3%

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg36.3%

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative36.3%

        \[\leadsto \color{blue}{z + x} \]
    7. Simplified36.3%

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

    if 6.00000000000000015e-5 < y < 2.00000000000000002e55

    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 t around inf 78.6%

      \[\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. mul-1-neg78.6%

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in78.6%

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

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

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

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. *-commutative57.9%

        \[\leadsto -\color{blue}{t \cdot a} \]
      3. distribute-rgt-neg-in57.9%

        \[\leadsto \color{blue}{t \cdot \left(-a\right)} \]
    8. Simplified57.9%

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

    if 2.00000000000000002e55 < y < 6.2e174

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot z} \]
      2. mul-1-neg50.8%

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

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

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

Alternative 8: 70.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq -1.55 \cdot 10^{-87}:\\
\;\;\;\;t \cdot b + z \cdot \left(1 - y\right)\\

\mathbf{elif}\;b \leq 5.1 \cdot 10^{+67}:\\
\;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -35 or 5.1000000000000002e67 < b

    1. Initial program 89.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 0 90.4%

      \[\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 -35 < b < -1.54999999999999999e-87

    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 0 78.8%

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

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

    if -1.54999999999999999e-87 < b < 5.1000000000000002e67

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

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

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

        \[\leadsto \color{blue}{x + \left(-\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)} \]
      2. neg-mul-179.4%

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

        \[\leadsto x + \left(-\left(\left(-z\right) + a \cdot \color{blue}{\left(t + \left(-1\right)\right)}\right)\right) \]
      4. metadata-eval79.4%

        \[\leadsto x + \left(-\left(\left(-z\right) + a \cdot \left(t + \color{blue}{-1}\right)\right)\right) \]
      5. distribute-neg-in79.4%

        \[\leadsto x + \color{blue}{\left(\left(-\left(-z\right)\right) + \left(-a \cdot \left(t + -1\right)\right)\right)} \]
      6. remove-double-neg79.4%

        \[\leadsto x + \left(\color{blue}{z} + \left(-a \cdot \left(t + -1\right)\right)\right) \]
      7. distribute-rgt-neg-in79.4%

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

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

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

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

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

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

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

Alternative 9: 65.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -8 \cdot 10^{-8}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -2.1 \cdot 10^{-89}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+68}:\\ \;\;\;\;x + 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 (+ x (* (- (+ y t) 2.0) b))))
   (if (<= b -8e-8)
     t_1
     (if (<= b -2.1e-89)
       (+ x (* z (- 1.0 y)))
       (if (<= b 2.5e+68) (+ x (* a (- 1.0 t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (((y + t) - 2.0) * b);
	double tmp;
	if (b <= -8e-8) {
		tmp = t_1;
	} else if (b <= -2.1e-89) {
		tmp = x + (z * (1.0 - y));
	} else if (b <= 2.5e+68) {
		tmp = x + (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 = x + (((y + t) - 2.0d0) * b)
    if (b <= (-8d-8)) then
        tmp = t_1
    else if (b <= (-2.1d-89)) then
        tmp = x + (z * (1.0d0 - y))
    else if (b <= 2.5d+68) then
        tmp = x + (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 = x + (((y + t) - 2.0) * b);
	double tmp;
	if (b <= -8e-8) {
		tmp = t_1;
	} else if (b <= -2.1e-89) {
		tmp = x + (z * (1.0 - y));
	} else if (b <= 2.5e+68) {
		tmp = x + (a * (1.0 - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (((y + t) - 2.0) * b)
	tmp = 0
	if b <= -8e-8:
		tmp = t_1
	elif b <= -2.1e-89:
		tmp = x + (z * (1.0 - y))
	elif b <= 2.5e+68:
		tmp = x + (a * (1.0 - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b))
	tmp = 0.0
	if (b <= -8e-8)
		tmp = t_1;
	elseif (b <= -2.1e-89)
		tmp = Float64(x + Float64(z * Float64(1.0 - y)));
	elseif (b <= 2.5e+68)
		tmp = Float64(x + 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 = x + (((y + t) - 2.0) * b);
	tmp = 0.0;
	if (b <= -8e-8)
		tmp = t_1;
	elseif (b <= -2.1e-89)
		tmp = x + (z * (1.0 - y));
	elseif (b <= 2.5e+68)
		tmp = x + (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[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8e-8], t$95$1, If[LessEqual[b, -2.1e-89], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.5e+68], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -8 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -2.1 \cdot 10^{-89}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\

\mathbf{elif}\;b \leq 2.5 \cdot 10^{+68}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.0000000000000002e-8 or 2.5000000000000002e68 < b

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

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

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

    if -8.0000000000000002e-8 < b < -2.1000000000000001e-89

    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 0 78.8%

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

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

    if -2.1000000000000001e-89 < b < 2.5000000000000002e68

    1. Initial program 98.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 z around 0 74.1%

      \[\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 b around 0 67.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8 \cdot 10^{-8}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -2.1 \cdot 10^{-89}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+68}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 83.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-5} \lor \neg \left(b \leq 2.7 \cdot 10^{+68}\right):\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \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 -1e-5) (not (<= b 2.7e+68)))
   (+ x (* (- (+ y t) 2.0) b))
   (+ 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 <= -1e-5) || !(b <= 2.7e+68)) {
		tmp = x + (((y + t) - 2.0) * b);
	} 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 <= (-1d-5)) .or. (.not. (b <= 2.7d+68))) then
        tmp = x + (((y + t) - 2.0d0) * b)
    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 <= -1e-5) || !(b <= 2.7e+68)) {
		tmp = x + (((y + t) - 2.0) * b);
	} 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 <= -1e-5) or not (b <= 2.7e+68):
		tmp = x + (((y + t) - 2.0) * b)
	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 <= -1e-5) || !(b <= 2.7e+68))
		tmp = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b));
	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 <= -1e-5) || ~((b <= 2.7e+68)))
		tmp = x + (((y + t) - 2.0) * b);
	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, -1e-5], N[Not[LessEqual[b, 2.7e+68]], $MachinePrecision]], N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $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 -1 \cdot 10^{-5} \lor \neg \left(b \leq 2.7 \cdot 10^{+68}\right):\\
\;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\

\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 < -1.00000000000000008e-5 or 2.69999999999999991e68 < b

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

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

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

    if -1.00000000000000008e-5 < b < 2.69999999999999991e68

    1. Initial program 98.4%

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

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

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

Alternative 11: 62.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -5.5 \cdot 10^{+16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -2.75 \cdot 10^{-89}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{+72}:\\ \;\;\;\;x + 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 t) 2.0) b)))
   (if (<= b -5.5e+16)
     t_1
     (if (<= b -2.75e-89)
       (+ x (* z (- 1.0 y)))
       (if (<= b 7.5e+72) (+ x (* a (- 1.0 t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((y + t) - 2.0) * b;
	double tmp;
	if (b <= -5.5e+16) {
		tmp = t_1;
	} else if (b <= -2.75e-89) {
		tmp = x + (z * (1.0 - y));
	} else if (b <= 7.5e+72) {
		tmp = x + (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 + t) - 2.0d0) * b
    if (b <= (-5.5d+16)) then
        tmp = t_1
    else if (b <= (-2.75d-89)) then
        tmp = x + (z * (1.0d0 - y))
    else if (b <= 7.5d+72) then
        tmp = x + (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 + t) - 2.0) * b;
	double tmp;
	if (b <= -5.5e+16) {
		tmp = t_1;
	} else if (b <= -2.75e-89) {
		tmp = x + (z * (1.0 - y));
	} else if (b <= 7.5e+72) {
		tmp = x + (a * (1.0 - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((y + t) - 2.0) * b
	tmp = 0
	if b <= -5.5e+16:
		tmp = t_1
	elif b <= -2.75e-89:
		tmp = x + (z * (1.0 - y))
	elif b <= 7.5e+72:
		tmp = x + (a * (1.0 - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(y + t) - 2.0) * b)
	tmp = 0.0
	if (b <= -5.5e+16)
		tmp = t_1;
	elseif (b <= -2.75e-89)
		tmp = Float64(x + Float64(z * Float64(1.0 - y)));
	elseif (b <= 7.5e+72)
		tmp = Float64(x + 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 + t) - 2.0) * b;
	tmp = 0.0;
	if (b <= -5.5e+16)
		tmp = t_1;
	elseif (b <= -2.75e-89)
		tmp = x + (z * (1.0 - y));
	elseif (b <= 7.5e+72)
		tmp = x + (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[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -5.5e+16], t$95$1, If[LessEqual[b, -2.75e-89], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+72], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -5.5 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -2.75 \cdot 10^{-89}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\

\mathbf{elif}\;b \leq 7.5 \cdot 10^{+72}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.5e16 or 7.50000000000000027e72 < b

    1. Initial program 89.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 inf 78.0%

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

    if -5.5e16 < b < -2.75000000000000006e-89

    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 0 78.3%

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

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

    if -2.75000000000000006e-89 < b < 7.50000000000000027e72

    1. Initial program 98.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 z around 0 74.6%

      \[\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 b around 0 67.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.5 \cdot 10^{+16}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -2.75 \cdot 10^{-89}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{+72}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 61.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -6.4 \cdot 10^{-6}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -6.5 \cdot 10^{-89}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+74}:\\ \;\;\;\;x + 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 t) 2.0) b)))
   (if (<= b -6.4e-6)
     t_1
     (if (<= b -6.5e-89)
       (* z (- 1.0 y))
       (if (<= b 2.8e+74) (+ x (* a (- 1.0 t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((y + t) - 2.0) * b;
	double tmp;
	if (b <= -6.4e-6) {
		tmp = t_1;
	} else if (b <= -6.5e-89) {
		tmp = z * (1.0 - y);
	} else if (b <= 2.8e+74) {
		tmp = x + (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 + t) - 2.0d0) * b
    if (b <= (-6.4d-6)) then
        tmp = t_1
    else if (b <= (-6.5d-89)) then
        tmp = z * (1.0d0 - y)
    else if (b <= 2.8d+74) then
        tmp = x + (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 + t) - 2.0) * b;
	double tmp;
	if (b <= -6.4e-6) {
		tmp = t_1;
	} else if (b <= -6.5e-89) {
		tmp = z * (1.0 - y);
	} else if (b <= 2.8e+74) {
		tmp = x + (a * (1.0 - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((y + t) - 2.0) * b
	tmp = 0
	if b <= -6.4e-6:
		tmp = t_1
	elif b <= -6.5e-89:
		tmp = z * (1.0 - y)
	elif b <= 2.8e+74:
		tmp = x + (a * (1.0 - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(y + t) - 2.0) * b)
	tmp = 0.0
	if (b <= -6.4e-6)
		tmp = t_1;
	elseif (b <= -6.5e-89)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (b <= 2.8e+74)
		tmp = Float64(x + 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 + t) - 2.0) * b;
	tmp = 0.0;
	if (b <= -6.4e-6)
		tmp = t_1;
	elseif (b <= -6.5e-89)
		tmp = z * (1.0 - y);
	elseif (b <= 2.8e+74)
		tmp = x + (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[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -6.4e-6], t$95$1, If[LessEqual[b, -6.5e-89], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e+74], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -6.4 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -6.5 \cdot 10^{-89}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;b \leq 2.8 \cdot 10^{+74}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -6.3999999999999997e-6 or 2.80000000000000002e74 < b

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

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

    if -6.3999999999999997e-6 < b < -6.50000000000000034e-89

    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 z around inf 61.3%

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

    if -6.50000000000000034e-89 < b < 2.80000000000000002e74

    1. Initial program 98.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 z around 0 74.6%

      \[\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 b around 0 67.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.4 \cdot 10^{-6}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -6.5 \cdot 10^{-89}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+74}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 49.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq -1.1 \cdot 10^{-46}:\\
\;\;\;\;x + z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.84999999999999998e42 or 1.6e14 < t

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

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

    if -1.84999999999999998e42 < t < -1.1e-46

    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 0 77.2%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg45.9%

        \[\leadsto \color{blue}{x + \left(--1 \cdot z\right)} \]
      2. neg-mul-145.9%

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg45.9%

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative45.9%

        \[\leadsto \color{blue}{z + x} \]
    7. Simplified45.9%

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

    if -1.1e-46 < t < 1.6e14

    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 t around inf 44.6%

      \[\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. mul-1-neg44.6%

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in44.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+42}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-46}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+14}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 40.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(y - 2\right)\\ \mathbf{if}\;b \leq -1.4 \cdot 10^{+105}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -2.6 \cdot 10^{-6}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+70}:\\ \;\;\;\;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 (* b (- y 2.0))))
   (if (<= b -1.4e+105)
     t_1
     (if (<= b -2.6e-6) (* t b) (if (<= b 1.15e+70) (* a (- 1.0 t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (y - 2.0);
	double tmp;
	if (b <= -1.4e+105) {
		tmp = t_1;
	} else if (b <= -2.6e-6) {
		tmp = t * b;
	} else if (b <= 1.15e+70) {
		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 = b * (y - 2.0d0)
    if (b <= (-1.4d+105)) then
        tmp = t_1
    else if (b <= (-2.6d-6)) then
        tmp = t * b
    else if (b <= 1.15d+70) 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 = b * (y - 2.0);
	double tmp;
	if (b <= -1.4e+105) {
		tmp = t_1;
	} else if (b <= -2.6e-6) {
		tmp = t * b;
	} else if (b <= 1.15e+70) {
		tmp = a * (1.0 - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (y - 2.0)
	tmp = 0
	if b <= -1.4e+105:
		tmp = t_1
	elif b <= -2.6e-6:
		tmp = t * b
	elif b <= 1.15e+70:
		tmp = a * (1.0 - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(y - 2.0))
	tmp = 0.0
	if (b <= -1.4e+105)
		tmp = t_1;
	elseif (b <= -2.6e-6)
		tmp = Float64(t * b);
	elseif (b <= 1.15e+70)
		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 = b * (y - 2.0);
	tmp = 0.0;
	if (b <= -1.4e+105)
		tmp = t_1;
	elseif (b <= -2.6e-6)
		tmp = t * b;
	elseif (b <= 1.15e+70)
		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[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.4e+105], t$95$1, If[LessEqual[b, -2.6e-6], N[(t * b), $MachinePrecision], If[LessEqual[b, 1.15e+70], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(y - 2\right)\\
\mathbf{if}\;b \leq -1.4 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -2.6 \cdot 10^{-6}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{+70}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.4000000000000001e105 or 1.14999999999999997e70 < b

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

      \[\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. mul-1-neg76.2%

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in76.2%

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

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

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

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

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

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

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

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

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

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

    if -1.4000000000000001e105 < b < -2.60000000000000009e-6

    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 t around inf 67.9%

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

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

    if -2.60000000000000009e-6 < b < 1.14999999999999997e70

    1. Initial program 98.4%

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

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

Alternative 15: 39.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;a \leq -5.4 \cdot 10^{+34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-270}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 540000000000:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))))
   (if (<= a -5.4e+34)
     t_1
     (if (<= a 8e-270) (+ x z) (if (<= a 540000000000.0) (* t b) 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 (a <= -5.4e+34) {
		tmp = t_1;
	} else if (a <= 8e-270) {
		tmp = x + z;
	} else if (a <= 540000000000.0) {
		tmp = t * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    if (a <= (-5.4d+34)) then
        tmp = t_1
    else if (a <= 8d-270) then
        tmp = x + z
    else if (a <= 540000000000.0d0) then
        tmp = t * b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double tmp;
	if (a <= -5.4e+34) {
		tmp = t_1;
	} else if (a <= 8e-270) {
		tmp = x + z;
	} else if (a <= 540000000000.0) {
		tmp = t * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	tmp = 0
	if a <= -5.4e+34:
		tmp = t_1
	elif a <= 8e-270:
		tmp = x + z
	elif a <= 540000000000.0:
		tmp = t * b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (a <= -5.4e+34)
		tmp = t_1;
	elseif (a <= 8e-270)
		tmp = Float64(x + z);
	elseif (a <= 540000000000.0)
		tmp = Float64(t * b);
	else
		tmp = 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 (a <= -5.4e+34)
		tmp = t_1;
	elseif (a <= 8e-270)
		tmp = x + z;
	elseif (a <= 540000000000.0)
		tmp = t * b;
	else
		tmp = 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[LessEqual[a, -5.4e+34], t$95$1, If[LessEqual[a, 8e-270], N[(x + z), $MachinePrecision], If[LessEqual[a, 540000000000.0], N[(t * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -5.4 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 540000000000:\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.4000000000000001e34 or 5.4e11 < a

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

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

    if -5.4000000000000001e34 < a < 8.0000000000000003e-270

    1. Initial program 97.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 0 92.6%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg40.4%

        \[\leadsto \color{blue}{x + \left(--1 \cdot z\right)} \]
      2. neg-mul-140.4%

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg40.4%

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative40.4%

        \[\leadsto \color{blue}{z + x} \]
    7. Simplified40.4%

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

    if 8.0000000000000003e-270 < a < 5.4e11

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

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

      \[\leadsto t \cdot \color{blue}{b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification45.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.4 \cdot 10^{+34}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-270}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 540000000000:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 72.2% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.4000000000000002e-7 or 3.3000000000000003e67 < b

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

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

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

    if -4.4000000000000002e-7 < b < 3.3000000000000003e67

    1. Initial program 98.4%

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

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

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

        \[\leadsto \color{blue}{x + \left(-\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)} \]
      2. neg-mul-175.0%

        \[\leadsto x + \left(-\left(\color{blue}{\left(-z\right)} + a \cdot \left(t - 1\right)\right)\right) \]
      3. sub-neg75.0%

        \[\leadsto x + \left(-\left(\left(-z\right) + a \cdot \color{blue}{\left(t + \left(-1\right)\right)}\right)\right) \]
      4. metadata-eval75.0%

        \[\leadsto x + \left(-\left(\left(-z\right) + a \cdot \left(t + \color{blue}{-1}\right)\right)\right) \]
      5. distribute-neg-in75.0%

        \[\leadsto x + \color{blue}{\left(\left(-\left(-z\right)\right) + \left(-a \cdot \left(t + -1\right)\right)\right)} \]
      6. remove-double-neg75.0%

        \[\leadsto x + \left(\color{blue}{z} + \left(-a \cdot \left(t + -1\right)\right)\right) \]
      7. distribute-rgt-neg-in75.0%

        \[\leadsto x + \left(z + \color{blue}{a \cdot \left(-\left(t + -1\right)\right)}\right) \]
      8. +-commutative75.0%

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

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

        \[\leadsto x + \left(z + a \cdot \left(\color{blue}{1} + \left(-t\right)\right)\right) \]
      11. sub-neg75.0%

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

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

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

Alternative 17: 58.4% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{-6} \lor \neg \left(b \leq 5.1 \cdot 10^{+67}\right):\\
\;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.74999999999999997e-6 or 5.1000000000000002e67 < b

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

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

    if -1.74999999999999997e-6 < b < 5.1000000000000002e67

    1. Initial program 98.4%

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

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

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

        \[\leadsto \color{blue}{x + \left(-\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)} \]
      2. neg-mul-175.0%

        \[\leadsto x + \left(-\left(\color{blue}{\left(-z\right)} + a \cdot \left(t - 1\right)\right)\right) \]
      3. sub-neg75.0%

        \[\leadsto x + \left(-\left(\left(-z\right) + a \cdot \color{blue}{\left(t + \left(-1\right)\right)}\right)\right) \]
      4. metadata-eval75.0%

        \[\leadsto x + \left(-\left(\left(-z\right) + a \cdot \left(t + \color{blue}{-1}\right)\right)\right) \]
      5. distribute-neg-in75.0%

        \[\leadsto x + \color{blue}{\left(\left(-\left(-z\right)\right) + \left(-a \cdot \left(t + -1\right)\right)\right)} \]
      6. remove-double-neg75.0%

        \[\leadsto x + \left(\color{blue}{z} + \left(-a \cdot \left(t + -1\right)\right)\right) \]
      7. distribute-rgt-neg-in75.0%

        \[\leadsto x + \left(z + \color{blue}{a \cdot \left(-\left(t + -1\right)\right)}\right) \]
      8. +-commutative75.0%

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

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

        \[\leadsto x + \left(z + a \cdot \left(\color{blue}{1} + \left(-t\right)\right)\right) \]
      11. sub-neg75.0%

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

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

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

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

Alternative 18: 57.0% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+15} \lor \neg \left(b \leq 5.6 \cdot 10^{+73}\right):\\
\;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.7e15 or 5.60000000000000016e73 < b

    1. Initial program 89.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 inf 78.0%

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

    if -2.7e15 < b < 5.60000000000000016e73

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

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

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

        \[\leadsto \color{blue}{x + \left(-\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)} \]
      2. neg-mul-175.4%

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

        \[\leadsto x + \left(-\left(\left(-z\right) + a \cdot \color{blue}{\left(t + \left(-1\right)\right)}\right)\right) \]
      4. metadata-eval75.4%

        \[\leadsto x + \left(-\left(\left(-z\right) + a \cdot \left(t + \color{blue}{-1}\right)\right)\right) \]
      5. distribute-neg-in75.4%

        \[\leadsto x + \color{blue}{\left(\left(-\left(-z\right)\right) + \left(-a \cdot \left(t + -1\right)\right)\right)} \]
      6. remove-double-neg75.4%

        \[\leadsto x + \left(\color{blue}{z} + \left(-a \cdot \left(t + -1\right)\right)\right) \]
      7. distribute-rgt-neg-in75.4%

        \[\leadsto x + \left(z + \color{blue}{a \cdot \left(-\left(t + -1\right)\right)}\right) \]
      8. +-commutative75.4%

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

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

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

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

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

      \[\leadsto \color{blue}{a + \left(x + z\right)} \]
    8. Step-by-step derivation
      1. +-commutative47.0%

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

        \[\leadsto \color{blue}{\left(z + x\right)} + a \]
      3. associate-+l+47.0%

        \[\leadsto \color{blue}{z + \left(x + a\right)} \]
    9. Simplified47.0%

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

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

Alternative 19: 35.0% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+51} \lor \neg \left(y \leq 0.000105\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.0500000000000001e51 or 1.05e-4 < y

    1. Initial program 88.4%

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

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

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

    if -1.0500000000000001e51 < y < 1.05e-4

    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 a around 0 73.8%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg36.3%

        \[\leadsto \color{blue}{x + \left(--1 \cdot z\right)} \]
      2. neg-mul-136.3%

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg36.3%

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative36.3%

        \[\leadsto \color{blue}{z + x} \]
    7. Simplified36.3%

      \[\leadsto \color{blue}{z + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.5%

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

Alternative 20: 27.5% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{+63} \lor \neg \left(y \leq 9.2 \cdot 10^{+16}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.62e63 or 9.2e16 < y

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

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

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

    if -1.62e63 < y < 9.2e16

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

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

      \[\leadsto t \cdot \color{blue}{b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.62 \cdot 10^{+63} \lor \neg \left(y \leq 9.2 \cdot 10^{+16}\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 26.9% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{+34} \lor \neg \left(t \leq 2800000\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.4000000000000001e34 or 2.8e6 < t

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

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

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

    if -5.4000000000000001e34 < t < 2.8e6

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

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

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

Alternative 22: 20.7% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 7 \cdot 10^{-20}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.42e-4 or 7.00000000000000007e-20 < x

    1. Initial program 94.1%

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

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

    if -2.42e-4 < x < 7.00000000000000007e-20

    1. Initial program 94.1%

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

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

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

        \[\leadsto \color{blue}{x + \left(-\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)} \]
      2. neg-mul-144.1%

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

        \[\leadsto x + \left(-\left(\left(-z\right) + a \cdot \color{blue}{\left(t + \left(-1\right)\right)}\right)\right) \]
      4. metadata-eval44.1%

        \[\leadsto x + \left(-\left(\left(-z\right) + a \cdot \left(t + \color{blue}{-1}\right)\right)\right) \]
      5. distribute-neg-in44.1%

        \[\leadsto x + \color{blue}{\left(\left(-\left(-z\right)\right) + \left(-a \cdot \left(t + -1\right)\right)\right)} \]
      6. remove-double-neg44.1%

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

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

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

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

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

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

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

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

Alternative 23: 15.6% 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 94.1%

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

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

Reproduce

?
herbie shell --seed 2024116 
(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)))