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

Percentage Accurate: 95.5% → 98.0%
Time: 19.4s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 95.5% accurate, 1.0× speedup?

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

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

Alternative 1: 98.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 y around 0 9.7%

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

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

        \[\leadsto x + \left(z + t \cdot \left(b + \color{blue}{\left(-a\right)}\right)\right) \]
      2. unsub-neg64.3%

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

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

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

Alternative 2: 52.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - t \cdot a\\ t_2 := a \cdot \left(1 - t\right)\\ t_3 := \left(\left(y + t\right) - 2\right) \cdot b\\ t_4 := z \cdot \left(1 - y\right)\\ \mathbf{if}\;b \leq -58000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-211}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq -4.1 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 6 \cdot 10^{-256}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-135}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 3.5 \cdot 10^{-113}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{-103}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* t a)))
        (t_2 (* a (- 1.0 t)))
        (t_3 (* (- (+ y t) 2.0) b))
        (t_4 (* z (- 1.0 y))))
   (if (<= b -58000.0)
     t_3
     (if (<= b -4.6e-187)
       t_1
       (if (<= b -5e-211)
         t_4
         (if (<= b -4.1e-271)
           t_1
           (if (<= b 6e-256)
             t_4
             (if (<= b 2.6e-135)
               t_2
               (if (<= b 3.5e-113)
                 t_4
                 (if (<= b 1.95e-103) t_2 (if (<= b 2.5e+21) t_1 t_3)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (t * a);
	double t_2 = a * (1.0 - t);
	double t_3 = ((y + t) - 2.0) * b;
	double t_4 = z * (1.0 - y);
	double tmp;
	if (b <= -58000.0) {
		tmp = t_3;
	} else if (b <= -4.6e-187) {
		tmp = t_1;
	} else if (b <= -5e-211) {
		tmp = t_4;
	} else if (b <= -4.1e-271) {
		tmp = t_1;
	} else if (b <= 6e-256) {
		tmp = t_4;
	} else if (b <= 2.6e-135) {
		tmp = t_2;
	} else if (b <= 3.5e-113) {
		tmp = t_4;
	} else if (b <= 1.95e-103) {
		tmp = t_2;
	} else if (b <= 2.5e+21) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = x - (t * a)
    t_2 = a * (1.0d0 - t)
    t_3 = ((y + t) - 2.0d0) * b
    t_4 = z * (1.0d0 - y)
    if (b <= (-58000.0d0)) then
        tmp = t_3
    else if (b <= (-4.6d-187)) then
        tmp = t_1
    else if (b <= (-5d-211)) then
        tmp = t_4
    else if (b <= (-4.1d-271)) then
        tmp = t_1
    else if (b <= 6d-256) then
        tmp = t_4
    else if (b <= 2.6d-135) then
        tmp = t_2
    else if (b <= 3.5d-113) then
        tmp = t_4
    else if (b <= 1.95d-103) then
        tmp = t_2
    else if (b <= 2.5d+21) then
        tmp = t_1
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (t * a);
	double t_2 = a * (1.0 - t);
	double t_3 = ((y + t) - 2.0) * b;
	double t_4 = z * (1.0 - y);
	double tmp;
	if (b <= -58000.0) {
		tmp = t_3;
	} else if (b <= -4.6e-187) {
		tmp = t_1;
	} else if (b <= -5e-211) {
		tmp = t_4;
	} else if (b <= -4.1e-271) {
		tmp = t_1;
	} else if (b <= 6e-256) {
		tmp = t_4;
	} else if (b <= 2.6e-135) {
		tmp = t_2;
	} else if (b <= 3.5e-113) {
		tmp = t_4;
	} else if (b <= 1.95e-103) {
		tmp = t_2;
	} else if (b <= 2.5e+21) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (t * a)
	t_2 = a * (1.0 - t)
	t_3 = ((y + t) - 2.0) * b
	t_4 = z * (1.0 - y)
	tmp = 0
	if b <= -58000.0:
		tmp = t_3
	elif b <= -4.6e-187:
		tmp = t_1
	elif b <= -5e-211:
		tmp = t_4
	elif b <= -4.1e-271:
		tmp = t_1
	elif b <= 6e-256:
		tmp = t_4
	elif b <= 2.6e-135:
		tmp = t_2
	elif b <= 3.5e-113:
		tmp = t_4
	elif b <= 1.95e-103:
		tmp = t_2
	elif b <= 2.5e+21:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(t * a))
	t_2 = Float64(a * Float64(1.0 - t))
	t_3 = Float64(Float64(Float64(y + t) - 2.0) * b)
	t_4 = Float64(z * Float64(1.0 - y))
	tmp = 0.0
	if (b <= -58000.0)
		tmp = t_3;
	elseif (b <= -4.6e-187)
		tmp = t_1;
	elseif (b <= -5e-211)
		tmp = t_4;
	elseif (b <= -4.1e-271)
		tmp = t_1;
	elseif (b <= 6e-256)
		tmp = t_4;
	elseif (b <= 2.6e-135)
		tmp = t_2;
	elseif (b <= 3.5e-113)
		tmp = t_4;
	elseif (b <= 1.95e-103)
		tmp = t_2;
	elseif (b <= 2.5e+21)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (t * a);
	t_2 = a * (1.0 - t);
	t_3 = ((y + t) - 2.0) * b;
	t_4 = z * (1.0 - y);
	tmp = 0.0;
	if (b <= -58000.0)
		tmp = t_3;
	elseif (b <= -4.6e-187)
		tmp = t_1;
	elseif (b <= -5e-211)
		tmp = t_4;
	elseif (b <= -4.1e-271)
		tmp = t_1;
	elseif (b <= 6e-256)
		tmp = t_4;
	elseif (b <= 2.6e-135)
		tmp = t_2;
	elseif (b <= 3.5e-113)
		tmp = t_4;
	elseif (b <= 1.95e-103)
		tmp = t_2;
	elseif (b <= 2.5e+21)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -58000.0], t$95$3, If[LessEqual[b, -4.6e-187], t$95$1, If[LessEqual[b, -5e-211], t$95$4, If[LessEqual[b, -4.1e-271], t$95$1, If[LessEqual[b, 6e-256], t$95$4, If[LessEqual[b, 2.6e-135], t$95$2, If[LessEqual[b, 3.5e-113], t$95$4, If[LessEqual[b, 1.95e-103], t$95$2, If[LessEqual[b, 2.5e+21], t$95$1, t$95$3]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -4.6 \cdot 10^{-187}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -5 \cdot 10^{-211}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \leq -4.1 \cdot 10^{-271}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 6 \cdot 10^{-256}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{-135}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 3.5 \cdot 10^{-113}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \leq 1.95 \cdot 10^{-103}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -58000 or 2.5e21 < b

    1. Initial program 90.9%

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

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

    if -58000 < b < -4.59999999999999996e-187 or -5.0000000000000002e-211 < b < -4.1000000000000003e-271 or 1.9500000000000001e-103 < b < 2.5e21

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

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

      \[\leadsto x - \color{blue}{a \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative55.2%

        \[\leadsto x - \color{blue}{t \cdot a} \]
    5. Simplified55.2%

      \[\leadsto x - \color{blue}{t \cdot a} \]

    if -4.59999999999999996e-187 < b < -5.0000000000000002e-211 or -4.1000000000000003e-271 < b < 5.9999999999999996e-256 or 2.60000000000000004e-135 < b < 3.50000000000000029e-113

    1. Initial program 96.8%

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

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

    if 5.9999999999999996e-256 < b < 2.60000000000000004e-135 or 3.50000000000000029e-113 < b < 1.9500000000000001e-103

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -58000:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-187}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-211}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -4.1 \cdot 10^{-271}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 6 \cdot 10^{-256}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-135}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3.5 \cdot 10^{-113}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{-103}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+21}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 3: 81.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+189} \lor \neg \left(y \leq 7.7 \cdot 10^{+58}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.69999999999999994e189 or 7.70000000000000053e58 < y

    1. Initial program 94.6%

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

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

    if -2.69999999999999994e189 < y < 7.70000000000000053e58

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 y around 0 91.0%

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

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

Alternative 4: 47.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -2.4 \cdot 10^{-63}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -8 \cdot 10^{-93}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq -1.98 \cdot 10^{-115}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.05 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.4999999999999999e51 or 1.05e38 < t

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

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

    if -7.4999999999999999e51 < t < -2.4000000000000001e-63 or -7.9999999999999992e-93 < t < -1.97999999999999989e-115 or 1.45e-213 < t < 1.05e38

    1. Initial program 97.4%

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

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

    if -2.4000000000000001e-63 < t < -7.9999999999999992e-93

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

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

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

    if -1.97999999999999989e-115 < t < 1.45e-213

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+51}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-63}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-93}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq -1.98 \cdot 10^{-115}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-213}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+38}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 5: 74.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \left(\left(y + -1\right) \cdot z - a\right)\\ t_2 := x + \left(z + t \cdot \left(b - a\right)\right)\\ \mathbf{if}\;t \leq -1.7 \cdot 10^{+31}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{-119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-215}:\\ \;\;\;\;\left(x + a\right) + b \cdot \left(y + -2\right)\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (- (* (+ y -1.0) z) a))) (t_2 (+ x (+ z (* t (- b a))))))
   (if (<= t -1.7e+31)
     t_2
     (if (<= t -6.2e-119)
       t_1
       (if (<= t 4.1e-215)
         (+ (+ x a) (* b (+ y -2.0)))
         (if (<= t 1.95e+21) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (((y + -1.0) * z) - a);
	double t_2 = x + (z + (t * (b - a)));
	double tmp;
	if (t <= -1.7e+31) {
		tmp = t_2;
	} else if (t <= -6.2e-119) {
		tmp = t_1;
	} else if (t <= 4.1e-215) {
		tmp = (x + a) + (b * (y + -2.0));
	} else if (t <= 1.95e+21) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (((y + (-1.0d0)) * z) - a)
    t_2 = x + (z + (t * (b - a)))
    if (t <= (-1.7d+31)) then
        tmp = t_2
    else if (t <= (-6.2d-119)) then
        tmp = t_1
    else if (t <= 4.1d-215) then
        tmp = (x + a) + (b * (y + (-2.0d0)))
    else if (t <= 1.95d+21) 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 - (((y + -1.0) * z) - a);
	double t_2 = x + (z + (t * (b - a)));
	double tmp;
	if (t <= -1.7e+31) {
		tmp = t_2;
	} else if (t <= -6.2e-119) {
		tmp = t_1;
	} else if (t <= 4.1e-215) {
		tmp = (x + a) + (b * (y + -2.0));
	} else if (t <= 1.95e+21) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (((y + -1.0) * z) - a)
	t_2 = x + (z + (t * (b - a)))
	tmp = 0
	if t <= -1.7e+31:
		tmp = t_2
	elif t <= -6.2e-119:
		tmp = t_1
	elif t <= 4.1e-215:
		tmp = (x + a) + (b * (y + -2.0))
	elif t <= 1.95e+21:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(Float64(Float64(y + -1.0) * z) - a))
	t_2 = Float64(x + Float64(z + Float64(t * Float64(b - a))))
	tmp = 0.0
	if (t <= -1.7e+31)
		tmp = t_2;
	elseif (t <= -6.2e-119)
		tmp = t_1;
	elseif (t <= 4.1e-215)
		tmp = Float64(Float64(x + a) + Float64(b * Float64(y + -2.0)));
	elseif (t <= 1.95e+21)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (((y + -1.0) * z) - a);
	t_2 = x + (z + (t * (b - a)));
	tmp = 0.0;
	if (t <= -1.7e+31)
		tmp = t_2;
	elseif (t <= -6.2e-119)
		tmp = t_1;
	elseif (t <= 4.1e-215)
		tmp = (x + a) + (b * (y + -2.0));
	elseif (t <= 1.95e+21)
		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[(N[(N[(y + -1.0), $MachinePrecision] * z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+31], t$95$2, If[LessEqual[t, -6.2e-119], t$95$1, If[LessEqual[t, 4.1e-215], N[(N[(x + a), $MachinePrecision] + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+21], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -6.2 \cdot 10^{-119}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.95 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6999999999999999e31 or 1.95e21 < t

    1. Initial program 93.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative93.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-def93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 y around 0 78.5%

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

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

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

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

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

    if -1.6999999999999999e31 < t < -6.19999999999999956e-119 or 4.09999999999999985e-215 < t < 1.95e21

    1. Initial program 98.8%

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

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

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

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

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

    if -6.19999999999999956e-119 < t < 4.09999999999999985e-215

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

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

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

        \[\leadsto \left(x - a \cdot \left(t + \color{blue}{-1}\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      3. *-commutative81.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + b \cdot \left(y - 2\right) \]
      3. sub-neg81.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+31}:\\ \;\;\;\;x + \left(z + t \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{-119}:\\ \;\;\;\;x - \left(\left(y + -1\right) \cdot z - a\right)\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-215}:\\ \;\;\;\;\left(x + a\right) + b \cdot \left(y + -2\right)\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+21}:\\ \;\;\;\;x - \left(\left(y + -1\right) \cdot z - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z + t \cdot \left(b - a\right)\right)\\ \end{array} \]

Alternative 6: 80.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{+16} \lor \neg \left(b \leq 1.42 \cdot 10^{+119}\right):\\
\;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.5e16 or 1.4199999999999999e119 < b

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

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

    if -4.5e16 < b < 1.4199999999999999e119

    1. Initial program 98.7%

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

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

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

Alternative 7: 44.7% accurate, 1.4× speedup?

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

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

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

\mathbf{elif}\;t \leq -9.5 \cdot 10^{-165}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+38}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.6e31 or 1.1500000000000001e38 < t

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

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

    if -1.6e31 < t < -3.99999999999999969e-65 or 5.19999999999999961e-128 < t < 1.1500000000000001e38

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-rgt-neg-out33.1%

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

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

    if -3.99999999999999969e-65 < t < -9.49999999999999973e-165

    1. Initial program 95.7%

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

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

    if -9.49999999999999973e-165 < t < 5.19999999999999961e-128

    1. Initial program 98.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+31}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-65}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-165}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-128}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+38}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 8: 69.4% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-120}:\\
\;\;\;\;x + \left(z + \left(a + b \cdot -2\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6e31 or 1.55e21 < t

    1. Initial program 93.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative93.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-def93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 y around 0 78.5%

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

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

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

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

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

    if -1.6e31 < t < 1.25000000000000002e-120

    1. Initial program 98.1%

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

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

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

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

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

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

    if 1.25000000000000002e-120 < t < 1.55e21

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(1 - y\right) - \color{blue}{\left(-a\right)} \]
    8. Simplified62.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+31}:\\ \;\;\;\;x + \left(z + t \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-120}:\\ \;\;\;\;x + \left(z + \left(a + b \cdot -2\right)\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+21}:\\ \;\;\;\;a + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z + t \cdot \left(b - a\right)\right)\\ \end{array} \]

Alternative 9: 26.6% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;b \leq -5.2 \cdot 10^{-149}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq -1.3 \cdot 10^{-270}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 4.35 \cdot 10^{-256}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 6.1 \cdot 10^{+119}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.3e10 or 6.1e119 < b

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

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

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

    if -1.3e10 < b < -5.19999999999999998e-149 or -1.3000000000000001e-270 < b < 4.3499999999999999e-256

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

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

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

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

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

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

    if -5.19999999999999998e-149 < b < -1.3000000000000001e-270 or 4.3499999999999999e-256 < b < 6.1e119

    1. Initial program 99.1%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-in77.6%

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

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

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

        \[\leadsto \left(-a \cdot \left(t - 1\right)\right) + \left(-z \cdot \color{blue}{\left(y + \left(-1\right)\right)}\right) \]
      5. metadata-eval77.6%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, -\left(y + -1\right), -a \cdot \left(t - 1\right)\right)} \]
      9. neg-sub077.6%

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

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

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(0 - -1\right) - y}, -a \cdot \left(t - 1\right)\right) \]
      12. metadata-eval77.6%

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{1} - y, -a \cdot \left(t - 1\right)\right) \]
      13. sub-neg77.6%

        \[\leadsto \mathsf{fma}\left(z, 1 - y, -a \cdot \color{blue}{\left(t + \left(-1\right)\right)}\right) \]
      14. metadata-eval77.6%

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

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

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

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

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-lft-neg-out36.0%

        \[\leadsto \color{blue}{\left(-a\right) \cdot t} \]
      3. *-commutative36.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -13000000000:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-149}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq -1.3 \cdot 10^{-270}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;b \leq 4.35 \cdot 10^{-256}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 6.1 \cdot 10^{+119}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 10: 33.2% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;b \leq -4.6 \cdot 10^{-293}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.2 \cdot 10^{+208}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.79999999999999955e96 or 1.19999999999999993e208 < b

    1. Initial program 89.2%

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

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

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

    if -5.79999999999999955e96 < b < -4.5999999999999999e-293 or 2.75000000000000012e-257 < b < 1.19999999999999993e208

    1. Initial program 98.3%

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

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

    if -4.5999999999999999e-293 < b < 2.75000000000000012e-257

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-rgt-neg-out46.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.8 \cdot 10^{+96}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-293}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.75 \cdot 10^{-257}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+208}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 11: 38.5% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;b \leq -4.5 \cdot 10^{-293}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.1 \cdot 10^{+107}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.32000000000000002e33 or 1.1e107 < b

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

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

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

    if -2.32000000000000002e33 < b < -4.5000000000000002e-293 or 5.3e-257 < b < 1.1e107

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

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

    if -4.5000000000000002e-293 < b < 5.3e-257

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-rgt-neg-out46.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.32 \cdot 10^{+33}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-293}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 5.3 \cdot 10^{-257}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{+107}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]

Alternative 12: 50.4% accurate, 1.6× 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 -7.5 \cdot 10^{+38}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-180}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-210}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{+39}:\\ \;\;\;\;t_1\\ \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 -7.5e+38)
     t_2
     (if (<= t -2.5e-180)
       t_1
       (if (<= t 1.45e-210) (* b (- y 2.0)) (if (<= t 2.45e+39) t_1 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 <= -7.5e+38) {
		tmp = t_2;
	} else if (t <= -2.5e-180) {
		tmp = t_1;
	} else if (t <= 1.45e-210) {
		tmp = b * (y - 2.0);
	} else if (t <= 2.45e+39) {
		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 = y * (b - z)
    t_2 = t * (b - a)
    if (t <= (-7.5d+38)) then
        tmp = t_2
    else if (t <= (-2.5d-180)) then
        tmp = t_1
    else if (t <= 1.45d-210) then
        tmp = b * (y - 2.0d0)
    else if (t <= 2.45d+39) 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 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -7.5e+38) {
		tmp = t_2;
	} else if (t <= -2.5e-180) {
		tmp = t_1;
	} else if (t <= 1.45e-210) {
		tmp = b * (y - 2.0);
	} else if (t <= 2.45e+39) {
		tmp = t_1;
	} 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 <= -7.5e+38:
		tmp = t_2
	elif t <= -2.5e-180:
		tmp = t_1
	elif t <= 1.45e-210:
		tmp = b * (y - 2.0)
	elif t <= 2.45e+39:
		tmp = t_1
	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 <= -7.5e+38)
		tmp = t_2;
	elseif (t <= -2.5e-180)
		tmp = t_1;
	elseif (t <= 1.45e-210)
		tmp = Float64(b * Float64(y - 2.0));
	elseif (t <= 2.45e+39)
		tmp = t_1;
	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 <= -7.5e+38)
		tmp = t_2;
	elseif (t <= -2.5e-180)
		tmp = t_1;
	elseif (t <= 1.45e-210)
		tmp = b * (y - 2.0);
	elseif (t <= 2.45e+39)
		tmp = t_1;
	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, -7.5e+38], t$95$2, If[LessEqual[t, -2.5e-180], t$95$1, If[LessEqual[t, 1.45e-210], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.45e+39], t$95$1, 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 -7.5 \cdot 10^{+38}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -2.5 \cdot 10^{-180}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.45 \cdot 10^{+39}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.4999999999999999e38 or 2.44999999999999994e39 < t

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

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

    if -7.4999999999999999e38 < t < -2.5000000000000001e-180 or 1.45000000000000003e-210 < t < 2.44999999999999994e39

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

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

    if -2.5000000000000001e-180 < t < 1.45000000000000003e-210

    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 b around inf 52.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-180}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-210}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{+39}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 13: 68.9% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+136} \lor \neg \left(y \leq 1.52 \cdot 10^{+29}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.19999999999999967e136 or 1.52e29 < y

    1. Initial program 92.9%

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

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

    if -6.19999999999999967e136 < y < 1.52e29

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 y around 0 92.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+136} \lor \neg \left(y \leq 1.52 \cdot 10^{+29}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z + t \cdot \left(b - a\right)\right)\\ \end{array} \]

Alternative 14: 73.9% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+31} \lor \neg \left(t \leq 0.92\right):\\
\;\;\;\;x + \left(z + t \cdot \left(b - a\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.6e31 or 0.92000000000000004 < t

    1. Initial program 93.1%

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

        \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
      2. fma-def93.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+93.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-neg93.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-eval93.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-neg93.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+93.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. *-commutative93.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-in93.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-neg93.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-sub093.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-neg93.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. +-commutative93.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+93.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-eval93.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-eval93.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. *-commutative93.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-in93.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-sub093.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-neg93.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. +-commutative93.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+93.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. Simplified93.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 y around 0 77.9%

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

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

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

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

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

    if -1.6e31 < t < 0.92000000000000004

    1. Initial program 98.4%

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

      \[\leadsto \color{blue}{\left(x - a \cdot \left(t - 1\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. sub-neg70.0%

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

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

        \[\leadsto \left(x - \color{blue}{\left(t + -1\right) \cdot a}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      4. cancel-sign-sub-inv70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + a\right) + b \cdot \left(y + \color{blue}{-2}\right) \]
    7. Simplified69.4%

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

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

Alternative 15: 23.1% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -6.2 \cdot 10^{+70}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{-183}:\\ \;\;\;\;a\\ \mathbf{elif}\;b \leq 7.6 \cdot 10^{-118}:\\ \;\;\;\;z\\ \mathbf{elif}\;b \leq 8.8 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -6.2e+70)
   (* t b)
   (if (<= b -1.6e-183)
     a
     (if (<= b 7.6e-118) z (if (<= b 8.8e+20) x (* t b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -6.2e+70) {
		tmp = t * b;
	} else if (b <= -1.6e-183) {
		tmp = a;
	} else if (b <= 7.6e-118) {
		tmp = z;
	} else if (b <= 8.8e+20) {
		tmp = x;
	} else {
		tmp = t * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (b <= (-6.2d+70)) then
        tmp = t * b
    else if (b <= (-1.6d-183)) then
        tmp = a
    else if (b <= 7.6d-118) then
        tmp = z
    else if (b <= 8.8d+20) then
        tmp = x
    else
        tmp = t * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -6.2e+70) {
		tmp = t * b;
	} else if (b <= -1.6e-183) {
		tmp = a;
	} else if (b <= 7.6e-118) {
		tmp = z;
	} else if (b <= 8.8e+20) {
		tmp = x;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -6.2e+70:
		tmp = t * b
	elif b <= -1.6e-183:
		tmp = a
	elif b <= 7.6e-118:
		tmp = z
	elif b <= 8.8e+20:
		tmp = x
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -6.2e+70)
		tmp = Float64(t * b);
	elseif (b <= -1.6e-183)
		tmp = a;
	elseif (b <= 7.6e-118)
		tmp = z;
	elseif (b <= 8.8e+20)
		tmp = x;
	else
		tmp = Float64(t * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -6.2e+70)
		tmp = t * b;
	elseif (b <= -1.6e-183)
		tmp = a;
	elseif (b <= 7.6e-118)
		tmp = z;
	elseif (b <= 8.8e+20)
		tmp = x;
	else
		tmp = t * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.2e+70], N[(t * b), $MachinePrecision], If[LessEqual[b, -1.6e-183], a, If[LessEqual[b, 7.6e-118], z, If[LessEqual[b, 8.8e+20], x, N[(t * b), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -1.6 \cdot 10^{-183}:\\
\;\;\;\;a\\

\mathbf{elif}\;b \leq 7.6 \cdot 10^{-118}:\\
\;\;\;\;z\\

\mathbf{elif}\;b \leq 8.8 \cdot 10^{+20}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -6.2000000000000006e70 or 8.8e20 < b

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

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

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

    if -6.2000000000000006e70 < b < -1.6000000000000001e-183

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

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

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

    if -1.6000000000000001e-183 < b < 7.6000000000000002e-118

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 y around 0 78.4%

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

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

    if 7.6000000000000002e-118 < b < 8.8e20

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.2 \cdot 10^{+70}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{-183}:\\ \;\;\;\;a\\ \mathbf{elif}\;b \leq 7.6 \cdot 10^{-118}:\\ \;\;\;\;z\\ \mathbf{elif}\;b \leq 8.8 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 16: 57.8% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.8999999999999996e127 or 1.75e11 < y

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

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

    if -6.8999999999999996e127 < y < 1.75e11

    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. Step-by-step derivation
      1. +-commutative97.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-def97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 y around 0 94.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.9 \cdot 10^{+127} \lor \neg \left(y \leq 175000000000\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;z + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 17: 25.5% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;b \leq -8.5 \cdot 10^{-151}:\\
\;\;\;\;a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.65000000000000008e70 or 1.45000000000000004e119 < b

    1. Initial program 89.5%

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

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

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

    if -1.65000000000000008e70 < b < -8.49999999999999999e-151

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

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

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

    if -8.49999999999999999e-151 < b < 1.45000000000000004e119

    1. Initial program 98.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t - 1\right) + z \cdot \left(y - 1\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-in76.3%

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t - 1\right)\right) + -1 \cdot \left(z \cdot \left(y - 1\right)\right)} \]
      2. mul-1-neg76.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, -\left(y + -1\right), -a \cdot \left(t - 1\right)\right)} \]
      9. neg-sub076.3%

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

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

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(0 - -1\right) - y}, -a \cdot \left(t - 1\right)\right) \]
      12. metadata-eval76.3%

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{1} - y, -a \cdot \left(t - 1\right)\right) \]
      13. sub-neg76.3%

        \[\leadsto \mathsf{fma}\left(z, 1 - y, -a \cdot \color{blue}{\left(t + \left(-1\right)\right)}\right) \]
      14. metadata-eval76.3%

        \[\leadsto \mathsf{fma}\left(z, 1 - y, -a \cdot \left(t + \color{blue}{-1}\right)\right) \]
      15. fma-neg76.3%

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

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

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

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-lft-neg-out32.6%

        \[\leadsto \color{blue}{\left(-a\right) \cdot t} \]
      3. *-commutative32.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+70}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq -8.5 \cdot 10^{-151}:\\ \;\;\;\;a\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{+119}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 18: 21.8% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;x \leq -6 \cdot 10^{-290}:\\
\;\;\;\;a\\

\mathbf{elif}\;x \leq 9 \cdot 10^{-17}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 6.8 \cdot 10^{+109}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.09999999999999995e90 or 6.80000000000000013e109 < x

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

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

    if -1.09999999999999995e90 < x < -5.99999999999999985e-290 or 8.99999999999999957e-17 < x < 6.80000000000000013e109

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

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

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

    if -5.99999999999999985e-290 < x < 8.99999999999999957e-17

    1. Initial program 95.1%

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

        \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
      2. fma-def98.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+98.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-neg98.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-eval98.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-neg98.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+98.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. *-commutative98.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-in98.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.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-sub098.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-neg98.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. +-commutative98.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+98.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-eval98.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-eval98.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. *-commutative98.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-in98.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-sub098.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-neg98.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. +-commutative98.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+98.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. Simplified98.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 y around 0 69.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-290}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-17}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{+109}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 19: 20.7% accurate, 2.3× speedup?

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

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

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

\mathbf{elif}\;x \leq 1.06 \cdot 10^{+23}:\\
\;\;\;\;b \cdot -2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.02000000000000003e92 or 1.06e23 < x

    1. Initial program 93.8%

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

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

    if -1.02000000000000003e92 < x < -6.5e-272

    1. Initial program 97.5%

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

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

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

    if -6.5e-272 < x < 1.06e23

    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 b around inf 46.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.02 \cdot 10^{+92}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-272}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 1.06 \cdot 10^{+23}:\\ \;\;\;\;b \cdot -2\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 21.7% accurate, 4.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.99999999999999996e89 or 7.50000000000000018e109 < x

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

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

    if -7.99999999999999996e89 < x < 7.50000000000000018e109

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

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

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

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

Alternative 21: 11.6% 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 95.7%

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

    \[\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 2023314 
(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)))