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

Percentage Accurate: 94.8% → 97.8%
Time: 16.6s
Alternatives: 23
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

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

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

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


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

    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. Taylor expanded in t around inf 78.0%

      \[\leadsto \color{blue}{t \cdot \left(b - a\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}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 2: 97.4% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 50.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -165000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-169}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-301}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-259}:\\ \;\;\;\;b \cdot \left(y + -2\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-170}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-117}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+14}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
   (if (<= t -165000.0)
     t_2
     (if (<= t -7.2e-169)
       (+ x a)
       (if (<= t -7.6e-271)
         t_1
         (if (<= t 1.02e-301)
           (+ x a)
           (if (<= t 7e-259)
             (* b (+ y -2.0))
             (if (<= t 2.6e-170)
               (+ x a)
               (if (<= t 1.15e-117)
                 t_1
                 (if (<= t 2.6e+14) (+ x a) t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -165000.0) {
		tmp = t_2;
	} else if (t <= -7.2e-169) {
		tmp = x + a;
	} else if (t <= -7.6e-271) {
		tmp = t_1;
	} else if (t <= 1.02e-301) {
		tmp = x + a;
	} else if (t <= 7e-259) {
		tmp = b * (y + -2.0);
	} else if (t <= 2.6e-170) {
		tmp = x + a;
	} else if (t <= 1.15e-117) {
		tmp = t_1;
	} else if (t <= 2.6e+14) {
		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 * (b - z)
    t_2 = t * (b - a)
    if (t <= (-165000.0d0)) then
        tmp = t_2
    else if (t <= (-7.2d-169)) then
        tmp = x + a
    else if (t <= (-7.6d-271)) then
        tmp = t_1
    else if (t <= 1.02d-301) then
        tmp = x + a
    else if (t <= 7d-259) then
        tmp = b * (y + (-2.0d0))
    else if (t <= 2.6d-170) then
        tmp = x + a
    else if (t <= 1.15d-117) then
        tmp = t_1
    else if (t <= 2.6d+14) 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 * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -165000.0) {
		tmp = t_2;
	} else if (t <= -7.2e-169) {
		tmp = x + a;
	} else if (t <= -7.6e-271) {
		tmp = t_1;
	} else if (t <= 1.02e-301) {
		tmp = x + a;
	} else if (t <= 7e-259) {
		tmp = b * (y + -2.0);
	} else if (t <= 2.6e-170) {
		tmp = x + a;
	} else if (t <= 1.15e-117) {
		tmp = t_1;
	} else if (t <= 2.6e+14) {
		tmp = x + a;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -165000.0:
		tmp = t_2
	elif t <= -7.2e-169:
		tmp = x + a
	elif t <= -7.6e-271:
		tmp = t_1
	elif t <= 1.02e-301:
		tmp = x + a
	elif t <= 7e-259:
		tmp = b * (y + -2.0)
	elif t <= 2.6e-170:
		tmp = x + a
	elif t <= 1.15e-117:
		tmp = t_1
	elif t <= 2.6e+14:
		tmp = x + a
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -165000.0)
		tmp = t_2;
	elseif (t <= -7.2e-169)
		tmp = Float64(x + a);
	elseif (t <= -7.6e-271)
		tmp = t_1;
	elseif (t <= 1.02e-301)
		tmp = Float64(x + a);
	elseif (t <= 7e-259)
		tmp = Float64(b * Float64(y + -2.0));
	elseif (t <= 2.6e-170)
		tmp = Float64(x + a);
	elseif (t <= 1.15e-117)
		tmp = t_1;
	elseif (t <= 2.6e+14)
		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 * (b - z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -165000.0)
		tmp = t_2;
	elseif (t <= -7.2e-169)
		tmp = x + a;
	elseif (t <= -7.6e-271)
		tmp = t_1;
	elseif (t <= 1.02e-301)
		tmp = x + a;
	elseif (t <= 7e-259)
		tmp = b * (y + -2.0);
	elseif (t <= 2.6e-170)
		tmp = x + a;
	elseif (t <= 1.15e-117)
		tmp = t_1;
	elseif (t <= 2.6e+14)
		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 * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -165000.0], t$95$2, If[LessEqual[t, -7.2e-169], N[(x + a), $MachinePrecision], If[LessEqual[t, -7.6e-271], t$95$1, If[LessEqual[t, 1.02e-301], N[(x + a), $MachinePrecision], If[LessEqual[t, 7e-259], N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-170], N[(x + a), $MachinePrecision], If[LessEqual[t, 1.15e-117], t$95$1, If[LessEqual[t, 2.6e+14], N[(x + a), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -7.6 \cdot 10^{-271}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-117}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -165000 or 2.6e14 < t

    1. Initial program 92.7%

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

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

    if -165000 < t < -7.20000000000000003e-169 or -7.60000000000000019e-271 < t < 1.0200000000000001e-301 or 7.0000000000000005e-259 < t < 2.6000000000000001e-170 or 1.14999999999999997e-117 < t < 2.6e14

    1. Initial program 99.0%

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

        \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
      2. fma-def99.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+99.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-neg99.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-eval99.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-neg99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + x} \]
    7. Step-by-step derivation
      1. +-commutative50.0%

        \[\leadsto \color{blue}{x + a} \]
    8. Simplified50.0%

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

    if -7.20000000000000003e-169 < t < -7.60000000000000019e-271 or 2.6000000000000001e-170 < t < 1.14999999999999997e-117

    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. Taylor expanded in y around inf 54.0%

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

    if 1.0200000000000001e-301 < t < 7.0000000000000005e-259

    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. Taylor expanded in b around inf 78.0%

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

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

      \[\leadsto \color{blue}{-2 \cdot b + b \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative78.0%

        \[\leadsto \color{blue}{b \cdot y + -2 \cdot b} \]
      2. *-commutative78.0%

        \[\leadsto b \cdot y + \color{blue}{b \cdot -2} \]
      3. distribute-lft-in78.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -165000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-169}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{-271}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-301}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-259}:\\ \;\;\;\;b \cdot \left(y + -2\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-170}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-117}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+14}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 4: 64.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq -9 \cdot 10^{-137}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{-305}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 3.2 \cdot 10^{-267}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.5 \cdot 10^{-211}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 8.2 \cdot 10^{-80}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.20000000000000009e36 or 8.1999999999999999e-80 < b

    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. Taylor expanded in z around 0 79.5%

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

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

    if -4.20000000000000009e36 < b < -8.9999999999999994e-137 or 1.15e-305 < b < 3.19999999999999986e-267 or 2.5000000000000001e-211 < b < 8.1999999999999999e-80

    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. Taylor expanded in z around 0 87.7%

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

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

    if -8.9999999999999994e-137 < b < 1.15e-305 or 3.19999999999999986e-267 < b < 2.5000000000000001e-211

    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. Taylor expanded in a around 0 77.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.2 \cdot 10^{+36}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -9 \cdot 10^{-137}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-305}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{-267}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-211}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{-80}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 5: 85.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -2 \cdot 10^{+96} \lor \neg \left(z \leq 3.9 \cdot 10^{+114}\right):\\
\;\;\;\;t_3 + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.9999999999999999e252

    1. Initial program 94.1%

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

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

    if -6.9999999999999999e252 < z < -2.0000000000000001e96 or 3.9000000000000001e114 < z

    1. Initial program 95.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. Taylor expanded in a around 0 90.7%

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

    if -2.0000000000000001e96 < z < 3.9000000000000001e114

    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. Taylor expanded in z around 0 91.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+252}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+96} \lor \neg \left(z \leq 3.9 \cdot 10^{+114}\right):\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 6: 85.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -5.4 \cdot 10^{+91} \lor \neg \left(z \leq 1.15 \cdot 10^{+114}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.35000000000000001e253

    1. Initial program 94.1%

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

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

    if -1.35000000000000001e253 < z < -5.4e91 or 1.15e114 < z

    1. Initial program 95.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. Taylor expanded in a around 0 90.7%

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

    if -5.4e91 < z < 1.15e114

    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. Taylor expanded in t around 0 97.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)} \]
    3. Taylor expanded in z around 0 92.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+253}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{+91} \lor \neg \left(z \leq 1.15 \cdot 10^{+114}\right):\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(x + \left(t \cdot \left(b - a\right) + b \cdot \left(y - 2\right)\right)\right)\\ \end{array} \]

Alternative 7: 43.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ t_2 := z \cdot \left(1 - y\right)\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+91}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-161}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-51}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+20}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+54}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+144}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (- b a))) (t_2 (* z (- 1.0 y))))
   (if (<= z -3.5e+91)
     t_2
     (if (<= z -7.5e-18)
       t_1
       (if (<= z 1.7e-161)
         (+ x a)
         (if (<= z 6.6e-51)
           (* b (- (+ y t) 2.0))
           (if (<= z 1.12e+20)
             (+ x a)
             (if (<= z 6.5e+54)
               (* y (- b z))
               (if (<= z 1.45e+144) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double t_2 = z * (1.0 - y);
	double tmp;
	if (z <= -3.5e+91) {
		tmp = t_2;
	} else if (z <= -7.5e-18) {
		tmp = t_1;
	} else if (z <= 1.7e-161) {
		tmp = x + a;
	} else if (z <= 6.6e-51) {
		tmp = b * ((y + t) - 2.0);
	} else if (z <= 1.12e+20) {
		tmp = x + a;
	} else if (z <= 6.5e+54) {
		tmp = y * (b - z);
	} else if (z <= 1.45e+144) {
		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 = t * (b - a)
    t_2 = z * (1.0d0 - y)
    if (z <= (-3.5d+91)) then
        tmp = t_2
    else if (z <= (-7.5d-18)) then
        tmp = t_1
    else if (z <= 1.7d-161) then
        tmp = x + a
    else if (z <= 6.6d-51) then
        tmp = b * ((y + t) - 2.0d0)
    else if (z <= 1.12d+20) then
        tmp = x + a
    else if (z <= 6.5d+54) then
        tmp = y * (b - z)
    else if (z <= 1.45d+144) 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 = t * (b - a);
	double t_2 = z * (1.0 - y);
	double tmp;
	if (z <= -3.5e+91) {
		tmp = t_2;
	} else if (z <= -7.5e-18) {
		tmp = t_1;
	} else if (z <= 1.7e-161) {
		tmp = x + a;
	} else if (z <= 6.6e-51) {
		tmp = b * ((y + t) - 2.0);
	} else if (z <= 1.12e+20) {
		tmp = x + a;
	} else if (z <= 6.5e+54) {
		tmp = y * (b - z);
	} else if (z <= 1.45e+144) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (b - a)
	t_2 = z * (1.0 - y)
	tmp = 0
	if z <= -3.5e+91:
		tmp = t_2
	elif z <= -7.5e-18:
		tmp = t_1
	elif z <= 1.7e-161:
		tmp = x + a
	elif z <= 6.6e-51:
		tmp = b * ((y + t) - 2.0)
	elif z <= 1.12e+20:
		tmp = x + a
	elif z <= 6.5e+54:
		tmp = y * (b - z)
	elif z <= 1.45e+144:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(b - a))
	t_2 = Float64(z * Float64(1.0 - y))
	tmp = 0.0
	if (z <= -3.5e+91)
		tmp = t_2;
	elseif (z <= -7.5e-18)
		tmp = t_1;
	elseif (z <= 1.7e-161)
		tmp = Float64(x + a);
	elseif (z <= 6.6e-51)
		tmp = Float64(b * Float64(Float64(y + t) - 2.0));
	elseif (z <= 1.12e+20)
		tmp = Float64(x + a);
	elseif (z <= 6.5e+54)
		tmp = Float64(y * Float64(b - z));
	elseif (z <= 1.45e+144)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (b - a);
	t_2 = z * (1.0 - y);
	tmp = 0.0;
	if (z <= -3.5e+91)
		tmp = t_2;
	elseif (z <= -7.5e-18)
		tmp = t_1;
	elseif (z <= 1.7e-161)
		tmp = x + a;
	elseif (z <= 6.6e-51)
		tmp = b * ((y + t) - 2.0);
	elseif (z <= 1.12e+20)
		tmp = x + a;
	elseif (z <= 6.5e+54)
		tmp = y * (b - z);
	elseif (z <= 1.45e+144)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+91], t$95$2, If[LessEqual[z, -7.5e-18], t$95$1, If[LessEqual[z, 1.7e-161], N[(x + a), $MachinePrecision], If[LessEqual[z, 6.6e-51], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e+20], N[(x + a), $MachinePrecision], If[LessEqual[z, 6.5e+54], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+144], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-18}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+20}:\\
\;\;\;\;x + a\\

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+144}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.50000000000000001e91 or 1.44999999999999999e144 < z

    1. Initial program 94.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. Taylor expanded in z around inf 67.2%

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

    if -3.50000000000000001e91 < z < -7.50000000000000015e-18 or 6.5e54 < z < 1.44999999999999999e144

    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. Taylor expanded in t around inf 60.9%

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

    if -7.50000000000000015e-18 < z < 1.69999999999999991e-161 or 6.59999999999999946e-51 < z < 1.12e20

    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. Step-by-step derivation
      1. +-commutative98.0%

        \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
      2. fma-def99.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+99.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-neg99.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-eval99.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-neg99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + x} \]
    7. Step-by-step derivation
      1. +-commutative48.2%

        \[\leadsto \color{blue}{x + a} \]
    8. Simplified48.2%

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

    if 1.69999999999999991e-161 < z < 6.59999999999999946e-51

    1. Initial program 96.2%

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

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

    if 1.12e20 < z < 6.5e54

    1. Initial program 77.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. Taylor expanded in y around inf 76.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+91}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-18}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-161}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-51}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+20}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+54}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+144}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \end{array} \]

Alternative 8: 55.9% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{-102}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+24}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+70}:\\
\;\;\;\;y \cdot \left(b - z\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.50000000000000002e77 or 1.05999999999999993e114 < z

    1. Initial program 95.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. Taylor expanded in a around 0 87.2%

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

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

    if -2.50000000000000002e77 < z < 1.90000000000000013e-102 or 1.0499999999999999e-49 < z < 2.2999999999999999e24

    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. Taylor expanded in z around 0 93.8%

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

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

    if 1.90000000000000013e-102 < z < 1.0499999999999999e-49

    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. Taylor expanded in b around inf 65.0%

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

    if 2.2999999999999999e24 < z < 1.2500000000000001e70

    1. Initial program 80.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. Taylor expanded in y around inf 79.1%

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

    if 1.2500000000000001e70 < z < 1.05999999999999993e114

    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. Taylor expanded in t around inf 78.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+77}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-102}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-49}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+24}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+70}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{+114}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \end{array} \]

Alternative 9: 85.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+42} \lor \neg \left(z \leq 3.8 \cdot 10^{+157}\right):\\
\;\;\;\;x + \left(t_1 + z \cdot \left(1 - y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.60000000000000001e42 or 3.8000000000000001e157 < z

    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. Taylor expanded in b around 0 86.0%

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

    if -1.60000000000000001e42 < z < 3.8000000000000001e157

    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. Taylor expanded in z around 0 90.6%

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

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

Alternative 10: 25.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+26}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-99}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-288}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-289}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-121}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-49}:\\ \;\;\;\;-2 \cdot b\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+153}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.9e+26)
   (* y b)
   (if (<= y -1.8e-99)
     z
     (if (<= y -1.7e-288)
       x
       (if (<= y 3.4e-289)
         z
         (if (<= y 3.4e-121)
           x
           (if (<= y 4.8e-49)
             (* -2.0 b)
             (if (<= y 2e+153) (* t b) (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.9e+26) {
		tmp = y * b;
	} else if (y <= -1.8e-99) {
		tmp = z;
	} else if (y <= -1.7e-288) {
		tmp = x;
	} else if (y <= 3.4e-289) {
		tmp = z;
	} else if (y <= 3.4e-121) {
		tmp = x;
	} else if (y <= 4.8e-49) {
		tmp = -2.0 * b;
	} else if (y <= 2e+153) {
		tmp = t * b;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (y <= (-1.9d+26)) then
        tmp = y * b
    else if (y <= (-1.8d-99)) then
        tmp = z
    else if (y <= (-1.7d-288)) then
        tmp = x
    else if (y <= 3.4d-289) then
        tmp = z
    else if (y <= 3.4d-121) then
        tmp = x
    else if (y <= 4.8d-49) then
        tmp = (-2.0d0) * b
    else if (y <= 2d+153) then
        tmp = t * b
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.9e+26) {
		tmp = y * b;
	} else if (y <= -1.8e-99) {
		tmp = z;
	} else if (y <= -1.7e-288) {
		tmp = x;
	} else if (y <= 3.4e-289) {
		tmp = z;
	} else if (y <= 3.4e-121) {
		tmp = x;
	} else if (y <= 4.8e-49) {
		tmp = -2.0 * b;
	} else if (y <= 2e+153) {
		tmp = t * b;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.9e+26:
		tmp = y * b
	elif y <= -1.8e-99:
		tmp = z
	elif y <= -1.7e-288:
		tmp = x
	elif y <= 3.4e-289:
		tmp = z
	elif y <= 3.4e-121:
		tmp = x
	elif y <= 4.8e-49:
		tmp = -2.0 * b
	elif y <= 2e+153:
		tmp = t * b
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.9e+26)
		tmp = Float64(y * b);
	elseif (y <= -1.8e-99)
		tmp = z;
	elseif (y <= -1.7e-288)
		tmp = x;
	elseif (y <= 3.4e-289)
		tmp = z;
	elseif (y <= 3.4e-121)
		tmp = x;
	elseif (y <= 4.8e-49)
		tmp = Float64(-2.0 * b);
	elseif (y <= 2e+153)
		tmp = Float64(t * b);
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -1.9e+26)
		tmp = y * b;
	elseif (y <= -1.8e-99)
		tmp = z;
	elseif (y <= -1.7e-288)
		tmp = x;
	elseif (y <= 3.4e-289)
		tmp = z;
	elseif (y <= 3.4e-121)
		tmp = x;
	elseif (y <= 4.8e-49)
		tmp = -2.0 * b;
	elseif (y <= 2e+153)
		tmp = t * b;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.9e+26], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.8e-99], z, If[LessEqual[y, -1.7e-288], x, If[LessEqual[y, 3.4e-289], z, If[LessEqual[y, 3.4e-121], x, If[LessEqual[y, 4.8e-49], N[(-2.0 * b), $MachinePrecision], If[LessEqual[y, 2e+153], N[(t * b), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{-289}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 3.4 \cdot 10^{-121}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-49}:\\
\;\;\;\;-2 \cdot b\\

\mathbf{elif}\;y \leq 2 \cdot 10^{+153}:\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.9000000000000001e26 or 2e153 < y

    1. Initial program 94.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. Step-by-step derivation
      1. +-commutative94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e26 < y < -1.8e-99 or -1.69999999999999986e-288 < y < 3.40000000000000018e-289

    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. Taylor expanded in z around inf 42.9%

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

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

    if -1.8e-99 < y < -1.69999999999999986e-288 or 3.40000000000000018e-289 < y < 3.40000000000000001e-121

    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. Taylor expanded in x around inf 37.2%

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

    if 3.40000000000000001e-121 < y < 4.79999999999999985e-49

    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. Taylor expanded in b around inf 51.5%

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

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

      \[\leadsto b \cdot y + \color{blue}{-2 \cdot b} \]
    5. Step-by-step derivation
      1. *-commutative43.9%

        \[\leadsto b \cdot y + \color{blue}{b \cdot -2} \]
    6. Simplified43.9%

      \[\leadsto b \cdot y + \color{blue}{b \cdot -2} \]
    7. Taylor expanded in y around 0 43.9%

      \[\leadsto \color{blue}{-2 \cdot b} \]
    8. Step-by-step derivation
      1. *-commutative43.9%

        \[\leadsto \color{blue}{b \cdot -2} \]
    9. Simplified43.9%

      \[\leadsto \color{blue}{b \cdot -2} \]

    if 4.79999999999999985e-49 < y < 2e153

    1. Initial program 97.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. Taylor expanded in b around inf 36.5%

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

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

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

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified27.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+26}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-99}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-288}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-289}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-121}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-49}:\\ \;\;\;\;-2 \cdot b\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+153}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 11: 83.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.08 \cdot 10^{+108} \lor \neg \left(b \leq 6 \cdot 10^{+113}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.0800000000000001e108 or 6e113 < b

    1. Initial program 92.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. Taylor expanded in z around 0 82.5%

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

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

    if -1.0800000000000001e108 < b < 6e113

    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. Taylor expanded in b around 0 84.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.08 \cdot 10^{+108} \lor \neg \left(b \leq 6 \cdot 10^{+113}\right):\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \end{array} \]

Alternative 12: 25.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+25}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-100}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-288}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-288}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-121}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 0.0032:\\ \;\;\;\;-2 \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -7e+25)
   (* y b)
   (if (<= y -5e-100)
     z
     (if (<= y -1.8e-288)
       x
       (if (<= y 1.3e-288)
         z
         (if (<= y 2.7e-121) x (if (<= y 0.0032) (* -2.0 b) (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -7e+25) {
		tmp = y * b;
	} else if (y <= -5e-100) {
		tmp = z;
	} else if (y <= -1.8e-288) {
		tmp = x;
	} else if (y <= 1.3e-288) {
		tmp = z;
	} else if (y <= 2.7e-121) {
		tmp = x;
	} else if (y <= 0.0032) {
		tmp = -2.0 * b;
	} 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 <= (-7d+25)) then
        tmp = y * b
    else if (y <= (-5d-100)) then
        tmp = z
    else if (y <= (-1.8d-288)) then
        tmp = x
    else if (y <= 1.3d-288) then
        tmp = z
    else if (y <= 2.7d-121) then
        tmp = x
    else if (y <= 0.0032d0) then
        tmp = (-2.0d0) * b
    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 <= -7e+25) {
		tmp = y * b;
	} else if (y <= -5e-100) {
		tmp = z;
	} else if (y <= -1.8e-288) {
		tmp = x;
	} else if (y <= 1.3e-288) {
		tmp = z;
	} else if (y <= 2.7e-121) {
		tmp = x;
	} else if (y <= 0.0032) {
		tmp = -2.0 * b;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -7e+25:
		tmp = y * b
	elif y <= -5e-100:
		tmp = z
	elif y <= -1.8e-288:
		tmp = x
	elif y <= 1.3e-288:
		tmp = z
	elif y <= 2.7e-121:
		tmp = x
	elif y <= 0.0032:
		tmp = -2.0 * b
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -7e+25)
		tmp = Float64(y * b);
	elseif (y <= -5e-100)
		tmp = z;
	elseif (y <= -1.8e-288)
		tmp = x;
	elseif (y <= 1.3e-288)
		tmp = z;
	elseif (y <= 2.7e-121)
		tmp = x;
	elseif (y <= 0.0032)
		tmp = Float64(-2.0 * b);
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -7e+25)
		tmp = y * b;
	elseif (y <= -5e-100)
		tmp = z;
	elseif (y <= -1.8e-288)
		tmp = x;
	elseif (y <= 1.3e-288)
		tmp = z;
	elseif (y <= 2.7e-121)
		tmp = x;
	elseif (y <= 0.0032)
		tmp = -2.0 * b;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7e+25], N[(y * b), $MachinePrecision], If[LessEqual[y, -5e-100], z, If[LessEqual[y, -1.8e-288], x, If[LessEqual[y, 1.3e-288], z, If[LessEqual[y, 2.7e-121], x, If[LessEqual[y, 0.0032], N[(-2.0 * b), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5 \cdot 10^{-100}:\\
\;\;\;\;z\\

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

\mathbf{elif}\;y \leq 1.3 \cdot 10^{-288}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-121}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 0.0032:\\
\;\;\;\;-2 \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.99999999999999999e25 or 0.00320000000000000015 < y

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x + \mathsf{fma}\left(z, 1 - y, -\color{blue}{a \cdot \left(t - 1\right)}\right)\right) \]
      18. distribute-rgt-neg-in98.2%

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

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

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

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

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

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

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

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

    if -6.99999999999999999e25 < y < -5.0000000000000001e-100 or -1.8000000000000001e-288 < y < 1.29999999999999995e-288

    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. Taylor expanded in z around inf 42.9%

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

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

    if -5.0000000000000001e-100 < y < -1.8000000000000001e-288 or 1.29999999999999995e-288 < y < 2.7000000000000002e-121

    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. Taylor expanded in x around inf 37.2%

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

    if 2.7000000000000002e-121 < y < 0.00320000000000000015

    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. Taylor expanded in b around inf 47.6%

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

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

      \[\leadsto b \cdot y + \color{blue}{-2 \cdot b} \]
    5. Step-by-step derivation
      1. *-commutative28.1%

        \[\leadsto b \cdot y + \color{blue}{b \cdot -2} \]
    6. Simplified28.1%

      \[\leadsto b \cdot y + \color{blue}{b \cdot -2} \]
    7. Taylor expanded in y around 0 28.1%

      \[\leadsto \color{blue}{-2 \cdot b} \]
    8. Step-by-step derivation
      1. *-commutative28.1%

        \[\leadsto \color{blue}{b \cdot -2} \]
    9. Simplified28.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+25}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-100}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-288}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-288}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-121}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 0.0032:\\ \;\;\;\;-2 \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 13: 54.9% accurate, 1.4× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+82} \lor \neg \left(y \leq 4.45 \cdot 10^{+120}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.28000000000000003e66 or 5e16 < y < 3.60000000000000014e82 or 4.4499999999999997e120 < y

    1. Initial program 95.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. Taylor expanded in y around inf 69.8%

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

    if -1.28000000000000003e66 < y < 4.99999999999999969e-99

    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. Taylor expanded in z around 0 75.8%

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

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

    if 4.99999999999999969e-99 < y < 5e16

    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. Taylor expanded in b around inf 51.2%

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

    if 3.60000000000000014e82 < y < 4.4499999999999997e120

    1. Initial program 85.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. Taylor expanded in t around inf 72.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.28 \cdot 10^{+66}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-99}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+16}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+82} \lor \neg \left(y \leq 4.45 \cdot 10^{+120}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 14: 54.1% accurate, 1.4× speedup?

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

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

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

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

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

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+14}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.49999999999999987e23 or 2.5e14 < t

    1. Initial program 92.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. Taylor expanded in t around inf 67.7%

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

    if -7.49999999999999987e23 < t < 4.5999999999999998e-239

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x + \mathsf{fma}\left(z, 1 - y, -\color{blue}{a \cdot \left(t - 1\right)}\right)\right) \]
      18. distribute-rgt-neg-in98.9%

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

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

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

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

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

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

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

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

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

    if 4.5999999999999998e-239 < t < 7.99999999999999987e-170 or 5.4e-116 < t < 2.5e14

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x + \mathsf{fma}\left(z, 1 - y, -\color{blue}{a \cdot \left(t - 1\right)}\right)\right) \]
      18. distribute-rgt-neg-in99.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + x} \]
    7. Step-by-step derivation
      1. +-commutative49.7%

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

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

    if 7.99999999999999987e-170 < t < 5.4e-116

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+23}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-239}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-170}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-116}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+14}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 15: 60.0% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-7}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.06 \cdot 10^{+114}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.4999999999999998e56 or 1.05999999999999993e114 < z

    1. Initial program 95.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. Taylor expanded in a around 0 86.6%

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

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

    if -8.4999999999999998e56 < z < -1.24999999999999994e-7 or 6.39999999999999945e30 < z < 1.05999999999999993e114

    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. Taylor expanded in t around inf 66.0%

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

    if -1.24999999999999994e-7 < z < 6.39999999999999945e30

    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. Step-by-step derivation
      1. +-commutative96.3%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x + \left(\left(-\color{blue}{z \cdot \left(y - 1\right)}\right) - \left(t - 1\right) \cdot a\right)\right) \]
      9. distribute-rgt-neg-in98.5%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x + \mathsf{fma}\left(z, 1 - y, -\color{blue}{a \cdot \left(t - 1\right)}\right)\right) \]
      18. distribute-rgt-neg-in98.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+56}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-7}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+30}:\\ \;\;\;\;a + \left(x + b \cdot \left(y - 2\right)\right)\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{+114}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \end{array} \]

Alternative 16: 35.0% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;a \leq -9.6 \cdot 10^{+48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-116}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq -7.9 \cdot 10^{-202}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-37}:\\ \;\;\;\;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 -9.6e+48)
     t_1
     (if (<= a -2e-116)
       (* y b)
       (if (<= a -7.9e-202) z (if (<= a 3.3e-37) (+ 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 <= -9.6e+48) {
		tmp = t_1;
	} else if (a <= -2e-116) {
		tmp = y * b;
	} else if (a <= -7.9e-202) {
		tmp = z;
	} else if (a <= 3.3e-37) {
		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 <= (-9.6d+48)) then
        tmp = t_1
    else if (a <= (-2d-116)) then
        tmp = y * b
    else if (a <= (-7.9d-202)) then
        tmp = z
    else if (a <= 3.3d-37) 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 <= -9.6e+48) {
		tmp = t_1;
	} else if (a <= -2e-116) {
		tmp = y * b;
	} else if (a <= -7.9e-202) {
		tmp = z;
	} else if (a <= 3.3e-37) {
		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 <= -9.6e+48:
		tmp = t_1
	elif a <= -2e-116:
		tmp = y * b
	elif a <= -7.9e-202:
		tmp = z
	elif a <= 3.3e-37:
		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 <= -9.6e+48)
		tmp = t_1;
	elseif (a <= -2e-116)
		tmp = Float64(y * b);
	elseif (a <= -7.9e-202)
		tmp = z;
	elseif (a <= 3.3e-37)
		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 <= -9.6e+48)
		tmp = t_1;
	elseif (a <= -2e-116)
		tmp = y * b;
	elseif (a <= -7.9e-202)
		tmp = z;
	elseif (a <= 3.3e-37)
		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, -9.6e+48], t$95$1, If[LessEqual[a, -2e-116], N[(y * b), $MachinePrecision], If[LessEqual[a, -7.9e-202], z, If[LessEqual[a, 3.3e-37], 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 -9.6 \cdot 10^{+48}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2 \cdot 10^{-116}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;a \leq -7.9 \cdot 10^{-202}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{-37}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -9.6000000000000004e48 or 3.29999999999999982e-37 < a

    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. Taylor expanded in a around inf 54.0%

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

    if -9.6000000000000004e48 < a < -2e-116

    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. Step-by-step derivation
      1. +-commutative96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e-116 < a < -7.9000000000000001e-202

    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. Taylor expanded in z around inf 50.1%

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

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

    if -7.9000000000000001e-202 < a < 3.29999999999999982e-37

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + x} \]
    7. Step-by-step derivation
      1. +-commutative32.6%

        \[\leadsto \color{blue}{x + a} \]
    8. Simplified32.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.6 \cdot 10^{+48}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-116}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq -7.9 \cdot 10^{-202}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-37}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 17: 37.6% accurate, 1.6× speedup?

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

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

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{-155}:\\
\;\;\;\;x + a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.49999999999999995e48 or 2.40000000000000002e73 < a

    1. Initial program 92.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. Taylor expanded in a around inf 60.3%

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

    if -4.49999999999999995e48 < a < -2.8e-148

    1. Initial program 96.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. Taylor expanded in b around inf 55.2%

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

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

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

        \[\leadsto \color{blue}{b \cdot y + -2 \cdot b} \]
      2. *-commutative36.7%

        \[\leadsto b \cdot y + \color{blue}{b \cdot -2} \]
      3. distribute-lft-in36.7%

        \[\leadsto \color{blue}{b \cdot \left(y + -2\right)} \]
    6. Simplified36.7%

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

    if -2.8e-148 < a < 6.5e-155

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + x} \]
    7. Step-by-step derivation
      1. +-commutative35.5%

        \[\leadsto \color{blue}{x + a} \]
    8. Simplified35.5%

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

    if 6.5e-155 < a < 2.40000000000000002e73

    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. Taylor expanded in b around inf 43.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{+48}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-148}:\\ \;\;\;\;b \cdot \left(y + -2\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-155}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+73}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 18: 49.9% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -55000000:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;t \leq 7.2 \cdot 10^{+18}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.5e7 or 7.2e18 < t

    1. Initial program 92.7%

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

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

    if -5.5e7 < t < 1.0200000000000001e-301 or 7.4999999999999995e-266 < t < 7.2e18

    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. Step-by-step derivation
      1. +-commutative99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x + \mathsf{fma}\left(z, 1 - y, -\color{blue}{a \cdot \left(t - 1\right)}\right)\right) \]
      18. distribute-rgt-neg-in99.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + x} \]
    7. Step-by-step derivation
      1. +-commutative42.7%

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

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

    if 1.0200000000000001e-301 < t < 7.4999999999999995e-266

    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. Taylor expanded in b around inf 78.0%

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

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

      \[\leadsto \color{blue}{-2 \cdot b + b \cdot y} \]
    5. Step-by-step derivation
      1. +-commutative78.0%

        \[\leadsto \color{blue}{b \cdot y + -2 \cdot b} \]
      2. *-commutative78.0%

        \[\leadsto b \cdot y + \color{blue}{b \cdot -2} \]
      3. distribute-lft-in78.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -55000000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-301}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-266}:\\ \;\;\;\;b \cdot \left(y + -2\right)\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+18}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 19: 36.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;a \leq -4.05 \cdot 10^{+48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.55 \cdot 10^{-146}:\\ \;\;\;\;b \cdot \left(y + -2\right)\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-37}:\\ \;\;\;\;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 -4.05e+48)
     t_1
     (if (<= a -3.55e-146) (* b (+ y -2.0)) (if (<= a 3.7e-37) (+ 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 <= -4.05e+48) {
		tmp = t_1;
	} else if (a <= -3.55e-146) {
		tmp = b * (y + -2.0);
	} else if (a <= 3.7e-37) {
		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 <= (-4.05d+48)) then
        tmp = t_1
    else if (a <= (-3.55d-146)) then
        tmp = b * (y + (-2.0d0))
    else if (a <= 3.7d-37) 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 <= -4.05e+48) {
		tmp = t_1;
	} else if (a <= -3.55e-146) {
		tmp = b * (y + -2.0);
	} else if (a <= 3.7e-37) {
		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 <= -4.05e+48:
		tmp = t_1
	elif a <= -3.55e-146:
		tmp = b * (y + -2.0)
	elif a <= 3.7e-37:
		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 <= -4.05e+48)
		tmp = t_1;
	elseif (a <= -3.55e-146)
		tmp = Float64(b * Float64(y + -2.0));
	elseif (a <= 3.7e-37)
		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 <= -4.05e+48)
		tmp = t_1;
	elseif (a <= -3.55e-146)
		tmp = b * (y + -2.0);
	elseif (a <= 3.7e-37)
		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, -4.05e+48], t$95$1, If[LessEqual[a, -3.55e-146], N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.7e-37], 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 -4.05 \cdot 10^{+48}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 3.7 \cdot 10^{-37}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.0499999999999999e48 or 3.7e-37 < a

    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. Taylor expanded in a around inf 54.0%

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

    if -4.0499999999999999e48 < a < -3.5500000000000002e-146

    1. Initial program 96.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. Taylor expanded in b around inf 55.2%

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

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

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

        \[\leadsto \color{blue}{b \cdot y + -2 \cdot b} \]
      2. *-commutative36.7%

        \[\leadsto b \cdot y + \color{blue}{b \cdot -2} \]
      3. distribute-lft-in36.7%

        \[\leadsto \color{blue}{b \cdot \left(y + -2\right)} \]
    6. Simplified36.7%

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

    if -3.5500000000000002e-146 < a < 3.7e-37

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + x} \]
    7. Step-by-step derivation
      1. +-commutative31.5%

        \[\leadsto \color{blue}{x + a} \]
    8. Simplified31.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.05 \cdot 10^{+48}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -3.55 \cdot 10^{-146}:\\ \;\;\;\;b \cdot \left(y + -2\right)\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-37}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 20: 33.8% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+23} \lor \neg \left(t \leq 1.8 \cdot 10^{+142}\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.9999999999999998e23 or 1.8000000000000001e142 < t

    1. Initial program 90.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. Taylor expanded in b around inf 42.5%

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

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

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

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified36.9%

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

    if -1.9999999999999998e23 < t < 1.8000000000000001e142

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a + x} \]
    7. Step-by-step derivation
      1. +-commutative37.1%

        \[\leadsto \color{blue}{x + a} \]
    8. Simplified37.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{+23} \lor \neg \left(t \leq 1.8 \cdot 10^{+142}\right):\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]

Alternative 21: 20.5% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 7.5 \cdot 10^{+91}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.25000000000000006e41 or 7.50000000000000033e91 < x

    1. Initial program 93.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. Taylor expanded in x around inf 38.0%

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

    if -1.25000000000000006e41 < x < 7.50000000000000033e91

    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. Taylor expanded in a around inf 38.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.25 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+91}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 20.9% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 2.35 \cdot 10^{+91}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.00000000000000021e45 or 2.3499999999999999e91 < x

    1. Initial program 93.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. Taylor expanded in x around inf 39.0%

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

    if -6.00000000000000021e45 < x < 2.3499999999999999e91

    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. Taylor expanded in z around inf 29.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{+45}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{+91}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 23: 11.3% accurate, 21.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{a} \]
  4. Final simplification12.6%

    \[\leadsto a \]

Reproduce

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