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

Percentage Accurate: 95.1% → 97.9%
Time: 19.7s
Alternatives: 24
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 24 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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\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
    3. Step-by-step derivation
      1. sub-neg100.0%

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

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

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

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

        \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot \color{blue}{\left(\left(y + t\right) + -2\right)} \]
      6. distribute-rgt-in100.0%

        \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \color{blue}{\left(\left(y + t\right) \cdot b + -2 \cdot b\right)} \]
    4. Applied egg-rr100.0%

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

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

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

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

Alternative 2: 97.3% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Derivation
  1. Initial program 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. Step-by-step derivation
    1. +-commutative96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 50.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -3.8 \cdot 10^{+39}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-103}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-133}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-157}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-168}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-219}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-224}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5600:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
   (if (<= t -3.8e+39)
     t_2
     (if (<= t -1.25e-103)
       t_1
       (if (<= t -1.35e-133)
         (+ x a)
         (if (<= t -2.6e-157)
           (* z (- 1.0 y))
           (if (<= t -5.5e-168)
             (+ x a)
             (if (<= t -1.05e-219)
               t_1
               (if (<= t 2.6e-224)
                 (+ x a)
                 (if (<= t 2.35e-39)
                   t_1
                   (if (<= t 5600.0) (+ x z) t_2)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -3.8e+39) {
		tmp = t_2;
	} else if (t <= -1.25e-103) {
		tmp = t_1;
	} else if (t <= -1.35e-133) {
		tmp = x + a;
	} else if (t <= -2.6e-157) {
		tmp = z * (1.0 - y);
	} else if (t <= -5.5e-168) {
		tmp = x + a;
	} else if (t <= -1.05e-219) {
		tmp = t_1;
	} else if (t <= 2.6e-224) {
		tmp = x + a;
	} else if (t <= 2.35e-39) {
		tmp = t_1;
	} else if (t <= 5600.0) {
		tmp = x + z;
	} 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 = y * (b - z)
    t_2 = t * (b - a)
    if (t <= (-3.8d+39)) then
        tmp = t_2
    else if (t <= (-1.25d-103)) then
        tmp = t_1
    else if (t <= (-1.35d-133)) then
        tmp = x + a
    else if (t <= (-2.6d-157)) then
        tmp = z * (1.0d0 - y)
    else if (t <= (-5.5d-168)) then
        tmp = x + a
    else if (t <= (-1.05d-219)) then
        tmp = t_1
    else if (t <= 2.6d-224) then
        tmp = x + a
    else if (t <= 2.35d-39) then
        tmp = t_1
    else if (t <= 5600.0d0) then
        tmp = x + z
    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 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -3.8e+39) {
		tmp = t_2;
	} else if (t <= -1.25e-103) {
		tmp = t_1;
	} else if (t <= -1.35e-133) {
		tmp = x + a;
	} else if (t <= -2.6e-157) {
		tmp = z * (1.0 - y);
	} else if (t <= -5.5e-168) {
		tmp = x + a;
	} else if (t <= -1.05e-219) {
		tmp = t_1;
	} else if (t <= 2.6e-224) {
		tmp = x + a;
	} else if (t <= 2.35e-39) {
		tmp = t_1;
	} else if (t <= 5600.0) {
		tmp = x + z;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -3.8e+39:
		tmp = t_2
	elif t <= -1.25e-103:
		tmp = t_1
	elif t <= -1.35e-133:
		tmp = x + a
	elif t <= -2.6e-157:
		tmp = z * (1.0 - y)
	elif t <= -5.5e-168:
		tmp = x + a
	elif t <= -1.05e-219:
		tmp = t_1
	elif t <= 2.6e-224:
		tmp = x + a
	elif t <= 2.35e-39:
		tmp = t_1
	elif t <= 5600.0:
		tmp = x + z
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -3.8e+39)
		tmp = t_2;
	elseif (t <= -1.25e-103)
		tmp = t_1;
	elseif (t <= -1.35e-133)
		tmp = Float64(x + a);
	elseif (t <= -2.6e-157)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (t <= -5.5e-168)
		tmp = Float64(x + a);
	elseif (t <= -1.05e-219)
		tmp = t_1;
	elseif (t <= 2.6e-224)
		tmp = Float64(x + a);
	elseif (t <= 2.35e-39)
		tmp = t_1;
	elseif (t <= 5600.0)
		tmp = Float64(x + z);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -3.8e+39)
		tmp = t_2;
	elseif (t <= -1.25e-103)
		tmp = t_1;
	elseif (t <= -1.35e-133)
		tmp = x + a;
	elseif (t <= -2.6e-157)
		tmp = z * (1.0 - y);
	elseif (t <= -5.5e-168)
		tmp = x + a;
	elseif (t <= -1.05e-219)
		tmp = t_1;
	elseif (t <= 2.6e-224)
		tmp = x + a;
	elseif (t <= 2.35e-39)
		tmp = t_1;
	elseif (t <= 5600.0)
		tmp = x + z;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e+39], t$95$2, If[LessEqual[t, -1.25e-103], t$95$1, If[LessEqual[t, -1.35e-133], N[(x + a), $MachinePrecision], If[LessEqual[t, -2.6e-157], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-168], N[(x + a), $MachinePrecision], If[LessEqual[t, -1.05e-219], t$95$1, If[LessEqual[t, 2.6e-224], N[(x + a), $MachinePrecision], If[LessEqual[t, 2.35e-39], t$95$1, If[LessEqual[t, 5600.0], N[(x + z), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.35 \cdot 10^{-133}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-157}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-168}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-224}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;t \leq 2.35 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 5600:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.7999999999999998e39 or 5600 < t

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

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

    if -3.7999999999999998e39 < t < -1.24999999999999992e-103 or -5.4999999999999999e-168 < t < -1.05e-219 or 2.6000000000000002e-224 < t < 2.3500000000000001e-39

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

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

    if -1.24999999999999992e-103 < t < -1.3499999999999999e-133 or -2.59999999999999988e-157 < t < -5.4999999999999999e-168 or -1.05e-219 < t < 2.6000000000000002e-224

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv61.0%

        \[\leadsto \color{blue}{x + \left(--1\right) \cdot a} \]
      2. metadata-eval61.0%

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity61.0%

        \[\leadsto x + \color{blue}{a} \]
    7. Simplified61.0%

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

    if -1.3499999999999999e-133 < t < -2.59999999999999988e-157

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

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

    if 2.3500000000000001e-39 < t < 5600

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 51.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -4 \cdot 10^{+40}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-101}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-131}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -5.1 \cdot 10^{-155}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-168}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-219}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-223}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-37}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 23000:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
   (if (<= t -4e+40)
     t_2
     (if (<= t -3.6e-101)
       t_1
       (if (<= t -1.85e-131)
         (+ x a)
         (if (<= t -5.1e-155)
           t_1
           (if (<= t -1.2e-168)
             (+ x a)
             (if (<= t -1.9e-219)
               t_1
               (if (<= t 6e-223)
                 (+ x a)
                 (if (<= t 1.25e-37)
                   t_1
                   (if (<= t 23000.0) (+ x z) t_2)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -4e+40) {
		tmp = t_2;
	} else if (t <= -3.6e-101) {
		tmp = t_1;
	} else if (t <= -1.85e-131) {
		tmp = x + a;
	} else if (t <= -5.1e-155) {
		tmp = t_1;
	} else if (t <= -1.2e-168) {
		tmp = x + a;
	} else if (t <= -1.9e-219) {
		tmp = t_1;
	} else if (t <= 6e-223) {
		tmp = x + a;
	} else if (t <= 1.25e-37) {
		tmp = t_1;
	} else if (t <= 23000.0) {
		tmp = x + z;
	} 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 = y * (b - z)
    t_2 = t * (b - a)
    if (t <= (-4d+40)) then
        tmp = t_2
    else if (t <= (-3.6d-101)) then
        tmp = t_1
    else if (t <= (-1.85d-131)) then
        tmp = x + a
    else if (t <= (-5.1d-155)) then
        tmp = t_1
    else if (t <= (-1.2d-168)) then
        tmp = x + a
    else if (t <= (-1.9d-219)) then
        tmp = t_1
    else if (t <= 6d-223) then
        tmp = x + a
    else if (t <= 1.25d-37) then
        tmp = t_1
    else if (t <= 23000.0d0) then
        tmp = x + z
    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 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -4e+40) {
		tmp = t_2;
	} else if (t <= -3.6e-101) {
		tmp = t_1;
	} else if (t <= -1.85e-131) {
		tmp = x + a;
	} else if (t <= -5.1e-155) {
		tmp = t_1;
	} else if (t <= -1.2e-168) {
		tmp = x + a;
	} else if (t <= -1.9e-219) {
		tmp = t_1;
	} else if (t <= 6e-223) {
		tmp = x + a;
	} else if (t <= 1.25e-37) {
		tmp = t_1;
	} else if (t <= 23000.0) {
		tmp = x + z;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -4e+40:
		tmp = t_2
	elif t <= -3.6e-101:
		tmp = t_1
	elif t <= -1.85e-131:
		tmp = x + a
	elif t <= -5.1e-155:
		tmp = t_1
	elif t <= -1.2e-168:
		tmp = x + a
	elif t <= -1.9e-219:
		tmp = t_1
	elif t <= 6e-223:
		tmp = x + a
	elif t <= 1.25e-37:
		tmp = t_1
	elif t <= 23000.0:
		tmp = x + z
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -4e+40)
		tmp = t_2;
	elseif (t <= -3.6e-101)
		tmp = t_1;
	elseif (t <= -1.85e-131)
		tmp = Float64(x + a);
	elseif (t <= -5.1e-155)
		tmp = t_1;
	elseif (t <= -1.2e-168)
		tmp = Float64(x + a);
	elseif (t <= -1.9e-219)
		tmp = t_1;
	elseif (t <= 6e-223)
		tmp = Float64(x + a);
	elseif (t <= 1.25e-37)
		tmp = t_1;
	elseif (t <= 23000.0)
		tmp = Float64(x + z);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -4e+40)
		tmp = t_2;
	elseif (t <= -3.6e-101)
		tmp = t_1;
	elseif (t <= -1.85e-131)
		tmp = x + a;
	elseif (t <= -5.1e-155)
		tmp = t_1;
	elseif (t <= -1.2e-168)
		tmp = x + a;
	elseif (t <= -1.9e-219)
		tmp = t_1;
	elseif (t <= 6e-223)
		tmp = x + a;
	elseif (t <= 1.25e-37)
		tmp = t_1;
	elseif (t <= 23000.0)
		tmp = x + z;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+40], t$95$2, If[LessEqual[t, -3.6e-101], t$95$1, If[LessEqual[t, -1.85e-131], N[(x + a), $MachinePrecision], If[LessEqual[t, -5.1e-155], t$95$1, If[LessEqual[t, -1.2e-168], N[(x + a), $MachinePrecision], If[LessEqual[t, -1.9e-219], t$95$1, If[LessEqual[t, 6e-223], N[(x + a), $MachinePrecision], If[LessEqual[t, 1.25e-37], t$95$1, If[LessEqual[t, 23000.0], N[(x + z), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.6 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.85 \cdot 10^{-131}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;t \leq -5.1 \cdot 10^{-155}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.2 \cdot 10^{-168}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 6 \cdot 10^{-223}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 23000:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.00000000000000012e40 or 23000 < t

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

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

    if -4.00000000000000012e40 < t < -3.6e-101 or -1.8500000000000001e-131 < t < -5.0999999999999996e-155 or -1.2e-168 < t < -1.90000000000000012e-219 or 5.99999999999999983e-223 < t < 1.2499999999999999e-37

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

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

    if -3.6e-101 < t < -1.8500000000000001e-131 or -5.0999999999999996e-155 < t < -1.2e-168 or -1.90000000000000012e-219 < t < 5.99999999999999983e-223

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv60.0%

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

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity60.0%

        \[\leadsto x + \color{blue}{a} \]
    7. Simplified60.0%

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

    if 1.2499999999999999e-37 < t < 23000

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 97.9% 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) + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\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))) (* b (- (+ y t) 2.0)))))
   (if (<= t_1 INFINITY) t_1 (* t (- b a)))))
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))) + (b * ((y + t) - 2.0));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = t * (b - a);
	}
	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))) + (b * ((y + t) - 2.0));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = t * (b - a);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = t * (b - a)
	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(b * Float64(Float64(y + t) - 2.0)))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(t * Float64(b - a));
	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))) + (b * ((y + t) - 2.0));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = t * (b - a);
	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[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(b - a), $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) + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\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 t around inf 67.1%

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

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

Alternative 6: 55.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := z + a \cdot \left(1 - t\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
t_3 := x - y \cdot z\\
\mathbf{if}\;b \leq -2.3 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 1.9 \cdot 10^{-209}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1.6 \cdot 10^{+28}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 7.8 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1.48 \cdot 10^{+125}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.3e42 or 1.48000000000000003e125 < b

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

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

    if -2.3e42 < b < 1.8999999999999999e-209 or 1.6e28 < b < 7.80000000000000054e55

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

      \[\leadsto \color{blue}{x - \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
    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. associate--r+75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8999999999999999e-209 < b < 1.6e28 or 7.80000000000000054e55 < b < 1.48000000000000003e125

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

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

      \[\leadsto x - \color{blue}{y \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.3 \cdot 10^{+42}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{-209}:\\ \;\;\;\;z + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{+28}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{+55}:\\ \;\;\;\;z + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.48 \cdot 10^{+125}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 75.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := x + \left(t\_1 - y \cdot z\right)\\ t_3 := x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -2.45 \cdot 10^{+42}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \leq 1.38 \cdot 10^{-301}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{-210}:\\ \;\;\;\;\left(x + z\right) + t\_1\\ \mathbf{elif}\;b \leq 9.2 \cdot 10^{+127}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t)))
        (t_2 (+ x (- t_1 (* y z))))
        (t_3 (+ x (* b (- (+ y t) 2.0)))))
   (if (<= b -2.45e+42)
     t_3
     (if (<= b 1.38e-301)
       t_2
       (if (<= b 4.8e-210) (+ (+ x z) t_1) (if (<= b 9.2e+127) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = x + (t_1 - (y * z));
	double t_3 = x + (b * ((y + t) - 2.0));
	double tmp;
	if (b <= -2.45e+42) {
		tmp = t_3;
	} else if (b <= 1.38e-301) {
		tmp = t_2;
	} else if (b <= 4.8e-210) {
		tmp = (x + z) + t_1;
	} else if (b <= 9.2e+127) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    t_2 = x + (t_1 - (y * z))
    t_3 = x + (b * ((y + t) - 2.0d0))
    if (b <= (-2.45d+42)) then
        tmp = t_3
    else if (b <= 1.38d-301) then
        tmp = t_2
    else if (b <= 4.8d-210) then
        tmp = (x + z) + t_1
    else if (b <= 9.2d+127) then
        tmp = t_2
    else
        tmp = t_3
    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 t_2 = x + (t_1 - (y * z));
	double t_3 = x + (b * ((y + t) - 2.0));
	double tmp;
	if (b <= -2.45e+42) {
		tmp = t_3;
	} else if (b <= 1.38e-301) {
		tmp = t_2;
	} else if (b <= 4.8e-210) {
		tmp = (x + z) + t_1;
	} else if (b <= 9.2e+127) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = x + (t_1 - (y * z))
	t_3 = x + (b * ((y + t) - 2.0))
	tmp = 0
	if b <= -2.45e+42:
		tmp = t_3
	elif b <= 1.38e-301:
		tmp = t_2
	elif b <= 4.8e-210:
		tmp = (x + z) + t_1
	elif b <= 9.2e+127:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	t_2 = Float64(x + Float64(t_1 - Float64(y * z)))
	t_3 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0)))
	tmp = 0.0
	if (b <= -2.45e+42)
		tmp = t_3;
	elseif (b <= 1.38e-301)
		tmp = t_2;
	elseif (b <= 4.8e-210)
		tmp = Float64(Float64(x + z) + t_1);
	elseif (b <= 9.2e+127)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = x + (t_1 - (y * z));
	t_3 = x + (b * ((y + t) - 2.0));
	tmp = 0.0;
	if (b <= -2.45e+42)
		tmp = t_3;
	elseif (b <= 1.38e-301)
		tmp = t_2;
	elseif (b <= 4.8e-210)
		tmp = (x + z) + t_1;
	elseif (b <= 9.2e+127)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t$95$1 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.45e+42], t$95$3, If[LessEqual[b, 1.38e-301], t$95$2, If[LessEqual[b, 4.8e-210], N[(N[(x + z), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 9.2e+127], t$95$2, t$95$3]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := x + \left(t\_1 - y \cdot z\right)\\
t_3 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -2.45 \cdot 10^{+42}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 1.38 \cdot 10^{-301}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 4.8 \cdot 10^{-210}:\\
\;\;\;\;\left(x + z\right) + t\_1\\

\mathbf{elif}\;b \leq 9.2 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.4500000000000001e42 or 9.2000000000000007e127 < b

    1. Initial program 93.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 91.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 a around 0 85.9%

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

    if -2.4500000000000001e42 < b < 1.38000000000000006e-301 or 4.80000000000000008e-210 < b < 9.2000000000000007e127

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

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

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

    if 1.38000000000000006e-301 < b < 4.80000000000000008e-210

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

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

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

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

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

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

        \[\leadsto \left(x - -1 \cdot z\right) - \color{blue}{\left(t + -1\right) \cdot a} \]
      5. cancel-sign-sub-inv90.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.45 \cdot 10^{+42}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 1.38 \cdot 10^{-301}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) - y \cdot z\right)\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{-210}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9.2 \cdot 10^{+127}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 64.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x + a \cdot \left(1 - t\right)\\
t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 7 \cdot 10^{-296}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 3.8 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.1000000000000002e42 or 3.8e92 < b

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

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

    if -3.1000000000000002e42 < b < 6.9999999999999998e-296 or 5.2000000000000004e-174 < b < 3.8e92

    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.6%

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

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

    if 6.9999999999999998e-296 < b < 5.2000000000000004e-174

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.1 \cdot 10^{+42}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 7 \cdot 10^{-296}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-174}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 3.8 \cdot 10^{+92}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 27.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+30}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-95}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-296}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-67}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 62000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -5.8e+30)
   (* t b)
   (if (<= t -1.6e-95)
     (* y b)
     (if (<= t 3.4e-296)
       x
       (if (<= t 9.5e-67) (* y b) (if (<= t 62000.0) x (* t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -5.8e+30) {
		tmp = t * b;
	} else if (t <= -1.6e-95) {
		tmp = y * b;
	} else if (t <= 3.4e-296) {
		tmp = x;
	} else if (t <= 9.5e-67) {
		tmp = y * b;
	} else if (t <= 62000.0) {
		tmp = x;
	} 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 (t <= (-5.8d+30)) then
        tmp = t * b
    else if (t <= (-1.6d-95)) then
        tmp = y * b
    else if (t <= 3.4d-296) then
        tmp = x
    else if (t <= 9.5d-67) then
        tmp = y * b
    else if (t <= 62000.0d0) then
        tmp = x
    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 (t <= -5.8e+30) {
		tmp = t * b;
	} else if (t <= -1.6e-95) {
		tmp = y * b;
	} else if (t <= 3.4e-296) {
		tmp = x;
	} else if (t <= 9.5e-67) {
		tmp = y * b;
	} else if (t <= 62000.0) {
		tmp = x;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -5.8e+30:
		tmp = t * b
	elif t <= -1.6e-95:
		tmp = y * b
	elif t <= 3.4e-296:
		tmp = x
	elif t <= 9.5e-67:
		tmp = y * b
	elif t <= 62000.0:
		tmp = x
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -5.8e+30)
		tmp = Float64(t * b);
	elseif (t <= -1.6e-95)
		tmp = Float64(y * b);
	elseif (t <= 3.4e-296)
		tmp = x;
	elseif (t <= 9.5e-67)
		tmp = Float64(y * b);
	elseif (t <= 62000.0)
		tmp = x;
	else
		tmp = Float64(t * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -5.8e+30)
		tmp = t * b;
	elseif (t <= -1.6e-95)
		tmp = y * b;
	elseif (t <= 3.4e-296)
		tmp = x;
	elseif (t <= 9.5e-67)
		tmp = y * b;
	elseif (t <= 62000.0)
		tmp = x;
	else
		tmp = t * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.8e+30], N[(t * b), $MachinePrecision], If[LessEqual[t, -1.6e-95], N[(y * b), $MachinePrecision], If[LessEqual[t, 3.4e-296], x, If[LessEqual[t, 9.5e-67], N[(y * b), $MachinePrecision], If[LessEqual[t, 62000.0], x, N[(t * b), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+30}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq -1.6 \cdot 10^{-95}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{-296}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{-67}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 62000:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.7999999999999996e30 or 62000 < t

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

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

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

    if -5.7999999999999996e30 < t < -1.5999999999999999e-95 or 3.39999999999999997e-296 < t < 9.4999999999999994e-67

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

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

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

    if -1.5999999999999999e-95 < t < 3.39999999999999997e-296 or 9.4999999999999994e-67 < t < 62000

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification35.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+30}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-95}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-296}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-67}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 62000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 61.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x + a \cdot \left(1 - t\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -3.8 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 9.6 \cdot 10^{-292}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 10^{+128}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.7999999999999998e42 or 1.0000000000000001e128 < b

    1. Initial program 93.0%

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

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

    if -3.7999999999999998e42 < b < 9.6000000000000005e-292 or 1.79999999999999991e-177 < b < 1.0000000000000001e128

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

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

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

    if 9.6000000000000005e-292 < b < 1.79999999999999991e-177

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.8 \cdot 10^{+42}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 9.6 \cdot 10^{-292}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{-177}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 10^{+128}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 61.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := x + t\_1\\ t_3 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -4.7 \cdot 10^{+42}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \leq 2 \cdot 10^{-299}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-209}:\\ \;\;\;\;z + t\_1\\ \mathbf{elif}\;b \leq 9 \cdot 10^{+127}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))) (t_2 (+ x t_1)) (t_3 (* b (- (+ y t) 2.0))))
   (if (<= b -4.7e+42)
     t_3
     (if (<= b 2e-299)
       t_2
       (if (<= b 2.2e-209) (+ z t_1) (if (<= b 9e+127) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = x + t_1;
	double t_3 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -4.7e+42) {
		tmp = t_3;
	} else if (b <= 2e-299) {
		tmp = t_2;
	} else if (b <= 2.2e-209) {
		tmp = z + t_1;
	} else if (b <= 9e+127) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    t_2 = x + t_1
    t_3 = b * ((y + t) - 2.0d0)
    if (b <= (-4.7d+42)) then
        tmp = t_3
    else if (b <= 2d-299) then
        tmp = t_2
    else if (b <= 2.2d-209) then
        tmp = z + t_1
    else if (b <= 9d+127) then
        tmp = t_2
    else
        tmp = t_3
    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 t_2 = x + t_1;
	double t_3 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -4.7e+42) {
		tmp = t_3;
	} else if (b <= 2e-299) {
		tmp = t_2;
	} else if (b <= 2.2e-209) {
		tmp = z + t_1;
	} else if (b <= 9e+127) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = x + t_1
	t_3 = b * ((y + t) - 2.0)
	tmp = 0
	if b <= -4.7e+42:
		tmp = t_3
	elif b <= 2e-299:
		tmp = t_2
	elif b <= 2.2e-209:
		tmp = z + t_1
	elif b <= 9e+127:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	t_2 = Float64(x + t_1)
	t_3 = Float64(b * Float64(Float64(y + t) - 2.0))
	tmp = 0.0
	if (b <= -4.7e+42)
		tmp = t_3;
	elseif (b <= 2e-299)
		tmp = t_2;
	elseif (b <= 2.2e-209)
		tmp = Float64(z + t_1);
	elseif (b <= 9e+127)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = x + t_1;
	t_3 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -4.7e+42)
		tmp = t_3;
	elseif (b <= 2e-299)
		tmp = t_2;
	elseif (b <= 2.2e-209)
		tmp = z + t_1;
	elseif (b <= 9e+127)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.7e+42], t$95$3, If[LessEqual[b, 2e-299], t$95$2, If[LessEqual[b, 2.2e-209], N[(z + t$95$1), $MachinePrecision], If[LessEqual[b, 9e+127], t$95$2, t$95$3]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := x + t\_1\\
t_3 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -4.7 \cdot 10^{+42}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 2 \cdot 10^{-299}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 2.2 \cdot 10^{-209}:\\
\;\;\;\;z + t\_1\\

\mathbf{elif}\;b \leq 9 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.69999999999999986e42 or 9.00000000000000068e127 < b

    1. Initial program 93.0%

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

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

    if -4.69999999999999986e42 < b < 1.99999999999999998e-299 or 2.2000000000000001e-209 < b < 9.00000000000000068e127

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

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

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

    if 1.99999999999999998e-299 < b < 2.2000000000000001e-209

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

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

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

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

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

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

        \[\leadsto \left(x - -1 \cdot z\right) - \color{blue}{\left(t + -1\right) \cdot a} \]
      5. cancel-sign-sub-inv85.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.7 \cdot 10^{+42}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 2 \cdot 10^{-299}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-209}:\\ \;\;\;\;z + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{+127}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 55.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(x + z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{+73}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-183}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-63}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 29000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (+ x z))) (t_2 (* t (- b a))))
   (if (<= t -4.5e+73)
     t_2
     (if (<= t 6.5e-183)
       t_1
       (if (<= t 1.15e-63) (* y (- b z)) (if (<= t 29000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (x + z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -4.5e+73) {
		tmp = t_2;
	} else if (t <= 6.5e-183) {
		tmp = t_1;
	} else if (t <= 1.15e-63) {
		tmp = y * (b - z);
	} else if (t <= 29000.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 = a + (x + z)
    t_2 = t * (b - a)
    if (t <= (-4.5d+73)) then
        tmp = t_2
    else if (t <= 6.5d-183) then
        tmp = t_1
    else if (t <= 1.15d-63) then
        tmp = y * (b - z)
    else if (t <= 29000.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 = a + (x + z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -4.5e+73) {
		tmp = t_2;
	} else if (t <= 6.5e-183) {
		tmp = t_1;
	} else if (t <= 1.15e-63) {
		tmp = y * (b - z);
	} else if (t <= 29000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (x + z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -4.5e+73:
		tmp = t_2
	elif t <= 6.5e-183:
		tmp = t_1
	elif t <= 1.15e-63:
		tmp = y * (b - z)
	elif t <= 29000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(x + z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -4.5e+73)
		tmp = t_2;
	elseif (t <= 6.5e-183)
		tmp = t_1;
	elseif (t <= 1.15e-63)
		tmp = Float64(y * Float64(b - z));
	elseif (t <= 29000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (x + z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -4.5e+73)
		tmp = t_2;
	elseif (t <= 6.5e-183)
		tmp = t_1;
	elseif (t <= 1.15e-63)
		tmp = y * (b - z);
	elseif (t <= 29000.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[(a + N[(x + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e+73], t$95$2, If[LessEqual[t, 6.5e-183], t$95$1, If[LessEqual[t, 1.15e-63], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 29000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 6.5 \cdot 10^{-183}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-63}:\\
\;\;\;\;y \cdot \left(b - z\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.49999999999999985e73 or 29000 < t

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

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

    if -4.49999999999999985e73 < t < 6.50000000000000014e-183 or 1.15e-63 < t < 29000

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.50000000000000014e-183 < t < 1.15e-63

    1. Initial program 95.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+73}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-183}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-63}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 29000:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 49.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -3 \cdot 10^{+66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-205}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{-64}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 41000:\\ \;\;\;\;x + a\\ \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 -3e+66)
     t_1
     (if (<= t 2.9e-205)
       (+ x a)
       (if (<= t 2.45e-64) (* b (- y 2.0)) (if (<= t 41000.0) (+ x a) 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 <= -3e+66) {
		tmp = t_1;
	} else if (t <= 2.9e-205) {
		tmp = x + a;
	} else if (t <= 2.45e-64) {
		tmp = b * (y - 2.0);
	} else if (t <= 41000.0) {
		tmp = x + a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (b - a)
    if (t <= (-3d+66)) then
        tmp = t_1
    else if (t <= 2.9d-205) then
        tmp = x + a
    else if (t <= 2.45d-64) then
        tmp = b * (y - 2.0d0)
    else if (t <= 41000.0d0) then
        tmp = x + a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double tmp;
	if (t <= -3e+66) {
		tmp = t_1;
	} else if (t <= 2.9e-205) {
		tmp = x + a;
	} else if (t <= 2.45e-64) {
		tmp = b * (y - 2.0);
	} else if (t <= 41000.0) {
		tmp = x + a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (b - a)
	tmp = 0
	if t <= -3e+66:
		tmp = t_1
	elif t <= 2.9e-205:
		tmp = x + a
	elif t <= 2.45e-64:
		tmp = b * (y - 2.0)
	elif t <= 41000.0:
		tmp = x + a
	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 <= -3e+66)
		tmp = t_1;
	elseif (t <= 2.9e-205)
		tmp = Float64(x + a);
	elseif (t <= 2.45e-64)
		tmp = Float64(b * Float64(y - 2.0));
	elseif (t <= 41000.0)
		tmp = Float64(x + a);
	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 <= -3e+66)
		tmp = t_1;
	elseif (t <= 2.9e-205)
		tmp = x + a;
	elseif (t <= 2.45e-64)
		tmp = b * (y - 2.0);
	elseif (t <= 41000.0)
		tmp = x + a;
	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, -3e+66], t$95$1, If[LessEqual[t, 2.9e-205], N[(x + a), $MachinePrecision], If[LessEqual[t, 2.45e-64], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 41000.0], N[(x + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 2.9 \cdot 10^{-205}:\\
\;\;\;\;x + a\\

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

\mathbf{elif}\;t \leq 41000:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.00000000000000002e66 or 41000 < t

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

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

    if -3.00000000000000002e66 < t < 2.90000000000000018e-205 or 2.4500000000000001e-64 < t < 41000

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv43.4%

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

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity43.4%

        \[\leadsto x + \color{blue}{a} \]
    7. Simplified43.4%

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

    if 2.90000000000000018e-205 < t < 2.4500000000000001e-64

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

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

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

Alternative 14: 39.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := b \cdot \left(t - 2\right)\\
\mathbf{if}\;b \leq -8.2 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 2.9 \cdot 10^{-292}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 9.2 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.2000000000000002e47 or 9.2000000000000007e127 < b

    1. Initial program 93.0%

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

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

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

    if -8.2000000000000002e47 < b < 2.89999999999999993e-292 or 1.32000000000000006e-116 < b < 9.2000000000000007e127

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

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

    if 2.89999999999999993e-292 < b < 1.32000000000000006e-116

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 84.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.1600000000000001e-51 or 9.00000000000000068e127 < b

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

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

    if -1.1600000000000001e-51 < b < 9.00000000000000068e127

    1. Initial program 99.2%

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

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

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

Alternative 16: 26.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq 4 \cdot 10^{-298}:\\
\;\;\;\;x\\

\mathbf{elif}\;b \leq 2.9 \cdot 10^{-209}:\\
\;\;\;\;z\\

\mathbf{elif}\;b \leq 4.2 \cdot 10^{+73}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.8e21 or 4.2000000000000003e73 < b

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

      \[\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 y around inf 31.5%

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

    if -2.8e21 < b < 3.99999999999999965e-298 or 2.90000000000000026e-209 < b < 4.2000000000000003e73

    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 x around inf 28.3%

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

    if 3.99999999999999965e-298 < b < 2.90000000000000026e-209

    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.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+21}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-298}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-209}:\\ \;\;\;\;z\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 83.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.9 \cdot 10^{+42} \lor \neg \left(b \leq 1.05 \cdot 10^{+128}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.9000000000000002e42 or 1.05e128 < b

    1. Initial program 93.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 91.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 a around 0 85.9%

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

    if -4.9000000000000002e42 < b < 1.05e128

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

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

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

Alternative 18: 54.8% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;b \leq 1.48 \cdot 10^{+125}:\\
\;\;\;\;x - y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.65000000000000014e42 or 1.48000000000000003e125 < b

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

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

    if -2.65000000000000014e42 < b < 1e-209

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

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

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

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

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

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

        \[\leadsto \left(x - -1 \cdot z\right) - \color{blue}{\left(t + -1\right) \cdot a} \]
      5. cancel-sign-sub-inv73.9%

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

        \[\leadsto \color{blue}{\left(x + \left(--1 \cdot z\right)\right)} + \left(-\left(t + -1\right)\right) \cdot a \]
      7. mul-1-neg73.9%

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

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

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

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

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

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

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

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

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

    if 1e-209 < b < 1.48000000000000003e125

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

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

      \[\leadsto x - \color{blue}{y \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.4%

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

Alternative 19: 37.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.86 \cdot 10^{+199}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq -3 \cdot 10^{+66} \lor \neg \left(t \leq 51000\right):\\
\;\;\;\;t \cdot \left(-a\right)\\

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


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

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

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

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

    if -1.85999999999999996e199 < t < -3.00000000000000002e66 or 51000 < t

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

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

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

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

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

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

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

    if -3.00000000000000002e66 < t < 51000

    1. Initial program 97.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 b around 0 69.6%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv39.7%

        \[\leadsto \color{blue}{x + \left(--1\right) \cdot a} \]
      2. metadata-eval39.7%

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity39.7%

        \[\leadsto x + \color{blue}{a} \]
    7. Simplified39.7%

      \[\leadsto \color{blue}{x + a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification45.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.86 \cdot 10^{+199}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -3 \cdot 10^{+66} \lor \neg \left(t \leq 51000\right):\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 72.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.65 \cdot 10^{+42} \lor \neg \left(b \leq 3.8 \cdot 10^{+92}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.6499999999999999e42 or 3.8e92 < b

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

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

    if -1.6499999999999999e42 < b < 3.8e92

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

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

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

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

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

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

        \[\leadsto \left(x - -1 \cdot z\right) - \color{blue}{\left(t + -1\right) \cdot a} \]
      5. cancel-sign-sub-inv74.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 41.3% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{-67} \lor \neg \left(a \leq 1.05 \cdot 10^{+53}\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.3e-67 or 1.0500000000000001e53 < a

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

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

    if -2.3e-67 < a < 1.0500000000000001e53

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

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

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

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

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

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

        \[\leadsto \left(x - -1 \cdot z\right) - \color{blue}{\left(t + -1\right) \cdot a} \]
      5. cancel-sign-sub-inv36.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 22: 36.4% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.5999999999999998e85 or 29000 < t

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

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

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

    if -5.5999999999999998e85 < t < 29000

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv39.2%

        \[\leadsto \color{blue}{x + \left(--1\right) \cdot a} \]
      2. metadata-eval39.2%

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity39.2%

        \[\leadsto x + \color{blue}{a} \]
    7. Simplified39.2%

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

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

Alternative 23: 21.8% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+35}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 4.5 \cdot 10^{+74}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.9999999999999993e35 or 4.5e74 < x

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

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

    if -8.9999999999999993e35 < x < 4.5e74

    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 a around inf 33.9%

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

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

Alternative 24: 10.9% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 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 a around inf 30.3%

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

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

Reproduce

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