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

Percentage Accurate: 94.9% → 97.2%
Time: 15.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.2% 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 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 80.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\ t_3 := x + \left(z \cdot \left(1 - y\right) + t\_1\right)\\ \mathbf{if}\;b \leq -3.1 \cdot 10^{+161}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -4 \cdot 10^{+124}:\\ \;\;\;\;x + \left(z + t\_1\right)\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{+110}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -4.3 \cdot 10^{+74}:\\ \;\;\;\;x + \left(a - b \cdot \left(2 - y\right)\right)\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{+19}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+40}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{+112}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y + t\right) + -2 \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t)))
        (t_2 (* b (- (+ y t) 2.0)))
        (t_3 (+ x (+ (* z (- 1.0 y)) t_1))))
   (if (<= b -3.1e+161)
     t_2
     (if (<= b -4e+124)
       (+ x (+ z t_1))
       (if (<= b -3.5e+110)
         (* y (- b z))
         (if (<= b -4.3e+74)
           (+ x (- a (* b (- 2.0 y))))
           (if (<= b 4.6e+19)
             t_3
             (if (<= b 3.6e+40)
               t_2
               (if (<= b 1.75e+112) t_3 (+ (* b (+ y t)) (* -2.0 b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = b * ((y + t) - 2.0);
	double t_3 = x + ((z * (1.0 - y)) + t_1);
	double tmp;
	if (b <= -3.1e+161) {
		tmp = t_2;
	} else if (b <= -4e+124) {
		tmp = x + (z + t_1);
	} else if (b <= -3.5e+110) {
		tmp = y * (b - z);
	} else if (b <= -4.3e+74) {
		tmp = x + (a - (b * (2.0 - y)));
	} else if (b <= 4.6e+19) {
		tmp = t_3;
	} else if (b <= 3.6e+40) {
		tmp = t_2;
	} else if (b <= 1.75e+112) {
		tmp = t_3;
	} else {
		tmp = (b * (y + t)) + (-2.0 * b);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    t_2 = b * ((y + t) - 2.0d0)
    t_3 = x + ((z * (1.0d0 - y)) + t_1)
    if (b <= (-3.1d+161)) then
        tmp = t_2
    else if (b <= (-4d+124)) then
        tmp = x + (z + t_1)
    else if (b <= (-3.5d+110)) then
        tmp = y * (b - z)
    else if (b <= (-4.3d+74)) then
        tmp = x + (a - (b * (2.0d0 - y)))
    else if (b <= 4.6d+19) then
        tmp = t_3
    else if (b <= 3.6d+40) then
        tmp = t_2
    else if (b <= 1.75d+112) then
        tmp = t_3
    else
        tmp = (b * (y + t)) + ((-2.0d0) * b)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = b * ((y + t) - 2.0);
	double t_3 = x + ((z * (1.0 - y)) + t_1);
	double tmp;
	if (b <= -3.1e+161) {
		tmp = t_2;
	} else if (b <= -4e+124) {
		tmp = x + (z + t_1);
	} else if (b <= -3.5e+110) {
		tmp = y * (b - z);
	} else if (b <= -4.3e+74) {
		tmp = x + (a - (b * (2.0 - y)));
	} else if (b <= 4.6e+19) {
		tmp = t_3;
	} else if (b <= 3.6e+40) {
		tmp = t_2;
	} else if (b <= 1.75e+112) {
		tmp = t_3;
	} else {
		tmp = (b * (y + t)) + (-2.0 * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = b * ((y + t) - 2.0)
	t_3 = x + ((z * (1.0 - y)) + t_1)
	tmp = 0
	if b <= -3.1e+161:
		tmp = t_2
	elif b <= -4e+124:
		tmp = x + (z + t_1)
	elif b <= -3.5e+110:
		tmp = y * (b - z)
	elif b <= -4.3e+74:
		tmp = x + (a - (b * (2.0 - y)))
	elif b <= 4.6e+19:
		tmp = t_3
	elif b <= 3.6e+40:
		tmp = t_2
	elif b <= 1.75e+112:
		tmp = t_3
	else:
		tmp = (b * (y + t)) + (-2.0 * b)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	t_2 = Float64(b * Float64(Float64(y + t) - 2.0))
	t_3 = Float64(x + Float64(Float64(z * Float64(1.0 - y)) + t_1))
	tmp = 0.0
	if (b <= -3.1e+161)
		tmp = t_2;
	elseif (b <= -4e+124)
		tmp = Float64(x + Float64(z + t_1));
	elseif (b <= -3.5e+110)
		tmp = Float64(y * Float64(b - z));
	elseif (b <= -4.3e+74)
		tmp = Float64(x + Float64(a - Float64(b * Float64(2.0 - y))));
	elseif (b <= 4.6e+19)
		tmp = t_3;
	elseif (b <= 3.6e+40)
		tmp = t_2;
	elseif (b <= 1.75e+112)
		tmp = t_3;
	else
		tmp = Float64(Float64(b * Float64(y + t)) + Float64(-2.0 * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = b * ((y + t) - 2.0);
	t_3 = x + ((z * (1.0 - y)) + t_1);
	tmp = 0.0;
	if (b <= -3.1e+161)
		tmp = t_2;
	elseif (b <= -4e+124)
		tmp = x + (z + t_1);
	elseif (b <= -3.5e+110)
		tmp = y * (b - z);
	elseif (b <= -4.3e+74)
		tmp = x + (a - (b * (2.0 - y)));
	elseif (b <= 4.6e+19)
		tmp = t_3;
	elseif (b <= 3.6e+40)
		tmp = t_2;
	elseif (b <= 1.75e+112)
		tmp = t_3;
	else
		tmp = (b * (y + t)) + (-2.0 * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e+161], t$95$2, If[LessEqual[b, -4e+124], N[(x + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.5e+110], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.3e+74], N[(x + N[(a - N[(b * N[(2.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.6e+19], t$95$3, If[LessEqual[b, 3.6e+40], t$95$2, If[LessEqual[b, 1.75e+112], t$95$3, N[(N[(b * N[(y + t), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * b), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -4 \cdot 10^{+124}:\\
\;\;\;\;x + \left(z + t\_1\right)\\

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

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

\mathbf{elif}\;b \leq 4.6 \cdot 10^{+19}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 3.6 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 1.75 \cdot 10^{+112}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if b < -3.10000000000000007e161 or 4.6e19 < b < 3.59999999999999996e40

    1. Initial program 90.6%

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

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

    if -3.10000000000000007e161 < b < -3.99999999999999979e124

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

    if -3.99999999999999979e124 < b < -3.4999999999999999e110

    1. Initial program 50.0%

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

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

    if -3.4999999999999999e110 < b < -4.30000000000000001e74

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.30000000000000001e74 < b < 4.6e19 or 3.59999999999999996e40 < b < 1.74999999999999998e112

    1. Initial program 97.4%

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

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

    if 1.74999999999999998e112 < b

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.1 \cdot 10^{+161}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -4 \cdot 10^{+124}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{+110}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -4.3 \cdot 10^{+74}:\\ \;\;\;\;x + \left(a - b \cdot \left(2 - y\right)\right)\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{+19}:\\ \;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+40}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{+112}:\\ \;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y + t\right) + -2 \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 60.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \left(1 - y\right)\\ t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\ t_3 := x + a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -5.7 \cdot 10^{+165}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -1.45 \cdot 10^{+106}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -2.6 \cdot 10^{-9}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -1.8 \cdot 10^{-279}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-305}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-225}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* z (- 1.0 y))))
        (t_2 (* b (- (+ y t) 2.0)))
        (t_3 (+ x (* a (- 1.0 t)))))
   (if (<= b -5.7e+165)
     t_2
     (if (<= b -1.45e+106)
       t_1
       (if (<= b -2.6e-9)
         t_3
         (if (<= b -4.5e-188)
           t_1
           (if (<= b -1.8e-279)
             t_3
             (if (<= b 3e-305)
               t_1
               (if (<= b 1.3e-225) t_3 (if (<= b 4e+19) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (z * (1.0 - y));
	double t_2 = b * ((y + t) - 2.0);
	double t_3 = x + (a * (1.0 - t));
	double tmp;
	if (b <= -5.7e+165) {
		tmp = t_2;
	} else if (b <= -1.45e+106) {
		tmp = t_1;
	} else if (b <= -2.6e-9) {
		tmp = t_3;
	} else if (b <= -4.5e-188) {
		tmp = t_1;
	} else if (b <= -1.8e-279) {
		tmp = t_3;
	} else if (b <= 3e-305) {
		tmp = t_1;
	} else if (b <= 1.3e-225) {
		tmp = t_3;
	} else if (b <= 4e+19) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (z * (1.0d0 - y))
    t_2 = b * ((y + t) - 2.0d0)
    t_3 = x + (a * (1.0d0 - t))
    if (b <= (-5.7d+165)) then
        tmp = t_2
    else if (b <= (-1.45d+106)) then
        tmp = t_1
    else if (b <= (-2.6d-9)) then
        tmp = t_3
    else if (b <= (-4.5d-188)) then
        tmp = t_1
    else if (b <= (-1.8d-279)) then
        tmp = t_3
    else if (b <= 3d-305) then
        tmp = t_1
    else if (b <= 1.3d-225) then
        tmp = t_3
    else if (b <= 4d+19) 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 * (1.0 - y));
	double t_2 = b * ((y + t) - 2.0);
	double t_3 = x + (a * (1.0 - t));
	double tmp;
	if (b <= -5.7e+165) {
		tmp = t_2;
	} else if (b <= -1.45e+106) {
		tmp = t_1;
	} else if (b <= -2.6e-9) {
		tmp = t_3;
	} else if (b <= -4.5e-188) {
		tmp = t_1;
	} else if (b <= -1.8e-279) {
		tmp = t_3;
	} else if (b <= 3e-305) {
		tmp = t_1;
	} else if (b <= 1.3e-225) {
		tmp = t_3;
	} else if (b <= 4e+19) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (z * (1.0 - y))
	t_2 = b * ((y + t) - 2.0)
	t_3 = x + (a * (1.0 - t))
	tmp = 0
	if b <= -5.7e+165:
		tmp = t_2
	elif b <= -1.45e+106:
		tmp = t_1
	elif b <= -2.6e-9:
		tmp = t_3
	elif b <= -4.5e-188:
		tmp = t_1
	elif b <= -1.8e-279:
		tmp = t_3
	elif b <= 3e-305:
		tmp = t_1
	elif b <= 1.3e-225:
		tmp = t_3
	elif b <= 4e+19:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(z * Float64(1.0 - y)))
	t_2 = Float64(b * Float64(Float64(y + t) - 2.0))
	t_3 = Float64(x + Float64(a * Float64(1.0 - t)))
	tmp = 0.0
	if (b <= -5.7e+165)
		tmp = t_2;
	elseif (b <= -1.45e+106)
		tmp = t_1;
	elseif (b <= -2.6e-9)
		tmp = t_3;
	elseif (b <= -4.5e-188)
		tmp = t_1;
	elseif (b <= -1.8e-279)
		tmp = t_3;
	elseif (b <= 3e-305)
		tmp = t_1;
	elseif (b <= 1.3e-225)
		tmp = t_3;
	elseif (b <= 4e+19)
		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 * (1.0 - y));
	t_2 = b * ((y + t) - 2.0);
	t_3 = x + (a * (1.0 - t));
	tmp = 0.0;
	if (b <= -5.7e+165)
		tmp = t_2;
	elseif (b <= -1.45e+106)
		tmp = t_1;
	elseif (b <= -2.6e-9)
		tmp = t_3;
	elseif (b <= -4.5e-188)
		tmp = t_1;
	elseif (b <= -1.8e-279)
		tmp = t_3;
	elseif (b <= 3e-305)
		tmp = t_1;
	elseif (b <= 1.3e-225)
		tmp = t_3;
	elseif (b <= 4e+19)
		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[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.7e+165], t$95$2, If[LessEqual[b, -1.45e+106], t$95$1, If[LessEqual[b, -2.6e-9], t$95$3, If[LessEqual[b, -4.5e-188], t$95$1, If[LessEqual[b, -1.8e-279], t$95$3, If[LessEqual[b, 3e-305], t$95$1, If[LessEqual[b, 1.3e-225], t$95$3, If[LessEqual[b, 4e+19], t$95$1, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -1.45 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -2.6 \cdot 10^{-9}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq -4.5 \cdot 10^{-188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -1.8 \cdot 10^{-279}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 3 \cdot 10^{-305}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1.3 \cdot 10^{-225}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 4 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.70000000000000027e165 or 4e19 < b

    1. Initial program 90.8%

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

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

    if -5.70000000000000027e165 < b < -1.4500000000000001e106 or -2.6000000000000001e-9 < b < -4.49999999999999993e-188 or -1.7999999999999998e-279 < b < 3.0000000000000001e-305 or 1.30000000000000007e-225 < b < 4e19

    1. Initial program 96.3%

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

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

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

    if -1.4500000000000001e106 < b < -2.6000000000000001e-9 or -4.49999999999999993e-188 < b < -1.7999999999999998e-279 or 3.0000000000000001e-305 < b < 1.30000000000000007e-225

    1. Initial program 94.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.7 \cdot 10^{+165}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.45 \cdot 10^{+106}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -2.6 \cdot 10^{-9}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-188}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -1.8 \cdot 10^{-279}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-305}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-225}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+19}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 97.5% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

Alternative 5: 51.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -7.5 \cdot 10^{+60}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -0.00175:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-89}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-192}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{-263}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+98}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
   (if (<= t -7.5e+60)
     t_2
     (if (<= t -0.00175)
       t_1
       (if (<= t -5.5e-89)
         (+ x a)
         (if (<= t -3.4e-192)
           t_1
           (if (<= t -8.8e-263)
             (+ x a)
             (if (<= t 7.8e+17)
               t_1
               (if (<= t 2.3e+98) (- x (* t a)) t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -7.5e+60) {
		tmp = t_2;
	} else if (t <= -0.00175) {
		tmp = t_1;
	} else if (t <= -5.5e-89) {
		tmp = x + a;
	} else if (t <= -3.4e-192) {
		tmp = t_1;
	} else if (t <= -8.8e-263) {
		tmp = x + a;
	} else if (t <= 7.8e+17) {
		tmp = t_1;
	} else if (t <= 2.3e+98) {
		tmp = x - (t * a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = t * (b - a)
    if (t <= (-7.5d+60)) then
        tmp = t_2
    else if (t <= (-0.00175d0)) then
        tmp = t_1
    else if (t <= (-5.5d-89)) then
        tmp = x + a
    else if (t <= (-3.4d-192)) then
        tmp = t_1
    else if (t <= (-8.8d-263)) then
        tmp = x + a
    else if (t <= 7.8d+17) then
        tmp = t_1
    else if (t <= 2.3d+98) then
        tmp = x - (t * a)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -7.5e+60) {
		tmp = t_2;
	} else if (t <= -0.00175) {
		tmp = t_1;
	} else if (t <= -5.5e-89) {
		tmp = x + a;
	} else if (t <= -3.4e-192) {
		tmp = t_1;
	} else if (t <= -8.8e-263) {
		tmp = x + a;
	} else if (t <= 7.8e+17) {
		tmp = t_1;
	} else if (t <= 2.3e+98) {
		tmp = x - (t * a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -7.5e+60:
		tmp = t_2
	elif t <= -0.00175:
		tmp = t_1
	elif t <= -5.5e-89:
		tmp = x + a
	elif t <= -3.4e-192:
		tmp = t_1
	elif t <= -8.8e-263:
		tmp = x + a
	elif t <= 7.8e+17:
		tmp = t_1
	elif t <= 2.3e+98:
		tmp = x - (t * a)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -7.5e+60)
		tmp = t_2;
	elseif (t <= -0.00175)
		tmp = t_1;
	elseif (t <= -5.5e-89)
		tmp = Float64(x + a);
	elseif (t <= -3.4e-192)
		tmp = t_1;
	elseif (t <= -8.8e-263)
		tmp = Float64(x + a);
	elseif (t <= 7.8e+17)
		tmp = t_1;
	elseif (t <= 2.3e+98)
		tmp = Float64(x - Float64(t * a));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -7.5e+60)
		tmp = t_2;
	elseif (t <= -0.00175)
		tmp = t_1;
	elseif (t <= -5.5e-89)
		tmp = x + a;
	elseif (t <= -3.4e-192)
		tmp = t_1;
	elseif (t <= -8.8e-263)
		tmp = x + a;
	elseif (t <= 7.8e+17)
		tmp = t_1;
	elseif (t <= 2.3e+98)
		tmp = x - (t * a);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e+60], t$95$2, If[LessEqual[t, -0.00175], t$95$1, If[LessEqual[t, -5.5e-89], N[(x + a), $MachinePrecision], If[LessEqual[t, -3.4e-192], t$95$1, If[LessEqual[t, -8.8e-263], N[(x + a), $MachinePrecision], If[LessEqual[t, 7.8e+17], t$95$1, If[LessEqual[t, 2.3e+98], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -0.00175:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq -3.4 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.5e60 or 2.30000000000000013e98 < t

    1. Initial program 87.5%

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

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

    if -7.5e60 < t < -0.00175000000000000004 or -5.50000000000000012e-89 < t < -3.40000000000000002e-192 or -8.8000000000000001e-263 < t < 7.8e17

    1. Initial program 95.7%

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

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

    if -0.00175000000000000004 < t < -5.50000000000000012e-89 or -3.40000000000000002e-192 < t < -8.8000000000000001e-263

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.8e17 < t < 2.30000000000000013e98

    1. Initial program 94.1%

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{t \cdot a} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification60.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -0.00175:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-89}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-192}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{-263}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+17}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+98}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 51.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -6.9 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -505:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;t \leq 2 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.5999999999999999e61 or -6.8999999999999995e33 < t < -505 or 1.7999999999999999e98 < t

    1. Initial program 87.8%

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

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

    if -4.5999999999999999e61 < t < -6.8999999999999995e33 or -2.1e-262 < t < 2e19

    1. Initial program 95.9%

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

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

    if -505 < t < -1e-191

    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. Add Preprocessing
    3. Taylor expanded in b around 0 69.2%

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

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

    if -1e-191 < t < -2.1e-262

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e19 < t < 1.7999999999999999e98

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{+61}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -6.9 \cdot 10^{+33}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -505:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-191}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-262}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+19}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+98}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 47.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -345:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-263}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-305}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-56}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2800:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{+51}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (- b a))))
   (if (<= t -345.0)
     t_1
     (if (<= t -8.5e-263)
       (+ x a)
       (if (<= t -7e-305)
         (* z (- y))
         (if (<= t 5.8e-56)
           (+ x a)
           (if (<= t 2800.0) (* y b) (if (<= t 2.65e+51) (+ x a) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double tmp;
	if (t <= -345.0) {
		tmp = t_1;
	} else if (t <= -8.5e-263) {
		tmp = x + a;
	} else if (t <= -7e-305) {
		tmp = z * -y;
	} else if (t <= 5.8e-56) {
		tmp = x + a;
	} else if (t <= 2800.0) {
		tmp = y * b;
	} else if (t <= 2.65e+51) {
		tmp = x + a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (b - a)
    if (t <= (-345.0d0)) then
        tmp = t_1
    else if (t <= (-8.5d-263)) then
        tmp = x + a
    else if (t <= (-7d-305)) then
        tmp = z * -y
    else if (t <= 5.8d-56) then
        tmp = x + a
    else if (t <= 2800.0d0) then
        tmp = y * b
    else if (t <= 2.65d+51) then
        tmp = x + a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double tmp;
	if (t <= -345.0) {
		tmp = t_1;
	} else if (t <= -8.5e-263) {
		tmp = x + a;
	} else if (t <= -7e-305) {
		tmp = z * -y;
	} else if (t <= 5.8e-56) {
		tmp = x + a;
	} else if (t <= 2800.0) {
		tmp = y * b;
	} else if (t <= 2.65e+51) {
		tmp = x + a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (b - a)
	tmp = 0
	if t <= -345.0:
		tmp = t_1
	elif t <= -8.5e-263:
		tmp = x + a
	elif t <= -7e-305:
		tmp = z * -y
	elif t <= 5.8e-56:
		tmp = x + a
	elif t <= 2800.0:
		tmp = y * b
	elif t <= 2.65e+51:
		tmp = x + a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -345.0)
		tmp = t_1;
	elseif (t <= -8.5e-263)
		tmp = Float64(x + a);
	elseif (t <= -7e-305)
		tmp = Float64(z * Float64(-y));
	elseif (t <= 5.8e-56)
		tmp = Float64(x + a);
	elseif (t <= 2800.0)
		tmp = Float64(y * b);
	elseif (t <= 2.65e+51)
		tmp = Float64(x + a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (b - a);
	tmp = 0.0;
	if (t <= -345.0)
		tmp = t_1;
	elseif (t <= -8.5e-263)
		tmp = x + a;
	elseif (t <= -7e-305)
		tmp = z * -y;
	elseif (t <= 5.8e-56)
		tmp = x + a;
	elseif (t <= 2800.0)
		tmp = y * b;
	elseif (t <= 2.65e+51)
		tmp = x + a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -345.0], t$95$1, If[LessEqual[t, -8.5e-263], N[(x + a), $MachinePrecision], If[LessEqual[t, -7e-305], N[(z * (-y)), $MachinePrecision], If[LessEqual[t, 5.8e-56], N[(x + a), $MachinePrecision], If[LessEqual[t, 2800.0], N[(y * b), $MachinePrecision], If[LessEqual[t, 2.65e+51], N[(x + a), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

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

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

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

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

\mathbf{elif}\;t \leq 2.65 \cdot 10^{+51}:\\
\;\;\;\;x + a\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


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

    1. Initial program 89.1%

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

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

    if -345 < t < -8.49999999999999975e-263 or -6.9999999999999996e-305 < t < 5.79999999999999982e-56 or 2800 < t < 2.6499999999999998e51

    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. Add Preprocessing
    3. Taylor expanded in t around 0 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.49999999999999975e-263 < t < -6.9999999999999996e-305

    1. Initial program 100.0%

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

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

      \[\leadsto x - \color{blue}{y \cdot z} \]
    5. Taylor expanded in x around 0 59.7%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. associate-*r*59.7%

        \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot z} \]
      2. neg-mul-159.7%

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

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

    if 5.79999999999999982e-56 < t < 2800

    1. Initial program 87.3%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified44.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -345:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-263}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-305}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-56}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2800:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{+51}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 51.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq -0.00024:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq -1.6 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.59999999999999968e60 or 1.15000000000000001e37 < t

    1. Initial program 88.4%

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

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

    if -3.59999999999999968e60 < t < -2.40000000000000006e-4 or -2.4000000000000001e-93 < t < -1.60000000000000003e-193 or -1.9000000000000001e-262 < t < 1.15000000000000001e37

    1. Initial program 95.8%

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

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

    if -2.40000000000000006e-4 < t < -2.4000000000000001e-93 or -1.60000000000000003e-193 < t < -1.9000000000000001e-262

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -0.00024:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-93}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-193}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-262}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+37}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 61.2% accurate, 0.6× speedup?

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

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

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

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

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

\mathbf{elif}\;b \leq 4 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -4.9999999999999997e165 or 4.0000000000000001e138 < b

    1. Initial program 88.2%

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

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

    if -4.9999999999999997e165 < b < -6.6000000000000003e63 or 2.3e-40 < b < 4.0000000000000001e138

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.6000000000000003e63 < b < -2.70000000000000002e-8

    1. Initial program 62.5%

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

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

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

    if -2.70000000000000002e-8 < b < 2.3e-40

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+165}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{+63}:\\ \;\;\;\;x + \left(a - b \cdot \left(2 - y\right)\right)\\ \mathbf{elif}\;b \leq -2.7 \cdot 10^{-8}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-40}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+138}:\\ \;\;\;\;x + \left(a - b \cdot \left(2 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 61.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;b \leq -7.8 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;b \leq 4.2 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -4.9999999999999997e165

    1. Initial program 88.0%

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

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

    if -4.9999999999999997e165 < b < -7.8000000000000006e60 or 2.1500000000000001e-40 < b < 4.20000000000000014e138

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.8000000000000006e60 < b < -4.79999999999999997e-8

    1. Initial program 62.5%

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

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

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

    if -4.79999999999999997e-8 < b < 2.1500000000000001e-40

    1. Initial program 100.0%

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

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

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

    if 4.20000000000000014e138 < b

    1. Initial program 88.3%

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

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

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

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

        \[\leadsto \color{blue}{\left(t + y\right) \cdot b + -2 \cdot b} \]
      4. +-commutative86.9%

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

        \[\leadsto \left(y + t\right) \cdot b + \color{blue}{b \cdot -2} \]
    5. Applied egg-rr86.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+165}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -7.8 \cdot 10^{+60}:\\ \;\;\;\;x + \left(a - b \cdot \left(2 - y\right)\right)\\ \mathbf{elif}\;b \leq -4.8 \cdot 10^{-8}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{-40}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{+138}:\\ \;\;\;\;x + \left(a - b \cdot \left(2 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y + t\right) + -2 \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 71.5% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;b \leq -2.2 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 8.5 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -3.10000000000000007e161

    1. Initial program 88.5%

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

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

    if -3.10000000000000007e161 < b < -2.14999999999999997e133

    1. Initial program 71.4%

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

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

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

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

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

        \[\leadsto x - \left(a \cdot \left(t + \color{blue}{-1}\right) + -1 \cdot z\right) \]
      4. mul-1-neg86.8%

        \[\leadsto x - \left(a \cdot \left(t + -1\right) + \color{blue}{\left(-z\right)}\right) \]
      5. unsub-neg86.8%

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

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

    if -2.14999999999999997e133 < b < -2.2000000000000001e58 or 2.3e-40 < b < 8.5000000000000006e138

    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. Add Preprocessing
    3. Taylor expanded in t around 0 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2000000000000001e58 < b < 2.3e-40

    1. Initial program 98.3%

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

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

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

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

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

    if 8.5000000000000006e138 < b

    1. Initial program 88.3%

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

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

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

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

        \[\leadsto \color{blue}{\left(t + y\right) \cdot b + -2 \cdot b} \]
      4. +-commutative86.9%

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

        \[\leadsto \left(y + t\right) \cdot b + \color{blue}{b \cdot -2} \]
    5. Applied egg-rr86.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.1 \cdot 10^{+161}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -2.15 \cdot 10^{+133}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;b \leq -2.2 \cdot 10^{+58}:\\ \;\;\;\;x + \left(a - b \cdot \left(2 - y\right)\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-40}:\\ \;\;\;\;x - \left(z \cdot \left(y + -1\right) + t \cdot a\right)\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{+138}:\\ \;\;\;\;x + \left(a - b \cdot \left(2 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y + t\right) + -2 \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 57.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq -7.8 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -6 \cdot 10^{-188}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 3.9 \cdot 10^{-249}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 5.3 \cdot 10^{+19}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -7.2e89 or 5.3e19 < b

    1. Initial program 89.0%

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

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

    if -7.2e89 < b < -7.80000000000000053e-15 or -6.00000000000000033e-188 < b < 3.8999999999999999e-249

    1. Initial program 93.6%

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

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

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

    if -7.80000000000000053e-15 < b < -6.00000000000000033e-188 or 3.8999999999999999e-249 < b < 5.3e19

    1. Initial program 100.0%

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

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

      \[\leadsto x - \color{blue}{y \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.2 \cdot 10^{+89}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -7.8 \cdot 10^{-15}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -6 \cdot 10^{-188}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 3.9 \cdot 10^{-249}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 5.3 \cdot 10^{+19}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 35.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -8.8 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\

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

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

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

\mathbf{elif}\;y \leq 7.6 \cdot 10^{+169}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.8e15 or 4.2000000000000002e60 < y < 7.59999999999999983e169

    1. Initial program 92.0%

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

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

      \[\leadsto x - \color{blue}{y \cdot z} \]
    5. Taylor expanded in x around 0 50.9%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. associate-*r*50.9%

        \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot z} \]
      2. neg-mul-150.9%

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

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

    if -8.8e15 < y < -4.7999999999999999e-21 or 9.49999999999999967e-218 < y < 4.2000000000000002e60

    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. Add Preprocessing
    3. Taylor expanded in t around 0 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7999999999999999e-21 < y < 9.49999999999999967e-218

    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. Add Preprocessing
    3. Taylor expanded in b around inf 45.3%

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

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

    if 7.59999999999999983e169 < y

    1. Initial program 90.6%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified57.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.8 \cdot 10^{+15}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-21}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-218}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+60}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+169}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 64.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -1.05 \cdot 10^{-152}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 4.1 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.2000000000000001e48 or 4.1e60 < y

    1. Initial program 91.5%

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

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

    if -1.2000000000000001e48 < y < -1.04999999999999999e-152 or -4.60000000000000004e-302 < y < 4.1e60

    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. Add Preprocessing
    3. Taylor expanded in b around 0 71.0%

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

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

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

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

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

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

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

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

    if -1.04999999999999999e-152 < y < -4.60000000000000004e-302

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+48}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-152}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-302}:\\ \;\;\;\;x + \left(a - b \cdot \left(2 - y\right)\right)\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{+60}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 54.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq 6.5 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 3.45 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.89999999999999997e52 or 3.45e19 < b

    1. Initial program 88.6%

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

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

    if -4.89999999999999997e52 < b < 6.50000000000000028e-303 or 7.50000000000000009e-250 < b < 3.45e19

    1. Initial program 98.4%

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

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

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

    if 6.50000000000000028e-303 < b < 7.50000000000000009e-250

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.9 \cdot 10^{+52}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-303}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-250}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3.45 \cdot 10^{+19}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 82.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+85} \lor \neg \left(t \leq 1.22 \cdot 10^{+131}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.49999999999999945e85 or 1.22e131 < t

    1. Initial program 86.1%

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

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

    if -9.49999999999999945e85 < t < 1.22e131

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 86.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.25e51 or 1e13 < t

    1. Initial program 89.1%

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

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

    if -1.25e51 < t < 1e13

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 85.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq 2.35 \cdot 10^{-60}:\\
\;\;\;\;x + \left(t\_3 + t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2 + t\_3\\


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

    1. Initial program 83.3%

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

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

    if -1.8500000000000001e58 < b < 2.35e-60

    1. Initial program 98.3%

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

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

    if 2.35e-60 < 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. Add Preprocessing
    3. Taylor expanded in a around 0 87.9%

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

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

Alternative 19: 25.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -505:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq 7 \cdot 10^{-184}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 5600000:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 1.8 \cdot 10^{+98}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -505 or 1.7999999999999999e98 < t

    1. Initial program 88.8%

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

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

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

    if -505 < t < 6.99999999999999962e-184 or 5.6e6 < t < 1.7999999999999999e98

    1. Initial program 97.5%

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

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

    if 6.99999999999999962e-184 < t < 5.6e6

    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. Add Preprocessing
    3. Taylor expanded in z around inf 47.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -505:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-184}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5600000:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 35.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -8 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 4.1 \cdot 10^{+60}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;y \leq 2.75 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8e16 or 4.1e60 < y < 2.7499999999999999e170

    1. Initial program 92.0%

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

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

      \[\leadsto x - \color{blue}{y \cdot z} \]
    5. Taylor expanded in x around 0 50.9%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. associate-*r*50.9%

        \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot z} \]
      2. neg-mul-150.9%

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

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

    if -8e16 < y < 4.1e60

    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. Add Preprocessing
    3. Taylor expanded in t around 0 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7499999999999999e170 < y

    1. Initial program 90.6%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified57.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+16}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{+60}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{+170}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 63.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+15} \lor \neg \left(y \leq 4.1 \cdot 10^{+60}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.5e15 or 4.1e60 < y

    1. Initial program 91.7%

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

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

    if -6.5e15 < y < 4.1e60

    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. Add Preprocessing
    3. Taylor expanded in t around 0 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+15} \lor \neg \left(y \leq 4.1 \cdot 10^{+60}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(a + \left(z + -2 \cdot b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 26.8% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{+98}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.2e84 or 1.7999999999999999e98 < t

    1. Initial program 87.0%

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

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

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

    if -1.2e84 < t < 2.55e14

    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. Add Preprocessing
    3. Taylor expanded in y around inf 46.7%

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified21.1%

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

    if 2.55e14 < t < 1.7999999999999999e98

    1. Initial program 94.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{+84}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+14}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 32.6% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;b \leq 1.66 \cdot 10^{+139}:\\
\;\;\;\;x + a\\

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


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

    1. Initial program 84.1%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified41.8%

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

    if -5.4e89 < b < 1.66e139

    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. Add Preprocessing
    3. Taylor expanded in t around 0 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.66e139 < b

    1. Initial program 88.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.4 \cdot 10^{+89}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 1.66 \cdot 10^{+139}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 20.8% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;z \leq 1.72 \cdot 10^{+170}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.7e134 or 1.7200000000000001e170 < z

    1. Initial program 86.1%

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

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

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

    if -2.7e134 < z < 1.7200000000000001e170

    1. Initial program 96.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{+134}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 1.72 \cdot 10^{+170}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 15.4% accurate, 21.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 93.7%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification16.8%

    \[\leadsto x \]
  5. Add Preprocessing

Reproduce

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