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

Percentage Accurate: 95.3% → 97.9%
Time: 14.2s
Alternatives: 24
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 24 alternatives:

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

Initial Program: 95.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

    if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b))

    1. Initial program 0.0%

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

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

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

Alternative 2: 97.5% accurate, 0.1× speedup?

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

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

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

      \[\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(y - 1\right) \cdot z\right) + \left(-\left(t - 1\right) \cdot a\right)}\right) \]
    7. associate-+l-98.4%

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

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

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

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

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

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

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

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

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

Alternative 3: 62.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(a - y \cdot z\right)\\ t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\ t_3 := x + a \cdot \left(1 - t\right)\\ t_4 := z \cdot \left(1 - y\right)\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{+49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -4.8 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.7 \cdot 10^{-248}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-299}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-260}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;b \leq 1.86 \cdot 10^{-152}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 3.25 \cdot 10^{-115}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-43}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-9}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (- a (* y z))))
        (t_2 (+ x (* b (- (+ y t) 2.0))))
        (t_3 (+ x (* a (- 1.0 t))))
        (t_4 (* z (- 1.0 y))))
   (if (<= b -3.5e+49)
     t_2
     (if (<= b -4.8e-81)
       t_1
       (if (<= b -1.7e-248)
         t_3
         (if (<= b 2.4e-299)
           t_1
           (if (<= b 2.9e-260)
             (+ a (+ x z))
             (if (<= b 1.86e-152)
               t_3
               (if (<= b 3.25e-115)
                 t_4
                 (if (<= b 1.65e-43) t_3 (if (<= b 2.3e-9) t_4 t_2)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (a - (y * z));
	double t_2 = x + (b * ((y + t) - 2.0));
	double t_3 = x + (a * (1.0 - t));
	double t_4 = z * (1.0 - y);
	double tmp;
	if (b <= -3.5e+49) {
		tmp = t_2;
	} else if (b <= -4.8e-81) {
		tmp = t_1;
	} else if (b <= -1.7e-248) {
		tmp = t_3;
	} else if (b <= 2.4e-299) {
		tmp = t_1;
	} else if (b <= 2.9e-260) {
		tmp = a + (x + z);
	} else if (b <= 1.86e-152) {
		tmp = t_3;
	} else if (b <= 3.25e-115) {
		tmp = t_4;
	} else if (b <= 1.65e-43) {
		tmp = t_3;
	} else if (b <= 2.3e-9) {
		tmp = t_4;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = x + (a - (y * z))
    t_2 = x + (b * ((y + t) - 2.0d0))
    t_3 = x + (a * (1.0d0 - t))
    t_4 = z * (1.0d0 - y)
    if (b <= (-3.5d+49)) then
        tmp = t_2
    else if (b <= (-4.8d-81)) then
        tmp = t_1
    else if (b <= (-1.7d-248)) then
        tmp = t_3
    else if (b <= 2.4d-299) then
        tmp = t_1
    else if (b <= 2.9d-260) then
        tmp = a + (x + z)
    else if (b <= 1.86d-152) then
        tmp = t_3
    else if (b <= 3.25d-115) then
        tmp = t_4
    else if (b <= 1.65d-43) then
        tmp = t_3
    else if (b <= 2.3d-9) then
        tmp = t_4
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (a - (y * z));
	double t_2 = x + (b * ((y + t) - 2.0));
	double t_3 = x + (a * (1.0 - t));
	double t_4 = z * (1.0 - y);
	double tmp;
	if (b <= -3.5e+49) {
		tmp = t_2;
	} else if (b <= -4.8e-81) {
		tmp = t_1;
	} else if (b <= -1.7e-248) {
		tmp = t_3;
	} else if (b <= 2.4e-299) {
		tmp = t_1;
	} else if (b <= 2.9e-260) {
		tmp = a + (x + z);
	} else if (b <= 1.86e-152) {
		tmp = t_3;
	} else if (b <= 3.25e-115) {
		tmp = t_4;
	} else if (b <= 1.65e-43) {
		tmp = t_3;
	} else if (b <= 2.3e-9) {
		tmp = t_4;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (a - (y * z))
	t_2 = x + (b * ((y + t) - 2.0))
	t_3 = x + (a * (1.0 - t))
	t_4 = z * (1.0 - y)
	tmp = 0
	if b <= -3.5e+49:
		tmp = t_2
	elif b <= -4.8e-81:
		tmp = t_1
	elif b <= -1.7e-248:
		tmp = t_3
	elif b <= 2.4e-299:
		tmp = t_1
	elif b <= 2.9e-260:
		tmp = a + (x + z)
	elif b <= 1.86e-152:
		tmp = t_3
	elif b <= 3.25e-115:
		tmp = t_4
	elif b <= 1.65e-43:
		tmp = t_3
	elif b <= 2.3e-9:
		tmp = t_4
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(a - Float64(y * z)))
	t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0)))
	t_3 = Float64(x + Float64(a * Float64(1.0 - t)))
	t_4 = Float64(z * Float64(1.0 - y))
	tmp = 0.0
	if (b <= -3.5e+49)
		tmp = t_2;
	elseif (b <= -4.8e-81)
		tmp = t_1;
	elseif (b <= -1.7e-248)
		tmp = t_3;
	elseif (b <= 2.4e-299)
		tmp = t_1;
	elseif (b <= 2.9e-260)
		tmp = Float64(a + Float64(x + z));
	elseif (b <= 1.86e-152)
		tmp = t_3;
	elseif (b <= 3.25e-115)
		tmp = t_4;
	elseif (b <= 1.65e-43)
		tmp = t_3;
	elseif (b <= 2.3e-9)
		tmp = t_4;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (a - (y * z));
	t_2 = x + (b * ((y + t) - 2.0));
	t_3 = x + (a * (1.0 - t));
	t_4 = z * (1.0 - y);
	tmp = 0.0;
	if (b <= -3.5e+49)
		tmp = t_2;
	elseif (b <= -4.8e-81)
		tmp = t_1;
	elseif (b <= -1.7e-248)
		tmp = t_3;
	elseif (b <= 2.4e-299)
		tmp = t_1;
	elseif (b <= 2.9e-260)
		tmp = a + (x + z);
	elseif (b <= 1.86e-152)
		tmp = t_3;
	elseif (b <= 3.25e-115)
		tmp = t_4;
	elseif (b <= 1.65e-43)
		tmp = t_3;
	elseif (b <= 2.3e-9)
		tmp = t_4;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e+49], t$95$2, If[LessEqual[b, -4.8e-81], t$95$1, If[LessEqual[b, -1.7e-248], t$95$3, If[LessEqual[b, 2.4e-299], t$95$1, If[LessEqual[b, 2.9e-260], N[(a + N[(x + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.86e-152], t$95$3, If[LessEqual[b, 3.25e-115], t$95$4, If[LessEqual[b, 1.65e-43], t$95$3, If[LessEqual[b, 2.3e-9], t$95$4, t$95$2]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -4.8 \cdot 10^{-81}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -1.7 \cdot 10^{-248}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 2.4 \cdot 10^{-299}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.86 \cdot 10^{-152}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 3.25 \cdot 10^{-115}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \leq 1.65 \cdot 10^{-43}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 2.3 \cdot 10^{-9}:\\
\;\;\;\;t_4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -3.49999999999999975e49 or 2.2999999999999999e-9 < b

    1. Initial program 94.3%

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

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

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

    if -3.49999999999999975e49 < b < -4.7999999999999998e-81 or -1.6999999999999999e-248 < b < 2.40000000000000019e-299

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

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

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

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

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

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

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

    if -4.7999999999999998e-81 < b < -1.6999999999999999e-248 or 2.8999999999999999e-260 < b < 1.8600000000000001e-152 or 3.25000000000000016e-115 < b < 1.65000000000000008e-43

    1. Initial program 100.0%

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

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

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

    if 2.40000000000000019e-299 < b < 2.8999999999999999e-260

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8600000000000001e-152 < b < 3.25000000000000016e-115 or 1.65000000000000008e-43 < b < 2.2999999999999999e-9

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+49}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -4.8 \cdot 10^{-81}:\\ \;\;\;\;x + \left(a - y \cdot z\right)\\ \mathbf{elif}\;b \leq -1.7 \cdot 10^{-248}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-299}:\\ \;\;\;\;x + \left(a - y \cdot z\right)\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-260}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;b \leq 1.86 \cdot 10^{-152}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3.25 \cdot 10^{-115}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-43}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-9}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 4: 86.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq -4.8 \cdot 10^{+22}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \leq -2.5 \cdot 10^{-17}:\\
\;\;\;\;t_2 + t_1\\

\mathbf{elif}\;b \leq 5.5 \cdot 10^{-9}:\\
\;\;\;\;x + \left(t_3 + t_1\right)\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -9.5999999999999995e129

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5999999999999995e129 < b < -4.8e22 or 5.4999999999999996e-9 < b

    1. Initial program 97.3%

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

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

    if -4.8e22 < b < -2.4999999999999999e-17

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

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

    if -2.4999999999999999e-17 < b < 5.4999999999999996e-9

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.6 \cdot 10^{+129}:\\ \;\;\;\;\left(x + z\right) + b \cdot \left(t + \left(y + -2\right)\right)\\ \mathbf{elif}\;b \leq -4.8 \cdot 10^{+22}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-17}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-9}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 5: 73.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq -2.1 \cdot 10^{-82}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq -2.2 \cdot 10^{-249}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 9.2 \cdot 10^{-299}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 4.4 \cdot 10^{-8}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0060000000000000001 < b < -2.1e-82 or -2.2e-249 < b < 9.2000000000000003e-299

    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 93.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 84.6%

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

        \[\leadsto \left(x + z\right) - \color{blue}{\left(-a\right)} \]
    5. Simplified84.6%

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

    if -2.1e-82 < b < -2.2e-249 or 9.2000000000000003e-299 < b < 4.3999999999999997e-8

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -0.006:\\ \;\;\;\;\left(x + z\right) + b \cdot \left(t + \left(y + -2\right)\right)\\ \mathbf{elif}\;b \leq -2.1 \cdot 10^{-82}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq -2.2 \cdot 10^{-249}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9.2 \cdot 10^{-299}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 4.4 \cdot 10^{-8}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + z\right) + b \cdot \left(t + \left(y + -2\right)\right)\\ \end{array} \]

Alternative 6: 70.5% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq -0.0061:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;b \leq 1.15 \cdot 10^{+116}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.3000000000000002e53 or 1.14999999999999997e116 < b

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

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

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

    if -3.3000000000000002e53 < b < -0.00610000000000000039 or -6.59999999999999975e-81 < b < 1.14999999999999997e116

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.00610000000000000039 < b < -0.0060000000000000001

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0060000000000000001 < b < -6.59999999999999975e-81

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.3 \cdot 10^{+53}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -0.0061:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -0.006:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{-81}:\\ \;\;\;\;x + \left(a - y \cdot z\right)\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+116}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 7: 71.0% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq -1.55 \cdot 10^{-81}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -2.05 \cdot 10^{-249}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 3.1 \cdot 10^{-299}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{+116}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4e53 or 1.14999999999999997e116 < b

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

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

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

    if -4e53 < b < -1.54999999999999994e-81 or -2.05000000000000002e-249 < b < 3.1e-299

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

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

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

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

    if -1.54999999999999994e-81 < b < -2.05000000000000002e-249 or 3.1e-299 < b < 1.14999999999999997e116

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4 \cdot 10^{+53}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.55 \cdot 10^{-81}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq -2.05 \cdot 10^{-249}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{-299}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+116}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 8: 85.0% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+239}:\\
\;\;\;\;x + \left(t_1 + t_2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.54999999999999998e44

    1. Initial program 97.8%

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

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

    if -1.54999999999999998e44 < t < 6.00000000000000011e25

    1. Initial program 99.3%

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

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

    if 6.00000000000000011e25 < t < 4.6000000000000004e239

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

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

    if 4.6000000000000004e239 < t

    1. Initial program 85.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+44}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+25}:\\ \;\;\;\;\left(x + b \cdot \left(y - 2\right)\right) + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+239}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 9: 86.0% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.4e53

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e53 < b < 4.5999999999999998e-9

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

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

    if 4.5999999999999998e-9 < b

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.4 \cdot 10^{+53}:\\ \;\;\;\;\left(x + z\right) + b \cdot \left(t + \left(y + -2\right)\right)\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{-9}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 10: 65.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-196}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{-179}:\\
\;\;\;\;a + \left(x + z\right)\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{+29}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.19999999999999972e50 or 2.3e79 < t

    1. Initial program 94.9%

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

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

    if -7.19999999999999972e50 < t < 2.3000000000000002e-196 or 2.0999999999999999e-179 < t < 1.59999999999999993e29

    1. Initial program 99.3%

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

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

      \[\leadsto \color{blue}{\left(x + b \cdot \left(y - 2\right)\right) - -1 \cdot a} \]
    4. Step-by-step derivation
      1. neg-mul-170.7%

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

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

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

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

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

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

    if 2.3000000000000002e-196 < t < 2.0999999999999999e-179

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999993e29 < t < 2.3e79

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+50}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-196}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-179}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+29}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+79}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 11: 74.7% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.1999999999999999e52 or 2.01999999999999992e239 < 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 89.1%

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

    if -8.1999999999999999e52 < t < 5.0000000000000001e-9

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + \left(z + b \cdot \left(y - 2\right)\right)\right) + \left(-\left(-a\right)\right)} \]
      3. remove-double-neg87.7%

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

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

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

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

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

    if 5.0000000000000001e-9 < t < 2.01999999999999992e239

    1. Initial program 98.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.2 \cdot 10^{+52}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-9}:\\ \;\;\;\;a + \left(\left(x + z\right) + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;t \leq 2.02 \cdot 10^{+239}:\\ \;\;\;\;x + \left(z \cdot \left(1 - y\right) - t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 12: 84.7% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.50000000000000019e53 or 1.35000000000000004e-7 < b

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + z\right) + b \cdot \left(t + \left(y + \color{blue}{-2}\right)\right) \]
    9. Simplified87.8%

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

    if -3.50000000000000019e53 < b < 1.35000000000000004e-7

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

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

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

Alternative 13: 25.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+41}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-206}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-198}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-149}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-100}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+58}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -2.25e+41)
   (* t b)
   (if (<= t -3.5e-206)
     z
     (if (<= t 2.9e-198)
       a
       (if (<= t 3.9e-149)
         z
         (if (<= t 1.02e-100) a (if (<= t 1.9e+58) x (* t b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -2.25e+41) {
		tmp = t * b;
	} else if (t <= -3.5e-206) {
		tmp = z;
	} else if (t <= 2.9e-198) {
		tmp = a;
	} else if (t <= 3.9e-149) {
		tmp = z;
	} else if (t <= 1.02e-100) {
		tmp = a;
	} else if (t <= 1.9e+58) {
		tmp = x;
	} else {
		tmp = t * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (t <= (-2.25d+41)) then
        tmp = t * b
    else if (t <= (-3.5d-206)) then
        tmp = z
    else if (t <= 2.9d-198) then
        tmp = a
    else if (t <= 3.9d-149) then
        tmp = z
    else if (t <= 1.02d-100) then
        tmp = a
    else if (t <= 1.9d+58) then
        tmp = x
    else
        tmp = t * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -2.25e+41) {
		tmp = t * b;
	} else if (t <= -3.5e-206) {
		tmp = z;
	} else if (t <= 2.9e-198) {
		tmp = a;
	} else if (t <= 3.9e-149) {
		tmp = z;
	} else if (t <= 1.02e-100) {
		tmp = a;
	} else if (t <= 1.9e+58) {
		tmp = x;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -2.25e+41:
		tmp = t * b
	elif t <= -3.5e-206:
		tmp = z
	elif t <= 2.9e-198:
		tmp = a
	elif t <= 3.9e-149:
		tmp = z
	elif t <= 1.02e-100:
		tmp = a
	elif t <= 1.9e+58:
		tmp = x
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -2.25e+41)
		tmp = Float64(t * b);
	elseif (t <= -3.5e-206)
		tmp = z;
	elseif (t <= 2.9e-198)
		tmp = a;
	elseif (t <= 3.9e-149)
		tmp = z;
	elseif (t <= 1.02e-100)
		tmp = a;
	elseif (t <= 1.9e+58)
		tmp = x;
	else
		tmp = Float64(t * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -2.25e+41)
		tmp = t * b;
	elseif (t <= -3.5e-206)
		tmp = z;
	elseif (t <= 2.9e-198)
		tmp = a;
	elseif (t <= 3.9e-149)
		tmp = z;
	elseif (t <= 1.02e-100)
		tmp = a;
	elseif (t <= 1.9e+58)
		tmp = x;
	else
		tmp = t * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.25e+41], N[(t * b), $MachinePrecision], If[LessEqual[t, -3.5e-206], z, If[LessEqual[t, 2.9e-198], a, If[LessEqual[t, 3.9e-149], z, If[LessEqual[t, 1.02e-100], a, If[LessEqual[t, 1.9e+58], x, N[(t * b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-206}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{-198}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{-149}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 1.02 \cdot 10^{-100}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+58}:\\
\;\;\;\;x\\

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


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

    1. Initial program 95.4%

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

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

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

    if -2.2500000000000001e41 < t < -3.49999999999999989e-206 or 2.90000000000000001e-198 < t < 3.9000000000000002e-149

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999989e-206 < t < 2.90000000000000001e-198 or 3.9000000000000002e-149 < t < 1.02e-100

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

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

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

    if 1.02e-100 < t < 1.8999999999999999e58

    1. Initial program 97.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{+41}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-206}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-198}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-149}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-100}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+58}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 14: 35.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(-t\right)\\ \mathbf{if}\;t \leq -2.6 \cdot 10^{+42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -0.62:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-32}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+37}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+262}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- t))))
   (if (<= t -2.6e+42)
     t_1
     (if (<= t -0.62)
       z
       (if (<= t -3.3e-32)
         (* y b)
         (if (<= t 2.05e+37) (+ x a) (if (<= t 2.9e+262) t_1 (* t b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * -t;
	double tmp;
	if (t <= -2.6e+42) {
		tmp = t_1;
	} else if (t <= -0.62) {
		tmp = z;
	} else if (t <= -3.3e-32) {
		tmp = y * b;
	} else if (t <= 2.05e+37) {
		tmp = x + a;
	} else if (t <= 2.9e+262) {
		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 * -t
    if (t <= (-2.6d+42)) then
        tmp = t_1
    else if (t <= (-0.62d0)) then
        tmp = z
    else if (t <= (-3.3d-32)) then
        tmp = y * b
    else if (t <= 2.05d+37) then
        tmp = x + a
    else if (t <= 2.9d+262) 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 * -t;
	double tmp;
	if (t <= -2.6e+42) {
		tmp = t_1;
	} else if (t <= -0.62) {
		tmp = z;
	} else if (t <= -3.3e-32) {
		tmp = y * b;
	} else if (t <= 2.05e+37) {
		tmp = x + a;
	} else if (t <= 2.9e+262) {
		tmp = t_1;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * -t
	tmp = 0
	if t <= -2.6e+42:
		tmp = t_1
	elif t <= -0.62:
		tmp = z
	elif t <= -3.3e-32:
		tmp = y * b
	elif t <= 2.05e+37:
		tmp = x + a
	elif t <= 2.9e+262:
		tmp = t_1
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(-t))
	tmp = 0.0
	if (t <= -2.6e+42)
		tmp = t_1;
	elseif (t <= -0.62)
		tmp = z;
	elseif (t <= -3.3e-32)
		tmp = Float64(y * b);
	elseif (t <= 2.05e+37)
		tmp = Float64(x + a);
	elseif (t <= 2.9e+262)
		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 * -t;
	tmp = 0.0;
	if (t <= -2.6e+42)
		tmp = t_1;
	elseif (t <= -0.62)
		tmp = z;
	elseif (t <= -3.3e-32)
		tmp = y * b;
	elseif (t <= 2.05e+37)
		tmp = x + a;
	elseif (t <= 2.9e+262)
		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 * (-t)), $MachinePrecision]}, If[LessEqual[t, -2.6e+42], t$95$1, If[LessEqual[t, -0.62], z, If[LessEqual[t, -3.3e-32], N[(y * b), $MachinePrecision], If[LessEqual[t, 2.05e+37], N[(x + a), $MachinePrecision], If[LessEqual[t, 2.9e+262], t$95$1, N[(t * b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -0.62:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq -3.3 \cdot 10^{-32}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 2.05 \cdot 10^{+37}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{+262}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.5999999999999999e42 or 2.0499999999999999e37 < t < 2.8999999999999998e262

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

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

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

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

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

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

    if -2.5999999999999999e42 < t < -0.619999999999999996

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.619999999999999996 < t < -3.30000000000000025e-32

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.30000000000000025e-32 < t < 2.0499999999999999e37

    1. Initial program 99.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative43.4%

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

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

    if 2.8999999999999998e262 < t

    1. Initial program 78.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+42}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{elif}\;t \leq -0.62:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-32}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+37}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+262}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 15: 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 -6.8 \cdot 10^{+40}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-8}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+77}:\\ \;\;\;\;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 -6.8e+40)
     t_2
     (if (<= t -2.5e-186)
       t_1
       (if (<= t 1.25e-8) (+ x a) (if (<= t 4.4e+77) 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 <= -6.8e+40) {
		tmp = t_2;
	} else if (t <= -2.5e-186) {
		tmp = t_1;
	} else if (t <= 1.25e-8) {
		tmp = x + a;
	} else if (t <= 4.4e+77) {
		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 <= (-6.8d+40)) then
        tmp = t_2
    else if (t <= (-2.5d-186)) then
        tmp = t_1
    else if (t <= 1.25d-8) then
        tmp = x + a
    else if (t <= 4.4d+77) 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 <= -6.8e+40) {
		tmp = t_2;
	} else if (t <= -2.5e-186) {
		tmp = t_1;
	} else if (t <= 1.25e-8) {
		tmp = x + a;
	} else if (t <= 4.4e+77) {
		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 <= -6.8e+40:
		tmp = t_2
	elif t <= -2.5e-186:
		tmp = t_1
	elif t <= 1.25e-8:
		tmp = x + a
	elif t <= 4.4e+77:
		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 <= -6.8e+40)
		tmp = t_2;
	elseif (t <= -2.5e-186)
		tmp = t_1;
	elseif (t <= 1.25e-8)
		tmp = Float64(x + a);
	elseif (t <= 4.4e+77)
		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 <= -6.8e+40)
		tmp = t_2;
	elseif (t <= -2.5e-186)
		tmp = t_1;
	elseif (t <= 1.25e-8)
		tmp = x + a;
	elseif (t <= 4.4e+77)
		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, -6.8e+40], t$95$2, If[LessEqual[t, -2.5e-186], t$95$1, If[LessEqual[t, 1.25e-8], N[(x + a), $MachinePrecision], If[LessEqual[t, 4.4e+77], 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 -6.8 \cdot 10^{+40}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;t \leq 4.4 \cdot 10^{+77}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.79999999999999977e40 or 4.4000000000000001e77 < t

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

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

    if -6.79999999999999977e40 < t < -2.5e-186 or 1.2499999999999999e-8 < t < 4.4000000000000001e77

    1. Initial program 100.0%

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

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

    if -2.5e-186 < t < 1.2499999999999999e-8

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv49.9%

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

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

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative49.9%

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified49.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+40}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-186}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-8}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+77}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 16: 50.0% accurate, 1.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.3999999999999999e39 or 2.8e77 < t

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

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

    if -3.3999999999999999e39 < t < -1.54999999999999996e-176

    1. Initial program 100.0%

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

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

    if -1.54999999999999996e-176 < t < 1.4e-8

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv49.9%

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

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

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative49.9%

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified49.9%

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

    if 1.4e-8 < t < 2.8e77

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{+39}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-176}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-8}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+77}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 17: 55.9% accurate, 1.6× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+29}:\\
\;\;\;\;a + \left(x + z\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.19999999999999969e39 or 2.2999999999999999e81 < t

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

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

    if -7.19999999999999969e39 < t < -1.76e-68

    1. Initial program 100.0%

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

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

    if -1.76e-68 < t < 1.4e29

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4e29 < t < 2.2999999999999999e81

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+39}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.76 \cdot 10^{-68}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+29}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+81}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 18: 48.6% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;t \leq -2.2 \cdot 10^{-68}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+37}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.1e41 or 1.44999999999999989e37 < t

    1. Initial program 95.6%

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

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

    if -2.1e41 < t < -2.20000000000000002e-68

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000002e-68 < t < 1.44999999999999989e37

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-68}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+37}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 19: 35.8% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+29}:\\
\;\;\;\;x + a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.7999999999999997e51 or 1.05e128 < t

    1. Initial program 95.0%

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

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

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

    if -5.7999999999999997e51 < t < 1.45e29

    1. Initial program 99.3%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv41.3%

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

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

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative41.3%

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified41.3%

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

    if 1.45e29 < t < 1.05e128

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+51}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+29}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+128}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 20: 26.1% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-278}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 7.4 \cdot 10^{+22}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.89999999999999992e62 or 7.3999999999999996e22 < y

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999992e62 < y < 8.49999999999999955e-278

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

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

    if 8.49999999999999955e-278 < y < 7.3999999999999996e22

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+62}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-278}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.4 \cdot 10^{+22}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 21: 36.1% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+50} \lor \neg \left(t \leq 4.6 \cdot 10^{+77}\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.4999999999999998e50 or 4.5999999999999999e77 < t

    1. Initial program 94.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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 inf 38.8%

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

    if -5.4999999999999998e50 < t < 4.5999999999999999e77

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+50} \lor \neg \left(t \leq 4.6 \cdot 10^{+77}\right):\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]

Alternative 22: 21.4% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+99}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.99999999999999998e89 or 1.55e99 < a

    1. Initial program 96.6%

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

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

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

    if -3.99999999999999998e89 < a < 1.55e99

    1. Initial program 98.2%

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

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

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

Alternative 23: 21.5% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+35}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.89999999999999997e85 or 4.1999999999999998e35 < z

    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-def99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.89999999999999997e85 < z < 4.1999999999999998e35

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+85}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+35}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]

Alternative 24: 11.3% accurate, 21.0× speedup?

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

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

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

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

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

    \[\leadsto a \]

Reproduce

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