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

Percentage Accurate: 94.6% → 97.4%
Time: 21.4s
Alternatives: 32
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 32 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: 94.6% 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.4% 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.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. Step-by-step derivation
    1. +-commutative96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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 2: 97.4% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(t + -1\right)\\
\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(x + b \cdot \left(t + \left(y + -2\right)\right)\right) - \mathsf{fma}\left(z, y + -1, t_1\right)\\

\mathbf{else}:\\
\;\;\;\;x - \mathsf{fma}\left(y + -1, z, t_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) 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. +-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) 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 b around 0 50.0%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\mathsf{fma}\left(y + -1, z, a \cdot \left(t - 1\right)\right)} \]
      6. *-commutative90.0%

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

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

        \[\leadsto x - \mathsf{fma}\left(y + -1, z, \left(t + \color{blue}{-1}\right) \cdot a\right) \]
    5. Applied egg-rr90.0%

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

    \[\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(x + b \cdot \left(t + \left(y + -2\right)\right)\right) - \mathsf{fma}\left(z, y + -1, a \cdot \left(t + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.4% accurate, 0.2× 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}:\\ \;\;\;\;x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* b (- (+ y t) 2.0)))))
   (if (<= t_1 INFINITY) t_1 (- x (fma (+ y -1.0) z (* a (+ t -1.0)))))))
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 = x - fma((y + -1.0), z, (a * (t + -1.0)));
	}
	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(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0))));
	end
	return 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[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\mathsf{fma}\left(y + -1, z, a \cdot \left(t - 1\right)\right)} \]
      6. *-commutative90.0%

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

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

        \[\leadsto x - \mathsf{fma}\left(y + -1, z, \left(t + \color{blue}{-1}\right) \cdot a\right) \]
    5. Applied egg-rr90.0%

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

    \[\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}:\\ \;\;\;\;x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 97.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* b (- (+ y t) 2.0)))))
   (if (<= t_1 INFINITY) t_1 (* y (- b z)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = y * (b - z);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x + (z * (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 = y * (b - z);
	}
	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 = y * (b - z)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(b * Float64(Float64(y + t) - 2.0)))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(y * Float64(b - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = y * (b - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(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[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) 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 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b))

    1. Initial program 0.0%

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

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

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

Alternative 5: 56.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-52}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -3.4 \cdot 10^{-108}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -7 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -5.2 \cdot 10^{-246}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -2 \cdot 10^{-278}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 8.6 \cdot 10^{+16}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.95e41 or 8.6e16 < t

    1. Initial program 94.0%

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

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

    if -2.95e41 < t < -1.70000000000000009e-52 or -3.40000000000000002e-108 < t < -6.99999999999999975e-174 or -5.1999999999999997e-246 < t < -1.99999999999999988e-278

    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 inf 68.7%

      \[\leadsto x - \color{blue}{y \cdot z} \]
    5. Step-by-step derivation
      1. *-commutative68.7%

        \[\leadsto x - \color{blue}{z \cdot y} \]
    6. Simplified68.7%

      \[\leadsto x - \color{blue}{z \cdot y} \]

    if -1.70000000000000009e-52 < t < -3.40000000000000002e-108 or -6.99999999999999975e-174 < t < -5.1999999999999997e-246 or -1.99999999999999988e-278 < t < 8.6e16

    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 t around 0 96.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.95 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-52}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-108}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-174}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-246}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-278}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{+16}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 68.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z + a \cdot \left(1 - t\right)\right)\\ t_2 := y \cdot \left(b - z\right)\\ t_3 := x + \left(z + \left(t + -2\right) \cdot b\right)\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{+93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-206}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-288}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 0.0215:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+91}:\\ \;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (+ z (* a (- 1.0 t)))))
        (t_2 (* y (- b z)))
        (t_3 (+ x (+ z (* (+ t -2.0) b)))))
   (if (<= y -7.5e+93)
     t_2
     (if (<= y -5e-206)
       t_1
       (if (<= y -2.7e-288)
         t_3
         (if (<= y 3.4e-28)
           t_1
           (if (<= y 0.0215)
             t_3
             (if (<= y 1.2e+91) (+ (+ x a) (* z (- 1.0 y))) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (z + (a * (1.0 - t)));
	double t_2 = y * (b - z);
	double t_3 = x + (z + ((t + -2.0) * b));
	double tmp;
	if (y <= -7.5e+93) {
		tmp = t_2;
	} else if (y <= -5e-206) {
		tmp = t_1;
	} else if (y <= -2.7e-288) {
		tmp = t_3;
	} else if (y <= 3.4e-28) {
		tmp = t_1;
	} else if (y <= 0.0215) {
		tmp = t_3;
	} else if (y <= 1.2e+91) {
		tmp = (x + a) + (z * (1.0 - y));
	} 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 = x + (z + (a * (1.0d0 - t)))
    t_2 = y * (b - z)
    t_3 = x + (z + ((t + (-2.0d0)) * b))
    if (y <= (-7.5d+93)) then
        tmp = t_2
    else if (y <= (-5d-206)) then
        tmp = t_1
    else if (y <= (-2.7d-288)) then
        tmp = t_3
    else if (y <= 3.4d-28) then
        tmp = t_1
    else if (y <= 0.0215d0) then
        tmp = t_3
    else if (y <= 1.2d+91) then
        tmp = (x + a) + (z * (1.0d0 - y))
    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 + (z + (a * (1.0 - t)));
	double t_2 = y * (b - z);
	double t_3 = x + (z + ((t + -2.0) * b));
	double tmp;
	if (y <= -7.5e+93) {
		tmp = t_2;
	} else if (y <= -5e-206) {
		tmp = t_1;
	} else if (y <= -2.7e-288) {
		tmp = t_3;
	} else if (y <= 3.4e-28) {
		tmp = t_1;
	} else if (y <= 0.0215) {
		tmp = t_3;
	} else if (y <= 1.2e+91) {
		tmp = (x + a) + (z * (1.0 - y));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (z + (a * (1.0 - t)))
	t_2 = y * (b - z)
	t_3 = x + (z + ((t + -2.0) * b))
	tmp = 0
	if y <= -7.5e+93:
		tmp = t_2
	elif y <= -5e-206:
		tmp = t_1
	elif y <= -2.7e-288:
		tmp = t_3
	elif y <= 3.4e-28:
		tmp = t_1
	elif y <= 0.0215:
		tmp = t_3
	elif y <= 1.2e+91:
		tmp = (x + a) + (z * (1.0 - y))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(z + Float64(a * Float64(1.0 - t))))
	t_2 = Float64(y * Float64(b - z))
	t_3 = Float64(x + Float64(z + Float64(Float64(t + -2.0) * b)))
	tmp = 0.0
	if (y <= -7.5e+93)
		tmp = t_2;
	elseif (y <= -5e-206)
		tmp = t_1;
	elseif (y <= -2.7e-288)
		tmp = t_3;
	elseif (y <= 3.4e-28)
		tmp = t_1;
	elseif (y <= 0.0215)
		tmp = t_3;
	elseif (y <= 1.2e+91)
		tmp = Float64(Float64(x + a) + Float64(z * Float64(1.0 - y)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (z + (a * (1.0 - t)));
	t_2 = y * (b - z);
	t_3 = x + (z + ((t + -2.0) * b));
	tmp = 0.0;
	if (y <= -7.5e+93)
		tmp = t_2;
	elseif (y <= -5e-206)
		tmp = t_1;
	elseif (y <= -2.7e-288)
		tmp = t_3;
	elseif (y <= 3.4e-28)
		tmp = t_1;
	elseif (y <= 0.0215)
		tmp = t_3;
	elseif (y <= 1.2e+91)
		tmp = (x + a) + (z * (1.0 - y));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(z + N[(N[(t + -2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+93], t$95$2, If[LessEqual[y, -5e-206], t$95$1, If[LessEqual[y, -2.7e-288], t$95$3, If[LessEqual[y, 3.4e-28], t$95$1, If[LessEqual[y, 0.0215], t$95$3, If[LessEqual[y, 1.2e+91], N[(N[(x + a), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5 \cdot 10^{-206}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -2.7 \cdot 10^{-288}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 3.4 \cdot 10^{-28}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 0.0215:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+91}:\\
\;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.5000000000000002e93 or 1.19999999999999991e91 < y

    1. Initial program 90.5%

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

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

    if -7.5000000000000002e93 < y < -5e-206 or -2.7000000000000001e-288 < y < 3.4000000000000001e-28

    1. Initial program 99.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 76.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.2%

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

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

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

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

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

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

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

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

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

    if -5e-206 < y < -2.7000000000000001e-288 or 3.4000000000000001e-28 < y < 0.021499999999999998

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if 0.021499999999999998 < y < 1.19999999999999991e91

    1. Initial program 99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+93}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-206}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-288}:\\ \;\;\;\;x + \left(z + \left(t + -2\right) \cdot b\right)\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-28}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;y \leq 0.0215:\\ \;\;\;\;x + \left(z + \left(t + -2\right) \cdot b\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+91}:\\ \;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 81.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq -1.75 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -4.1 \cdot 10^{-50}:\\
\;\;\;\;t_2 - y \cdot z\\

\mathbf{elif}\;b \leq 2.35 \cdot 10^{+79}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.12e139 or 2.35000000000000011e79 < b

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

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

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

    if -1.12e139 < b < -1.75e21 or -4.09999999999999985e-50 < b < 2.35000000000000011e79

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

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

    if -1.75e21 < b < -4.09999999999999985e-50

    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 y around inf 85.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.12 \cdot 10^{+139}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.75 \cdot 10^{+21}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq -4.1 \cdot 10^{-50}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - y \cdot z\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{+79}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 83.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := z \cdot \left(1 - y\right)\\ t_3 := \left(a + \left(x + b \cdot \left(y - 2\right)\right)\right) + t_2\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+26}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+53}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t_1\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+131}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+159}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t_1 + t_2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t)))
        (t_2 (* z (- 1.0 y)))
        (t_3 (+ (+ a (+ x (* b (- y 2.0)))) t_2)))
   (if (<= z -2.3e+26)
     t_3
     (if (<= z 1.85e+53)
       (+ (+ x (* b (- (+ y t) 2.0))) t_1)
       (if (<= z 8e+131)
         t_3
         (if (<= z 2.05e+159) (* t (- b a)) (+ x (+ 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 = z * (1.0 - y);
	double t_3 = (a + (x + (b * (y - 2.0)))) + t_2;
	double tmp;
	if (z <= -2.3e+26) {
		tmp = t_3;
	} else if (z <= 1.85e+53) {
		tmp = (x + (b * ((y + t) - 2.0))) + t_1;
	} else if (z <= 8e+131) {
		tmp = t_3;
	} else if (z <= 2.05e+159) {
		tmp = t * (b - a);
	} else {
		tmp = x + (t_1 + 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 = a * (1.0d0 - t)
    t_2 = z * (1.0d0 - y)
    t_3 = (a + (x + (b * (y - 2.0d0)))) + t_2
    if (z <= (-2.3d+26)) then
        tmp = t_3
    else if (z <= 1.85d+53) then
        tmp = (x + (b * ((y + t) - 2.0d0))) + t_1
    else if (z <= 8d+131) then
        tmp = t_3
    else if (z <= 2.05d+159) then
        tmp = t * (b - a)
    else
        tmp = x + (t_1 + 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 = z * (1.0 - y);
	double t_3 = (a + (x + (b * (y - 2.0)))) + t_2;
	double tmp;
	if (z <= -2.3e+26) {
		tmp = t_3;
	} else if (z <= 1.85e+53) {
		tmp = (x + (b * ((y + t) - 2.0))) + t_1;
	} else if (z <= 8e+131) {
		tmp = t_3;
	} else if (z <= 2.05e+159) {
		tmp = t * (b - a);
	} else {
		tmp = x + (t_1 + t_2);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = z * (1.0 - y)
	t_3 = (a + (x + (b * (y - 2.0)))) + t_2
	tmp = 0
	if z <= -2.3e+26:
		tmp = t_3
	elif z <= 1.85e+53:
		tmp = (x + (b * ((y + t) - 2.0))) + t_1
	elif z <= 8e+131:
		tmp = t_3
	elif z <= 2.05e+159:
		tmp = t * (b - a)
	else:
		tmp = x + (t_1 + t_2)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	t_2 = Float64(z * Float64(1.0 - y))
	t_3 = Float64(Float64(a + Float64(x + Float64(b * Float64(y - 2.0)))) + t_2)
	tmp = 0.0
	if (z <= -2.3e+26)
		tmp = t_3;
	elseif (z <= 1.85e+53)
		tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + t_1);
	elseif (z <= 8e+131)
		tmp = t_3;
	elseif (z <= 2.05e+159)
		tmp = Float64(t * Float64(b - a));
	else
		tmp = Float64(x + Float64(t_1 + t_2));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = z * (1.0 - y);
	t_3 = (a + (x + (b * (y - 2.0)))) + t_2;
	tmp = 0.0;
	if (z <= -2.3e+26)
		tmp = t_3;
	elseif (z <= 1.85e+53)
		tmp = (x + (b * ((y + t) - 2.0))) + t_1;
	elseif (z <= 8e+131)
		tmp = t_3;
	elseif (z <= 2.05e+159)
		tmp = t * (b - a);
	else
		tmp = x + (t_1 + 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[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + N[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[z, -2.3e+26], t$95$3, If[LessEqual[z, 1.85e+53], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 8e+131], t$95$3, If[LessEqual[z, 2.05e+159], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+53}:\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t_1\\

\mathbf{elif}\;z \leq 8 \cdot 10^{+131}:\\
\;\;\;\;t_3\\

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

\mathbf{else}:\\
\;\;\;\;x + \left(t_1 + t_2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.3000000000000001e26 or 1.85e53 < z < 7.9999999999999993e131

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

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

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

    if -2.3000000000000001e26 < z < 1.85e53

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

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

    if 7.9999999999999993e131 < z < 2.05000000000000007e159

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

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

    if 2.05000000000000007e159 < z

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+26}:\\ \;\;\;\;\left(a + \left(x + b \cdot \left(y - 2\right)\right)\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+53}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+131}:\\ \;\;\;\;\left(a + \left(x + b \cdot \left(y - 2\right)\right)\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+159}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 26.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+95}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-147}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-238}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-245}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{-153}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 7.4 \cdot 10^{-90}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 44000000:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{+86}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -9.2e+95)
   (* y b)
   (if (<= y -1.6e-147)
     x
     (if (<= y -5.2e-238)
       z
       (if (<= y 1.05e-245)
         (* t b)
         (if (<= y 3.9e-153)
           z
           (if (<= y 7.4e-90)
             x
             (if (<= y 44000000.0)
               (* t b)
               (if (<= y 4.9e+86) a (* y b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -9.2e+95) {
		tmp = y * b;
	} else if (y <= -1.6e-147) {
		tmp = x;
	} else if (y <= -5.2e-238) {
		tmp = z;
	} else if (y <= 1.05e-245) {
		tmp = t * b;
	} else if (y <= 3.9e-153) {
		tmp = z;
	} else if (y <= 7.4e-90) {
		tmp = x;
	} else if (y <= 44000000.0) {
		tmp = t * b;
	} else if (y <= 4.9e+86) {
		tmp = a;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (y <= (-9.2d+95)) then
        tmp = y * b
    else if (y <= (-1.6d-147)) then
        tmp = x
    else if (y <= (-5.2d-238)) then
        tmp = z
    else if (y <= 1.05d-245) then
        tmp = t * b
    else if (y <= 3.9d-153) then
        tmp = z
    else if (y <= 7.4d-90) then
        tmp = x
    else if (y <= 44000000.0d0) then
        tmp = t * b
    else if (y <= 4.9d+86) then
        tmp = a
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -9.2e+95) {
		tmp = y * b;
	} else if (y <= -1.6e-147) {
		tmp = x;
	} else if (y <= -5.2e-238) {
		tmp = z;
	} else if (y <= 1.05e-245) {
		tmp = t * b;
	} else if (y <= 3.9e-153) {
		tmp = z;
	} else if (y <= 7.4e-90) {
		tmp = x;
	} else if (y <= 44000000.0) {
		tmp = t * b;
	} else if (y <= 4.9e+86) {
		tmp = a;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -9.2e+95:
		tmp = y * b
	elif y <= -1.6e-147:
		tmp = x
	elif y <= -5.2e-238:
		tmp = z
	elif y <= 1.05e-245:
		tmp = t * b
	elif y <= 3.9e-153:
		tmp = z
	elif y <= 7.4e-90:
		tmp = x
	elif y <= 44000000.0:
		tmp = t * b
	elif y <= 4.9e+86:
		tmp = a
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -9.2e+95)
		tmp = Float64(y * b);
	elseif (y <= -1.6e-147)
		tmp = x;
	elseif (y <= -5.2e-238)
		tmp = z;
	elseif (y <= 1.05e-245)
		tmp = Float64(t * b);
	elseif (y <= 3.9e-153)
		tmp = z;
	elseif (y <= 7.4e-90)
		tmp = x;
	elseif (y <= 44000000.0)
		tmp = Float64(t * b);
	elseif (y <= 4.9e+86)
		tmp = a;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -9.2e+95)
		tmp = y * b;
	elseif (y <= -1.6e-147)
		tmp = x;
	elseif (y <= -5.2e-238)
		tmp = z;
	elseif (y <= 1.05e-245)
		tmp = t * b;
	elseif (y <= 3.9e-153)
		tmp = z;
	elseif (y <= 7.4e-90)
		tmp = x;
	elseif (y <= 44000000.0)
		tmp = t * b;
	elseif (y <= 4.9e+86)
		tmp = a;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9.2e+95], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.6e-147], x, If[LessEqual[y, -5.2e-238], z, If[LessEqual[y, 1.05e-245], N[(t * b), $MachinePrecision], If[LessEqual[y, 3.9e-153], z, If[LessEqual[y, 7.4e-90], x, If[LessEqual[y, 44000000.0], N[(t * b), $MachinePrecision], If[LessEqual[y, 4.9e+86], a, N[(y * b), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.6 \cdot 10^{-147}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-238}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-245}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 3.9 \cdot 10^{-153}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 7.4 \cdot 10^{-90}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 44000000:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 4.9 \cdot 10^{+86}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -9.19999999999999989e95 or 4.8999999999999999e86 < y

    1. Initial program 90.5%

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

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

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

    if -9.19999999999999989e95 < y < -1.5999999999999999e-147 or 3.9000000000000002e-153 < y < 7.40000000000000035e-90

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

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

    if -1.5999999999999999e-147 < y < -5.2000000000000002e-238 or 1.05000000000000005e-245 < y < 3.9000000000000002e-153

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

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

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

    if -5.2000000000000002e-238 < y < 1.05000000000000005e-245 or 7.40000000000000035e-90 < y < 4.4e7

    1. Initial program 100.0%

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

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

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

    if 4.4e7 < y < 4.8999999999999999e86

    1. Initial program 99.9%

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

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

      \[\leadsto \color{blue}{a} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification36.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+95}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-147}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-238}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-245}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{-153}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 7.4 \cdot 10^{-90}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 44000000:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{+86}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 37.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(t - 2\right)\\ t_2 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;a \leq -2.2 \cdot 10^{+131}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{+54}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq -1.52 \cdot 10^{-33}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-112}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-171}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-93}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- t 2.0))) (t_2 (* a (- 1.0 t))))
   (if (<= a -2.2e+131)
     t_2
     (if (<= a -4.8e+54)
       (* y (- z))
       (if (<= a -1.52e-33)
         (* b (- y 2.0))
         (if (<= a -6.6e-112)
           (+ x a)
           (if (<= a 3.7e-171)
             t_1
             (if (<= a 8.5e-93) (+ x a) (if (<= a 2.1e-13) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (t - 2.0);
	double t_2 = a * (1.0 - t);
	double tmp;
	if (a <= -2.2e+131) {
		tmp = t_2;
	} else if (a <= -4.8e+54) {
		tmp = y * -z;
	} else if (a <= -1.52e-33) {
		tmp = b * (y - 2.0);
	} else if (a <= -6.6e-112) {
		tmp = x + a;
	} else if (a <= 3.7e-171) {
		tmp = t_1;
	} else if (a <= 8.5e-93) {
		tmp = x + a;
	} else if (a <= 2.1e-13) {
		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 = b * (t - 2.0d0)
    t_2 = a * (1.0d0 - t)
    if (a <= (-2.2d+131)) then
        tmp = t_2
    else if (a <= (-4.8d+54)) then
        tmp = y * -z
    else if (a <= (-1.52d-33)) then
        tmp = b * (y - 2.0d0)
    else if (a <= (-6.6d-112)) then
        tmp = x + a
    else if (a <= 3.7d-171) then
        tmp = t_1
    else if (a <= 8.5d-93) then
        tmp = x + a
    else if (a <= 2.1d-13) 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 = b * (t - 2.0);
	double t_2 = a * (1.0 - t);
	double tmp;
	if (a <= -2.2e+131) {
		tmp = t_2;
	} else if (a <= -4.8e+54) {
		tmp = y * -z;
	} else if (a <= -1.52e-33) {
		tmp = b * (y - 2.0);
	} else if (a <= -6.6e-112) {
		tmp = x + a;
	} else if (a <= 3.7e-171) {
		tmp = t_1;
	} else if (a <= 8.5e-93) {
		tmp = x + a;
	} else if (a <= 2.1e-13) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (t - 2.0)
	t_2 = a * (1.0 - t)
	tmp = 0
	if a <= -2.2e+131:
		tmp = t_2
	elif a <= -4.8e+54:
		tmp = y * -z
	elif a <= -1.52e-33:
		tmp = b * (y - 2.0)
	elif a <= -6.6e-112:
		tmp = x + a
	elif a <= 3.7e-171:
		tmp = t_1
	elif a <= 8.5e-93:
		tmp = x + a
	elif a <= 2.1e-13:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(t - 2.0))
	t_2 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (a <= -2.2e+131)
		tmp = t_2;
	elseif (a <= -4.8e+54)
		tmp = Float64(y * Float64(-z));
	elseif (a <= -1.52e-33)
		tmp = Float64(b * Float64(y - 2.0));
	elseif (a <= -6.6e-112)
		tmp = Float64(x + a);
	elseif (a <= 3.7e-171)
		tmp = t_1;
	elseif (a <= 8.5e-93)
		tmp = Float64(x + a);
	elseif (a <= 2.1e-13)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (t - 2.0);
	t_2 = a * (1.0 - t);
	tmp = 0.0;
	if (a <= -2.2e+131)
		tmp = t_2;
	elseif (a <= -4.8e+54)
		tmp = y * -z;
	elseif (a <= -1.52e-33)
		tmp = b * (y - 2.0);
	elseif (a <= -6.6e-112)
		tmp = x + a;
	elseif (a <= 3.7e-171)
		tmp = t_1;
	elseif (a <= 8.5e-93)
		tmp = x + a;
	elseif (a <= 2.1e-13)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e+131], t$95$2, If[LessEqual[a, -4.8e+54], N[(y * (-z)), $MachinePrecision], If[LessEqual[a, -1.52e-33], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.6e-112], N[(x + a), $MachinePrecision], If[LessEqual[a, 3.7e-171], t$95$1, If[LessEqual[a, 8.5e-93], N[(x + a), $MachinePrecision], If[LessEqual[a, 2.1e-13], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.8 \cdot 10^{+54}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;a \leq -1.52 \cdot 10^{-33}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\

\mathbf{elif}\;a \leq -6.6 \cdot 10^{-112}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;a \leq 3.7 \cdot 10^{-171}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 8.5 \cdot 10^{-93}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.1999999999999999e131 or 2.09999999999999989e-13 < a

    1. Initial program 94.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 a around inf 63.5%

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

    if -2.1999999999999999e131 < a < -4.79999999999999997e54

    1. Initial program 90.9%

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative57.0%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in57.0%

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

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

    if -4.79999999999999997e54 < a < -1.52e-33

    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 inf 42.9%

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

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

    if -1.52e-33 < a < -6.6000000000000002e-112 or 3.70000000000000012e-171 < a < 8.5000000000000007e-93

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

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

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

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

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

    if -6.6000000000000002e-112 < a < 3.70000000000000012e-171 or 8.5000000000000007e-93 < a < 2.09999999999999989e-13

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{+131}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{+54}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq -1.52 \cdot 10^{-33}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-112}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-171}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-93}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-13}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 57.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot z\\ t_2 := t \cdot \left(b - a\right)\\ t_3 := b \cdot \left(y - 2\right)\\ t_4 := a + t_3\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-108}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-203}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+37}:\\ \;\;\;\;x + t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* y z)))
        (t_2 (* t (- b a)))
        (t_3 (* b (- y 2.0)))
        (t_4 (+ a t_3)))
   (if (<= t -1.05e+41)
     t_2
     (if (<= t -4e-52)
       t_1
       (if (<= t -2.8e-108)
         t_4
         (if (<= t -4.5e-174)
           t_1
           (if (<= t 8.5e-203) t_4 (if (<= t 4.2e+37) (+ x t_3) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (y * z);
	double t_2 = t * (b - a);
	double t_3 = b * (y - 2.0);
	double t_4 = a + t_3;
	double tmp;
	if (t <= -1.05e+41) {
		tmp = t_2;
	} else if (t <= -4e-52) {
		tmp = t_1;
	} else if (t <= -2.8e-108) {
		tmp = t_4;
	} else if (t <= -4.5e-174) {
		tmp = t_1;
	} else if (t <= 8.5e-203) {
		tmp = t_4;
	} else if (t <= 4.2e+37) {
		tmp = x + 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) :: t_4
    real(8) :: tmp
    t_1 = x - (y * z)
    t_2 = t * (b - a)
    t_3 = b * (y - 2.0d0)
    t_4 = a + t_3
    if (t <= (-1.05d+41)) then
        tmp = t_2
    else if (t <= (-4d-52)) then
        tmp = t_1
    else if (t <= (-2.8d-108)) then
        tmp = t_4
    else if (t <= (-4.5d-174)) then
        tmp = t_1
    else if (t <= 8.5d-203) then
        tmp = t_4
    else if (t <= 4.2d+37) then
        tmp = x + 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 = x - (y * z);
	double t_2 = t * (b - a);
	double t_3 = b * (y - 2.0);
	double t_4 = a + t_3;
	double tmp;
	if (t <= -1.05e+41) {
		tmp = t_2;
	} else if (t <= -4e-52) {
		tmp = t_1;
	} else if (t <= -2.8e-108) {
		tmp = t_4;
	} else if (t <= -4.5e-174) {
		tmp = t_1;
	} else if (t <= 8.5e-203) {
		tmp = t_4;
	} else if (t <= 4.2e+37) {
		tmp = x + t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (y * z)
	t_2 = t * (b - a)
	t_3 = b * (y - 2.0)
	t_4 = a + t_3
	tmp = 0
	if t <= -1.05e+41:
		tmp = t_2
	elif t <= -4e-52:
		tmp = t_1
	elif t <= -2.8e-108:
		tmp = t_4
	elif t <= -4.5e-174:
		tmp = t_1
	elif t <= 8.5e-203:
		tmp = t_4
	elif t <= 4.2e+37:
		tmp = x + t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(y * z))
	t_2 = Float64(t * Float64(b - a))
	t_3 = Float64(b * Float64(y - 2.0))
	t_4 = Float64(a + t_3)
	tmp = 0.0
	if (t <= -1.05e+41)
		tmp = t_2;
	elseif (t <= -4e-52)
		tmp = t_1;
	elseif (t <= -2.8e-108)
		tmp = t_4;
	elseif (t <= -4.5e-174)
		tmp = t_1;
	elseif (t <= 8.5e-203)
		tmp = t_4;
	elseif (t <= 4.2e+37)
		tmp = Float64(x + t_3);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (y * z);
	t_2 = t * (b - a);
	t_3 = b * (y - 2.0);
	t_4 = a + t_3;
	tmp = 0.0;
	if (t <= -1.05e+41)
		tmp = t_2;
	elseif (t <= -4e-52)
		tmp = t_1;
	elseif (t <= -2.8e-108)
		tmp = t_4;
	elseif (t <= -4.5e-174)
		tmp = t_1;
	elseif (t <= 8.5e-203)
		tmp = t_4;
	elseif (t <= 4.2e+37)
		tmp = x + t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(a + t$95$3), $MachinePrecision]}, If[LessEqual[t, -1.05e+41], t$95$2, If[LessEqual[t, -4e-52], t$95$1, If[LessEqual[t, -2.8e-108], t$95$4, If[LessEqual[t, -4.5e-174], t$95$1, If[LessEqual[t, 8.5e-203], t$95$4, If[LessEqual[t, 4.2e+37], N[(x + t$95$3), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4 \cdot 10^{-52}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -2.8 \cdot 10^{-108}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-203}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq 4.2 \cdot 10^{+37}:\\
\;\;\;\;x + t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.05e41 or 4.2000000000000002e37 < t

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

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

    if -1.05e41 < t < -4e-52 or -2.8e-108 < t < -4.49999999999999964e-174

    1. Initial program 97.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 88.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 64.9%

      \[\leadsto x - \color{blue}{y \cdot z} \]
    5. Step-by-step derivation
      1. *-commutative64.9%

        \[\leadsto x - \color{blue}{z \cdot y} \]
    6. Simplified64.9%

      \[\leadsto x - \color{blue}{z \cdot y} \]

    if -4e-52 < t < -2.8e-108 or -4.49999999999999964e-174 < t < 8.50000000000000031e-203

    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 t around 0 98.5%

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

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

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

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

    if 8.50000000000000031e-203 < t < 4.2000000000000002e37

    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 t around 0 91.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-52}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-108}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-174}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-203}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+37}:\\ \;\;\;\;x + b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 59.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + a \cdot \left(1 - t\right)\\ t_2 := y \cdot \left(b - z\right)\\ t_3 := x + \left(z + a\right)\\ \mathbf{if}\;y \leq -3.5 \cdot 10^{+93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{-113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-236}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-231}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-152}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+85}:\\ \;\;\;\;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 (* y (- b z))) (t_3 (+ x (+ z a))))
   (if (<= y -3.5e+93)
     t_2
     (if (<= y -7.8e-113)
       t_1
       (if (<= y -1.45e-236)
         t_3
         (if (<= y 1.02e-231)
           t_1
           (if (<= y 2.9e-152) t_3 (if (<= y 5e+85) 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 = y * (b - z);
	double t_3 = x + (z + a);
	double tmp;
	if (y <= -3.5e+93) {
		tmp = t_2;
	} else if (y <= -7.8e-113) {
		tmp = t_1;
	} else if (y <= -1.45e-236) {
		tmp = t_3;
	} else if (y <= 1.02e-231) {
		tmp = t_1;
	} else if (y <= 2.9e-152) {
		tmp = t_3;
	} else if (y <= 5e+85) {
		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) :: t_3
    real(8) :: tmp
    t_1 = x + (a * (1.0d0 - t))
    t_2 = y * (b - z)
    t_3 = x + (z + a)
    if (y <= (-3.5d+93)) then
        tmp = t_2
    else if (y <= (-7.8d-113)) then
        tmp = t_1
    else if (y <= (-1.45d-236)) then
        tmp = t_3
    else if (y <= 1.02d-231) then
        tmp = t_1
    else if (y <= 2.9d-152) then
        tmp = t_3
    else if (y <= 5d+85) 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 = y * (b - z);
	double t_3 = x + (z + a);
	double tmp;
	if (y <= -3.5e+93) {
		tmp = t_2;
	} else if (y <= -7.8e-113) {
		tmp = t_1;
	} else if (y <= -1.45e-236) {
		tmp = t_3;
	} else if (y <= 1.02e-231) {
		tmp = t_1;
	} else if (y <= 2.9e-152) {
		tmp = t_3;
	} else if (y <= 5e+85) {
		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 = y * (b - z)
	t_3 = x + (z + a)
	tmp = 0
	if y <= -3.5e+93:
		tmp = t_2
	elif y <= -7.8e-113:
		tmp = t_1
	elif y <= -1.45e-236:
		tmp = t_3
	elif y <= 1.02e-231:
		tmp = t_1
	elif y <= 2.9e-152:
		tmp = t_3
	elif y <= 5e+85:
		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(y * Float64(b - z))
	t_3 = Float64(x + Float64(z + a))
	tmp = 0.0
	if (y <= -3.5e+93)
		tmp = t_2;
	elseif (y <= -7.8e-113)
		tmp = t_1;
	elseif (y <= -1.45e-236)
		tmp = t_3;
	elseif (y <= 1.02e-231)
		tmp = t_1;
	elseif (y <= 2.9e-152)
		tmp = t_3;
	elseif (y <= 5e+85)
		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 = y * (b - z);
	t_3 = x + (z + a);
	tmp = 0.0;
	if (y <= -3.5e+93)
		tmp = t_2;
	elseif (y <= -7.8e-113)
		tmp = t_1;
	elseif (y <= -1.45e-236)
		tmp = t_3;
	elseif (y <= 1.02e-231)
		tmp = t_1;
	elseif (y <= 2.9e-152)
		tmp = t_3;
	elseif (y <= 5e+85)
		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[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e+93], t$95$2, If[LessEqual[y, -7.8e-113], t$95$1, If[LessEqual[y, -1.45e-236], t$95$3, If[LessEqual[y, 1.02e-231], t$95$1, If[LessEqual[y, 2.9e-152], t$95$3, If[LessEqual[y, 5e+85], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -7.8 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.45 \cdot 10^{-236}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 1.02 \cdot 10^{-231}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{-152}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 5 \cdot 10^{+85}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.49999999999999998e93 or 5.0000000000000001e85 < y

    1. Initial program 90.5%

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

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

    if -3.49999999999999998e93 < y < -7.7999999999999997e-113 or -1.45e-236 < y < 1.02000000000000006e-231 or 2.9000000000000001e-152 < y < 5.0000000000000001e85

    1. Initial program 99.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 71.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 55.6%

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

    if -7.7999999999999997e-113 < y < -1.45e-236 or 1.02000000000000006e-231 < y < 2.9000000000000001e-152

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{+93}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{-113}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-236}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-231}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-152}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+85}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 82.4% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq -4.1 \cdot 10^{-50}:\\
\;\;\;\;\left(a + b \cdot \left(y - 2\right)\right) + t_2\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.6000000000000001e73 or 7.4999999999999995e76 < b

    1. Initial program 92.0%

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

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

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

    if -2.6000000000000001e73 < b < -4.09999999999999985e-50

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

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

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

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

    if -4.09999999999999985e-50 < b < 7.4999999999999995e76

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.6 \cdot 10^{+73}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -4.1 \cdot 10^{-50}:\\ \;\;\;\;\left(a + b \cdot \left(y - 2\right)\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{+76}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 83.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 320000000000:\\
\;\;\;\;\left(a + \left(x + b \cdot \left(y - 2\right)\right)\right) + t_1\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+169}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + t_1\right)\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.2999999999999998e42 or 1.70000000000000014e169 < 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 76.5%

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

    if -4.2999999999999998e42 < t < 3.2e11

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

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

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

    if 3.2e11 < t < 1.70000000000000014e169

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

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

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

Alternative 15: 83.3% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;a \leq 3.5 \cdot 10^{-17}:\\
\;\;\;\;t_2 + t_3\\

\mathbf{else}:\\
\;\;\;\;x + \left(t_1 + t_3\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.6000000000000001e134

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

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

    if -8.6000000000000001e134 < a < 3.5000000000000002e-17

    1. Initial program 97.3%

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

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

    if 3.5000000000000002e-17 < a

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{+134}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-17}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\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: 84.9% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;a \leq 3 \cdot 10^{-13}:\\
\;\;\;\;t_1 + z \cdot \left(1 - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.9999999999999997e133

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

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

    if -8.9999999999999997e133 < a < 2.99999999999999984e-13

    1. Initial program 97.4%

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

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

    if 2.99999999999999984e-13 < a

    1. Initial program 94.2%

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

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

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

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

Alternative 17: 49.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-52}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;t \leq -4.6 \cdot 10^{-82}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-282}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.44999999999999994e41 or 0.75 < t

    1. Initial program 94.2%

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

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

    if -1.44999999999999994e41 < t < -1.5e-52

    1. Initial program 96.6%

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative40.3%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in40.3%

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

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

    if -1.5e-52 < t < -4.59999999999999994e-82 or -2.4499999999999999e-190 < t < -5.5000000000000001e-282

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

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

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

    if -4.59999999999999994e-82 < t < -2.4499999999999999e-190 or -5.5000000000000001e-282 < t < 0.75

    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 t around 0 97.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-52}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-82}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{-190}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-282}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 0.75:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 49.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+98}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.8 \cdot 10^{-29}:\\
\;\;\;\;x - y \cdot z\\

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

\mathbf{elif}\;y \leq -2.5 \cdot 10^{-198}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;y \leq 1600:\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{elif}\;y \leq 4.2 \cdot 10^{+62}:\\
\;\;\;\;x + a\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.39999999999999972e98 or 4.2e62 < y

    1. Initial program 91.2%

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

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

    if -3.39999999999999972e98 < y < -1.79999999999999987e-29

    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 84.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 inf 52.2%

      \[\leadsto x - \color{blue}{y \cdot z} \]
    5. Step-by-step derivation
      1. *-commutative52.2%

        \[\leadsto x - \color{blue}{z \cdot y} \]
    6. Simplified52.2%

      \[\leadsto x - \color{blue}{z \cdot y} \]

    if -1.79999999999999987e-29 < y < -4.2e-119

    1. Initial program 89.8%

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

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

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

    if -4.2e-119 < y < -2.5e-198 or 1600 < y < 4.2e62

    1. Initial program 100.0%

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

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

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

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

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

    if -2.5e-198 < y < 1600

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+98}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-29}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-119}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-198}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 1600:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+62}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 35.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(-z\right)\\ t_2 := t \cdot \left(-a\right)\\ \mathbf{if}\;t \leq -1.3 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-80}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-200}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-5}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- z))) (t_2 (* t (- a))))
   (if (<= t -1.3e+45)
     t_2
     (if (<= t -7.5e-62)
       t_1
       (if (<= t -1.65e-80)
         (* y b)
         (if (<= t -2.8e-200)
           (+ x a)
           (if (<= t -6.8e-280) t_1 (if (<= t 1.4e-5) (+ x a) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double t_2 = t * -a;
	double tmp;
	if (t <= -1.3e+45) {
		tmp = t_2;
	} else if (t <= -7.5e-62) {
		tmp = t_1;
	} else if (t <= -1.65e-80) {
		tmp = y * b;
	} else if (t <= -2.8e-200) {
		tmp = x + a;
	} else if (t <= -6.8e-280) {
		tmp = t_1;
	} else if (t <= 1.4e-5) {
		tmp = x + a;
	} 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 * -z
    t_2 = t * -a
    if (t <= (-1.3d+45)) then
        tmp = t_2
    else if (t <= (-7.5d-62)) then
        tmp = t_1
    else if (t <= (-1.65d-80)) then
        tmp = y * b
    else if (t <= (-2.8d-200)) then
        tmp = x + a
    else if (t <= (-6.8d-280)) then
        tmp = t_1
    else if (t <= 1.4d-5) then
        tmp = x + a
    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 * -z;
	double t_2 = t * -a;
	double tmp;
	if (t <= -1.3e+45) {
		tmp = t_2;
	} else if (t <= -7.5e-62) {
		tmp = t_1;
	} else if (t <= -1.65e-80) {
		tmp = y * b;
	} else if (t <= -2.8e-200) {
		tmp = x + a;
	} else if (t <= -6.8e-280) {
		tmp = t_1;
	} else if (t <= 1.4e-5) {
		tmp = x + a;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * -z
	t_2 = t * -a
	tmp = 0
	if t <= -1.3e+45:
		tmp = t_2
	elif t <= -7.5e-62:
		tmp = t_1
	elif t <= -1.65e-80:
		tmp = y * b
	elif t <= -2.8e-200:
		tmp = x + a
	elif t <= -6.8e-280:
		tmp = t_1
	elif t <= 1.4e-5:
		tmp = x + a
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(-z))
	t_2 = Float64(t * Float64(-a))
	tmp = 0.0
	if (t <= -1.3e+45)
		tmp = t_2;
	elseif (t <= -7.5e-62)
		tmp = t_1;
	elseif (t <= -1.65e-80)
		tmp = Float64(y * b);
	elseif (t <= -2.8e-200)
		tmp = Float64(x + a);
	elseif (t <= -6.8e-280)
		tmp = t_1;
	elseif (t <= 1.4e-5)
		tmp = Float64(x + a);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * -z;
	t_2 = t * -a;
	tmp = 0.0;
	if (t <= -1.3e+45)
		tmp = t_2;
	elseif (t <= -7.5e-62)
		tmp = t_1;
	elseif (t <= -1.65e-80)
		tmp = y * b;
	elseif (t <= -2.8e-200)
		tmp = x + a;
	elseif (t <= -6.8e-280)
		tmp = t_1;
	elseif (t <= 1.4e-5)
		tmp = x + a;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, Block[{t$95$2 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[t, -1.3e+45], t$95$2, If[LessEqual[t, -7.5e-62], t$95$1, If[LessEqual[t, -1.65e-80], N[(y * b), $MachinePrecision], If[LessEqual[t, -2.8e-200], N[(x + a), $MachinePrecision], If[LessEqual[t, -6.8e-280], t$95$1, If[LessEqual[t, 1.4e-5], N[(x + a), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -7.5 \cdot 10^{-62}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.65 \cdot 10^{-80}:\\
\;\;\;\;y \cdot b\\

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

\mathbf{elif}\;t \leq -6.8 \cdot 10^{-280}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.30000000000000004e45 or 1.39999999999999998e-5 < t

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} \]
      2. mul-1-neg43.0%

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

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

    if -1.30000000000000004e45 < t < -7.5000000000000003e-62 or -2.80000000000000007e-200 < t < -6.7999999999999995e-280

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative36.8%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in36.8%

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

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

    if -7.5000000000000003e-62 < t < -1.65e-80

    1. Initial program 83.3%

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

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

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

    if -1.65e-80 < t < -2.80000000000000007e-200 or -6.7999999999999995e-280 < t < 1.39999999999999998e-5

    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 t around 0 97.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+45}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-62}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-80}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-200}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{-280}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-5}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 37.6% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;a \leq -5 \cdot 10^{-115}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;a \leq 3.65 \cdot 10^{-171}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.29999999999999992e131 or 1.49999999999999992e-13 < a

    1. Initial program 94.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 a around inf 63.5%

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

    if -2.29999999999999992e131 < a < -5.0000000000000003e-115

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative30.6%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in30.6%

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

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

    if -5.0000000000000003e-115 < a < 3.65000000000000008e-171 or 2.6e-92 < a < 1.49999999999999992e-13

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

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

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

    if 3.65000000000000008e-171 < a < 2.6e-92

    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 t around 0 80.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+131}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-115}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq 3.65 \cdot 10^{-171}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-92}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-13}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 59.2% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-28}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 0.00068:\\
\;\;\;\;b \cdot \left(t - 2\right)\\

\mathbf{elif}\;y \leq 10^{+89}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.99999999999999996e93 or 9.99999999999999995e88 < y

    1. Initial program 90.5%

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

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

    if -6.99999999999999996e93 < y < 3.5e-28 or 6.8e-4 < y < 9.99999999999999995e88

    1. Initial program 99.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 75.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 54.4%

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

    if 3.5e-28 < y < 6.8e-4

    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 inf 72.0%

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

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

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

Alternative 22: 66.2% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq -5.4 \cdot 10^{-52}:\\
\;\;\;\;x - y \cdot z\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.55e41 or 7.19999999999999938e38 < t

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

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

    if -1.55e41 < t < -5.40000000000000019e-52

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

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

      \[\leadsto x - \color{blue}{y \cdot z} \]
    5. Step-by-step derivation
      1. *-commutative63.7%

        \[\leadsto x - \color{blue}{z \cdot y} \]
    6. Simplified63.7%

      \[\leadsto x - \color{blue}{z \cdot y} \]

    if -5.40000000000000019e-52 < t < 7.19999999999999938e38

    1. Initial program 97.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{-52}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+38}:\\ \;\;\;\;a + \left(x + b \cdot \left(y - 2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 67.9% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-28}:\\
\;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{+88}:\\
\;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.7999999999999998e93 or 3.4999999999999998e88 < y

    1. Initial program 90.5%

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

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

    if -3.7999999999999998e93 < y < 3.5e-28

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

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

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

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

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

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

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

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

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

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

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

    if 3.5e-28 < y < 3.4999999999999998e88

    1. Initial program 99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+93}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-28}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+88}:\\ \;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 50.2% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -4.05 \cdot 10^{+46}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -3 \cdot 10^{-198}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;y \leq 26000:\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{elif}\;y \leq 4.2 \cdot 10^{+62}:\\
\;\;\;\;x + a\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.05000000000000024e46 or 4.2e62 < y

    1. Initial program 91.8%

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

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

    if -4.05000000000000024e46 < y < -3.0000000000000001e-198 or 26000 < y < 4.2e62

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

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

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

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

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

    if -3.0000000000000001e-198 < y < 26000

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.05 \cdot 10^{+46}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-198}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 26000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+62}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 67.6% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+95} \lor \neg \left(y \leq 1.5 \cdot 10^{+93}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.2000000000000001e95 or 1.49999999999999989e93 < y

    1. Initial program 90.5%

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

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

    if -3.2000000000000001e95 < y < 1.49999999999999989e93

    1. Initial program 99.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 73.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 67.2%

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

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

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

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

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

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

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

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

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

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

Alternative 26: 26.7% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;t \leq -7.5 \cdot 10^{-295}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 7.2 \cdot 10^{-203}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 10^{+38}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.19999999999999996e32 or 9.99999999999999977e37 < t

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

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

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

    if -1.19999999999999996e32 < t < -7.4999999999999997e-295 or 7.19999999999999958e-203 < t < 9.99999999999999977e37

    1. Initial program 97.0%

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

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

    if -7.4999999999999997e-295 < t < 7.19999999999999958e-203

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{+32}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-295}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-203}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 10^{+38}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 31.8% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;b \leq -6.6 \cdot 10^{+99}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;b \leq -2.6 \cdot 10^{-162}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;b \leq 3.6 \cdot 10^{+128}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -8.00000000000000013e263 or 3.60000000000000027e128 < b

    1. Initial program 85.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)} \]
    4. Taylor expanded in y around inf 45.3%

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

    if -8.00000000000000013e263 < b < -6.5999999999999998e99

    1. Initial program 96.8%

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

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

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

    if -6.5999999999999998e99 < b < -2.6e-162

    1. Initial program 98.2%

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative33.5%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in33.5%

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

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

    if -2.6e-162 < b < 3.60000000000000027e128

    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 t around 0 78.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8 \cdot 10^{+263}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{+99}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq -2.6 \cdot 10^{-162}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+128}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 28: 35.2% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;a \leq -5.6 \cdot 10^{-246}:\\
\;\;\;\;y \cdot \left(-z\right)\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.6499999999999998e131 or 2.9000000000000003e-17 < a

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

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

    if -2.6499999999999998e131 < a < -5.5999999999999999e-246

    1. Initial program 97.5%

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative29.0%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in29.0%

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

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

    if -5.5999999999999999e-246 < a < 2.9000000000000003e-17

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.65 \cdot 10^{+131}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -5.6 \cdot 10^{-246}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-17}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 29: 33.3% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.6 \cdot 10^{+266}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -3.35 \cdot 10^{+100}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 2.45 \cdot 10^{+128}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -2.6e+266)
   (* y b)
   (if (<= b -3.35e+100) (* t b) (if (<= b 2.45e+128) (+ x a) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -2.6e+266) {
		tmp = y * b;
	} else if (b <= -3.35e+100) {
		tmp = t * b;
	} else if (b <= 2.45e+128) {
		tmp = x + a;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (b <= (-2.6d+266)) then
        tmp = y * b
    else if (b <= (-3.35d+100)) then
        tmp = t * b
    else if (b <= 2.45d+128) then
        tmp = x + a
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -2.6e+266) {
		tmp = y * b;
	} else if (b <= -3.35e+100) {
		tmp = t * b;
	} else if (b <= 2.45e+128) {
		tmp = x + a;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -2.6e+266:
		tmp = y * b
	elif b <= -3.35e+100:
		tmp = t * b
	elif b <= 2.45e+128:
		tmp = x + a
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -2.6e+266)
		tmp = Float64(y * b);
	elseif (b <= -3.35e+100)
		tmp = Float64(t * b);
	elseif (b <= 2.45e+128)
		tmp = Float64(x + a);
	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.6e+266)
		tmp = y * b;
	elseif (b <= -3.35e+100)
		tmp = t * b;
	elseif (b <= 2.45e+128)
		tmp = x + a;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.6e+266], N[(y * b), $MachinePrecision], If[LessEqual[b, -3.35e+100], N[(t * b), $MachinePrecision], If[LessEqual[b, 2.45e+128], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -3.35 \cdot 10^{+100}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;b \leq 2.45 \cdot 10^{+128}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.60000000000000014e266 or 2.45000000000000009e128 < b

    1. Initial program 85.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)} \]
    4. Taylor expanded in y around inf 45.3%

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

    if -2.60000000000000014e266 < b < -3.3499999999999998e100

    1. Initial program 96.8%

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

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

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

    if -3.3499999999999998e100 < b < 2.45000000000000009e128

    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 t around 0 78.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.6 \cdot 10^{+266}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -3.35 \cdot 10^{+100}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 2.45 \cdot 10^{+128}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 30: 20.2% accurate, 4.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2250000:\\
\;\;\;\;a\\

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-13}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.25e6 or 1.49999999999999992e-13 < a

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

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

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

    if -2.25e6 < a < 1.49999999999999992e-13

    1. Initial program 97.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2250000:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 31: 20.7% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;z \leq 2.25 \cdot 10^{+95}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1e152 or 2.25000000000000008e95 < z

    1. Initial program 89.2%

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

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

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

    if -1e152 < z < 2.25000000000000008e95

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+152}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+95}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 32: 10.8% 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.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 t around 0 73.0%

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

    \[\leadsto \color{blue}{a} \]
  5. Final simplification11.5%

    \[\leadsto a \]
  6. Add Preprocessing

Reproduce

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