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

Percentage Accurate: 94.9% → 97.9%
Time: 21.4s
Alternatives: 25
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 25 alternatives:

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

Alternative 2: 97.4% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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: 49.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq -4.6 \cdot 10^{+17}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -4.4 \cdot 10^{-70}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;y \leq 7.8 \cdot 10^{-224}:\\
\;\;\;\;x + z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -7.20000000000000011e86 or 2.55000000000000007e70 < y

    1. Initial program 94.6%

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

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

    if -7.20000000000000011e86 < y < -4.6e17 or -7.59999999999999988e-33 < y < -4.3999999999999998e-70

    1. Initial program 96.9%

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

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

    if -4.6e17 < y < -7.59999999999999988e-33

    1. Initial program 99.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 71.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 52.2%

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

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

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

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

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

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified52.2%

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

    if -4.3999999999999998e-70 < y < -5.39999999999999983e-210 or 4.9999999999999998e-270 < y < 7.7999999999999996e-224

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.39999999999999983e-210 < y < 4.9999999999999998e-270

    1. Initial program 97.0%

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

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

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

        \[\leadsto x - \color{blue}{t \cdot a} \]
    6. Simplified57.4%

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

    if 7.7999999999999996e-224 < y < 2.55000000000000007e70

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{+17}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{-33}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-70}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-210}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-270}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-224}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{+70}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 4: 58.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq -3.1 \cdot 10^{-78}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.6 \cdot 10^{-247}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4 \cdot 10^{-184}:\\
\;\;\;\;y \cdot \left(b - z\right)\\

\mathbf{elif}\;a \leq 8 \cdot 10^{+148}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.9500000000000001e54 or 8.0000000000000004e148 < 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 z around 0 88.0%

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

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

    if -1.9500000000000001e54 < a < -3.10000000000000018e-78 or -3.0999999999999999e-161 < a < 1.59999999999999997e-247 or 4.0000000000000002e-184 < a < 8.0000000000000004e148

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.10000000000000018e-78 < a < -3.0999999999999999e-161

    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 z around 0 84.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 a around 0 80.7%

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

    if 1.59999999999999997e-247 < a < 4.0000000000000002e-184

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.95 \cdot 10^{+54}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-78}:\\ \;\;\;\;x + \left(z + b \cdot \left(t - 2\right)\right)\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-161}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-247}:\\ \;\;\;\;x + \left(z + b \cdot \left(t - 2\right)\right)\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-184}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+148}:\\ \;\;\;\;x + \left(z + b \cdot \left(t - 2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 5: 85.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq -1600000:\\
\;\;\;\;t_1 + t_2\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+72}:\\
\;\;\;\;\left(\left(t + -2\right) \cdot b + \left(x + z\right)\right) + t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.0999999999999999e175

    1. Initial program 81.3%

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

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

    if -2.0999999999999999e175 < y < -1.6e6

    1. Initial program 97.6%

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

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

    if -1.6e6 < y < 2.90000000000000017e72

    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 y around 0 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.90000000000000017e72 < y

    1. Initial program 96.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+175}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1600000:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+72}:\\ \;\;\;\;\left(\left(t + -2\right) \cdot b + \left(x + z\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\ \end{array} \]

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -2.8 \cdot 10^{-48} \lor \neg \left(b \leq 9.2 \cdot 10^{+22}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.80000000000000005e-48 or 9.2000000000000008e22 < b

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

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

    if -2.80000000000000005e-48 < b < 9.2000000000000008e22

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

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

Alternative 7: 84.9% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.79999999999999968e51 or 1.9500000000000001e34 < a

    1. Initial program 96.2%

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

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

    if -7.79999999999999968e51 < a < 1.9500000000000001e34

    1. Initial program 97.9%

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

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

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

Alternative 8: 38.5% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;a \leq 4.6 \cdot 10^{-184}:\\
\;\;\;\;y \cdot b\\

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+146}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{+146}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.2500000000000001e-34 or 4.60000000000000001e146 < a

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

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

    if -1.2500000000000001e-34 < a < 1.6e-239 or 4.5999999999999999e-184 < a < 7.50000000000000014e24

    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 y around 0 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e-239 < a < 4.5999999999999999e-184

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

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

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

    if 7.50000000000000014e24 < a < 3.2e146

    1. Initial program 95.2%

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

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

      \[\leadsto x + \color{blue}{b \cdot t} \]
    5. Taylor expanded in x around 0 44.0%

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

        \[\leadsto \color{blue}{t \cdot b} \]
    7. Simplified44.0%

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

    if 3.2e146 < a < 4.60000000000000001e146

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{-34}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-239}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-184}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+24}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+146}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 9: 48.9% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -4.9 \cdot 10^{-70}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{-222}:\\
\;\;\;\;x + z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -7.20000000000000011e86 or 4.9e69 < y

    1. Initial program 94.6%

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

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

    if -7.20000000000000011e86 < y < -1.85e15 or -1.16e-30 < y < -4.9e-70

    1. Initial program 96.9%

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

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

    if -1.85e15 < y < -1.16e-30

    1. Initial program 99.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 71.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 52.2%

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

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

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

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

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

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified52.2%

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

    if -4.9e-70 < y < 1.19999999999999997e-222

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.19999999999999997e-222 < y < 4.9e69

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -1.16 \cdot 10^{-30}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -4.9 \cdot 10^{-70}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-222}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.9 \cdot 10^{+69}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 10: 71.0% accurate, 1.2× speedup?

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

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

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

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

\mathbf{elif}\;b \leq 1.25 \cdot 10^{+26}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.00000000000000024e56 or 1.25e26 < b

    1. Initial program 93.8%

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

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

    if -5.00000000000000024e56 < b < -8.6000000000000002e-80 or -1.89999999999999992e-129 < b < 1.25e26

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(z + x\right)} - \left(-a\right)\right) - y \cdot z \]
      4. associate--l+66.0%

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

        \[\leadsto \left(z + \color{blue}{\left(x + \left(-\left(-a\right)\right)\right)}\right) - y \cdot z \]
      6. remove-double-neg66.0%

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

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

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

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

    if -8.6000000000000002e-80 < b < -1.89999999999999992e-129

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+56}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -8.6 \cdot 10^{-80}:\\ \;\;\;\;\left(z + \left(x + a\right)\right) - y \cdot z\\ \mathbf{elif}\;b \leq -1.9 \cdot 10^{-129}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{+26}:\\ \;\;\;\;\left(z + \left(x + a\right)\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 11: 67.4% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.19999999999999948e-20 or 2.5e7 < t

    1. Initial program 95.5%

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

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

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

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

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

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

    if -7.19999999999999948e-20 < t < 1.1e-219

    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 y around 0 98.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\left(z + x\right)} - \left(-a\right)\right) - y \cdot z \]
      4. associate--l+72.8%

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

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

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

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

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

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

    if 1.1e-219 < t < 2.5e7

    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 83.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 t around 0 80.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-20}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - t \cdot a\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-219}:\\ \;\;\;\;\left(z + \left(x + a\right)\right) - y \cdot z\\ \mathbf{elif}\;t \leq 25000000:\\ \;\;\;\;x + \left(a + b \cdot \left(y + -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - t \cdot a\\ \end{array} \]

Alternative 12: 82.6% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.8000000000000004e131 or 1.1e149 < b

    1. Initial program 93.1%

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

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

    if -3.8000000000000004e131 < b < 1.1e149

    1. Initial program 98.9%

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

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

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

Alternative 13: 84.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -9.6 \cdot 10^{+54} \lor \neg \left(b \leq 1.9 \cdot 10^{+23}\right):\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) - t \cdot a\\ \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 -9.6e+54) (not (<= b 1.9e+23)))
   (- (+ x (* b (- (+ y t) 2.0))) (* t a))
   (+ 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 <= -9.6e+54) || !(b <= 1.9e+23)) {
		tmp = (x + (b * ((y + t) - 2.0))) - (t * a);
	} 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 <= (-9.6d+54)) .or. (.not. (b <= 1.9d+23))) then
        tmp = (x + (b * ((y + t) - 2.0d0))) - (t * a)
    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 <= -9.6e+54) || !(b <= 1.9e+23)) {
		tmp = (x + (b * ((y + t) - 2.0))) - (t * a);
	} 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 <= -9.6e+54) or not (b <= 1.9e+23):
		tmp = (x + (b * ((y + t) - 2.0))) - (t * a)
	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 <= -9.6e+54) || !(b <= 1.9e+23))
		tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) - Float64(t * a));
	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 <= -9.6e+54) || ~((b <= 1.9e+23)))
		tmp = (x + (b * ((y + t) - 2.0))) - (t * a);
	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, -9.6e+54], N[Not[LessEqual[b, 1.9e+23]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * a), $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 -9.6 \cdot 10^{+54} \lor \neg \left(b \leq 1.9 \cdot 10^{+23}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) - t \cdot a\\

\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 < -9.59999999999999993e54 or 1.89999999999999987e23 < b

    1. Initial program 93.8%

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

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

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

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

    if -9.59999999999999993e54 < b < 1.89999999999999987e23

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

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

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

Alternative 14: 34.4% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;y \leq -3.1 \cdot 10^{+19}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 2.6 \cdot 10^{-207}:\\
\;\;\;\;x + z\\

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

\mathbf{elif}\;y \leq 7 \cdot 10^{+84}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.05e88 or 6.9999999999999998e84 < y

    1. Initial program 94.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 68.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 y around inf 44.2%

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

    if -1.05e88 < y < -3.1e19 or 1.35000000000000009e-74 < y < 6.9999999999999998e84

    1. Initial program 97.6%

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

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

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

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

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

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

    if -3.1e19 < y < -1.3e9

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

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

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

      \[\leadsto x + \color{blue}{b \cdot t} \]
    5. Taylor expanded in x around 0 66.7%

      \[\leadsto \color{blue}{b \cdot t} \]
    6. Step-by-step derivation
      1. *-commutative66.7%

        \[\leadsto \color{blue}{t \cdot b} \]
    7. Simplified66.7%

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

    if -1.3e9 < y < 2.5999999999999999e-207

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5999999999999999e-207 < y < 1.35000000000000009e-74

    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 96.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 68.3%

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

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

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

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

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

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified48.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+88}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{+19}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;y \leq -1300000000:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-207}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-74}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+84}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 15: 52.8% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;b \leq -1.05 \cdot 10^{-252}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 3.2 \cdot 10^{-173}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

\mathbf{elif}\;b \leq 3.1 \cdot 10^{+68}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.3e39 or 3.0999999999999998e68 < 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 b around inf 66.4%

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

    if -1.3e39 < b < -1.05e-252 or 3.2e-173 < b < 3.0999999999999998e68

    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 71.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 58.6%

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

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

        \[\leadsto x - \color{blue}{t \cdot a} \]
    6. Simplified50.0%

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

    if -1.05e-252 < b < 3.2e-173

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.3 \cdot 10^{+39}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.05 \cdot 10^{-252}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{-173}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{+68}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 16: 35.1% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;y \leq -3 \cdot 10^{+14}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq -2.2 \cdot 10^{+14}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-205}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{+84}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.49999999999999961e50 or -3e14 < y < -2.2e14 or 6.50000000000000027e84 < y

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

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

    if -8.49999999999999961e50 < y < -3e14

    1. Initial program 92.9%

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

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

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

      \[\leadsto x + \color{blue}{b \cdot t} \]
    5. Taylor expanded in x around 0 44.8%

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

        \[\leadsto \color{blue}{t \cdot b} \]
    7. Simplified44.8%

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

    if -2.2e14 < y < 4.8000000000000004e-205

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000004e-205 < y < 6.50000000000000027e84

    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 91.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 62.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+50}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3 \cdot 10^{+14}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{+14}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-205}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+84}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 17: 64.5% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.85 \cdot 10^{+37} \lor \neg \left(b \leq 8.2 \cdot 10^{+43}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.85e37 or 8.2000000000000001e43 < b

    1. Initial program 94.0%

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

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

    if -1.85e37 < b < 8.2000000000000001e43

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.85 \cdot 10^{+37} \lor \neg \left(b \leq 8.2 \cdot 10^{+43}\right):\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 18: 25.6% accurate, 1.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.56 \cdot 10^{-204}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 1.62 \cdot 10^{+25}:\\
\;\;\;\;a\\

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


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

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

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

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

    if -1.0500000000000001e51 < y < -1.2499999999999999e-95

    1. Initial program 97.5%

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

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

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

      \[\leadsto x + \color{blue}{b \cdot t} \]
    5. Taylor expanded in x around 0 29.2%

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

        \[\leadsto \color{blue}{t \cdot b} \]
    7. Simplified29.2%

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

    if -1.2499999999999999e-95 < y < 1.56000000000000007e-204

    1. Initial program 98.5%

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

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

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

    if 1.56000000000000007e-204 < y < 1.62e25

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+51}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.25 \cdot 10^{-95}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.56 \cdot 10^{-204}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 1.62 \cdot 10^{+25}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 19: 31.2% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;b \leq 2.1 \cdot 10^{-305}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;b \leq 1.65 \cdot 10^{-212}:\\
\;\;\;\;z\\

\mathbf{elif}\;b \leq 2.35 \cdot 10^{+111}:\\
\;\;\;\;x + a\\

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


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

    1. Initial program 92.6%

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

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

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

      \[\leadsto x + \color{blue}{b \cdot t} \]
    5. Taylor expanded in x around 0 46.0%

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

        \[\leadsto \color{blue}{t \cdot b} \]
    7. Simplified46.0%

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

    if -7.8000000000000003e83 < b < 2.1e-305 or 1.6500000000000001e-212 < b < 2.35000000000000004e111

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

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

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

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

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

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

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

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

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

    if 2.1e-305 < b < 1.6500000000000001e-212

    1. Initial program 99.9%

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

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

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

    if 2.35000000000000004e111 < b

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.8 \cdot 10^{+83}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{-305}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-212}:\\ \;\;\;\;z\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{+111}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 20: 61.3% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.45 \cdot 10^{+57} \lor \neg \left(b \leq 1.2 \cdot 10^{+87}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.4500000000000001e57 or 1.19999999999999991e87 < b

    1. Initial program 93.4%

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

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

    if -1.4500000000000001e57 < b < 1.19999999999999991e87

    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 67.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 57.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.45 \cdot 10^{+57} \lor \neg \left(b \leq 1.2 \cdot 10^{+87}\right):\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 21: 20.8% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;x \leq -4.7 \cdot 10^{-241}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 3.25 \cdot 10^{-230}:\\
\;\;\;\;a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.65e130 or 1.1199999999999999e38 < x

    1. Initial program 96.8%

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

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

    if -1.65e130 < x < -4.6999999999999999e-241 or 3.2500000000000002e-230 < x < 1.1199999999999999e38

    1. Initial program 96.9%

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

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

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

    if -4.6999999999999999e-241 < x < 3.2500000000000002e-230

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{+130}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -4.7 \cdot 10^{-241}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 3.25 \cdot 10^{-230}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+38}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 25.4% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1500000:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq 6.1 \cdot 10^{-202}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 7.6 \cdot 10^{+25}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.5e6 or 7.6000000000000001e25 < y

    1. Initial program 95.1%

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

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

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

    if -1.5e6 < y < 6.10000000000000045e-202

    1. Initial program 98.9%

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

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

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

    if 6.10000000000000045e-202 < y < 7.6000000000000001e25

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1500000:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 6.1 \cdot 10^{-202}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+25}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 23: 50.2% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -12000 \lor \neg \left(t \leq 14500000\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -12000 or 1.45e7 < 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 64.7%

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

    if -12000 < t < 1.45e7

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -12000 \lor \neg \left(t \leq 14500000\right):\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]

Alternative 24: 20.8% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 2.35 \cdot 10^{+33}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.1999999999999998e61 or 2.3499999999999999e33 < x

    1. Initial program 97.2%

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

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

    if -3.1999999999999998e61 < x < 2.3499999999999999e33

    1. Initial program 97.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{+61}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{+33}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 25: 10.8% accurate, 21.0× speedup?

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

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

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

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

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

    \[\leadsto a \]

Reproduce

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