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

Percentage Accurate: 95.4% → 97.4%
Time: 18.2s
Alternatives: 26
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 26 alternatives:

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

Initial Program: 95.4% 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.4% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Derivation
  1. Initial program 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. Step-by-step derivation
    1. +-commutative96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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: 44.1% accurate, 0.4× 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}\;y \leq -1.35 \cdot 10^{+183}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq -6.4 \cdot 10^{+34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-107}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{-168}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{-262}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-267}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{-304}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-289}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+30}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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 (<= y -1.35e+183)
     (- x (* y z))
     (if (<= y -6.4e+34)
       t_1
       (if (<= y -2.2e-107)
         t_2
         (if (<= y -6.2e-168)
           (+ x a)
           (if (<= y -1.65e-262)
             t_2
             (if (<= y -5.4e-267)
               (+ x a)
               (if (<= y 2.25e-304)
                 (* b (- y 2.0))
                 (if (<= y 1.2e-289)
                   z
                   (if (<= y 7.8e+30) (+ x a) t_1)))))))))))
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 (y <= -1.35e+183) {
		tmp = x - (y * z);
	} else if (y <= -6.4e+34) {
		tmp = t_1;
	} else if (y <= -2.2e-107) {
		tmp = t_2;
	} else if (y <= -6.2e-168) {
		tmp = x + a;
	} else if (y <= -1.65e-262) {
		tmp = t_2;
	} else if (y <= -5.4e-267) {
		tmp = x + a;
	} else if (y <= 2.25e-304) {
		tmp = b * (y - 2.0);
	} else if (y <= 1.2e-289) {
		tmp = z;
	} else if (y <= 7.8e+30) {
		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) :: t_2
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = t * (b - a)
    if (y <= (-1.35d+183)) then
        tmp = x - (y * z)
    else if (y <= (-6.4d+34)) then
        tmp = t_1
    else if (y <= (-2.2d-107)) then
        tmp = t_2
    else if (y <= (-6.2d-168)) then
        tmp = x + a
    else if (y <= (-1.65d-262)) then
        tmp = t_2
    else if (y <= (-5.4d-267)) then
        tmp = x + a
    else if (y <= 2.25d-304) then
        tmp = b * (y - 2.0d0)
    else if (y <= 1.2d-289) then
        tmp = z
    else if (y <= 7.8d+30) 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 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (y <= -1.35e+183) {
		tmp = x - (y * z);
	} else if (y <= -6.4e+34) {
		tmp = t_1;
	} else if (y <= -2.2e-107) {
		tmp = t_2;
	} else if (y <= -6.2e-168) {
		tmp = x + a;
	} else if (y <= -1.65e-262) {
		tmp = t_2;
	} else if (y <= -5.4e-267) {
		tmp = x + a;
	} else if (y <= 2.25e-304) {
		tmp = b * (y - 2.0);
	} else if (y <= 1.2e-289) {
		tmp = z;
	} else if (y <= 7.8e+30) {
		tmp = x + a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if y <= -1.35e+183:
		tmp = x - (y * z)
	elif y <= -6.4e+34:
		tmp = t_1
	elif y <= -2.2e-107:
		tmp = t_2
	elif y <= -6.2e-168:
		tmp = x + a
	elif y <= -1.65e-262:
		tmp = t_2
	elif y <= -5.4e-267:
		tmp = x + a
	elif y <= 2.25e-304:
		tmp = b * (y - 2.0)
	elif y <= 1.2e-289:
		tmp = z
	elif y <= 7.8e+30:
		tmp = x + a
	else:
		tmp = t_1
	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 (y <= -1.35e+183)
		tmp = Float64(x - Float64(y * z));
	elseif (y <= -6.4e+34)
		tmp = t_1;
	elseif (y <= -2.2e-107)
		tmp = t_2;
	elseif (y <= -6.2e-168)
		tmp = Float64(x + a);
	elseif (y <= -1.65e-262)
		tmp = t_2;
	elseif (y <= -5.4e-267)
		tmp = Float64(x + a);
	elseif (y <= 2.25e-304)
		tmp = Float64(b * Float64(y - 2.0));
	elseif (y <= 1.2e-289)
		tmp = z;
	elseif (y <= 7.8e+30)
		tmp = Float64(x + a);
	else
		tmp = t_1;
	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 (y <= -1.35e+183)
		tmp = x - (y * z);
	elseif (y <= -6.4e+34)
		tmp = t_1;
	elseif (y <= -2.2e-107)
		tmp = t_2;
	elseif (y <= -6.2e-168)
		tmp = x + a;
	elseif (y <= -1.65e-262)
		tmp = t_2;
	elseif (y <= -5.4e-267)
		tmp = x + a;
	elseif (y <= 2.25e-304)
		tmp = b * (y - 2.0);
	elseif (y <= 1.2e-289)
		tmp = z;
	elseif (y <= 7.8e+30)
		tmp = x + a;
	else
		tmp = t_1;
	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[y, -1.35e+183], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.4e+34], t$95$1, If[LessEqual[y, -2.2e-107], t$95$2, If[LessEqual[y, -6.2e-168], N[(x + a), $MachinePrecision], If[LessEqual[y, -1.65e-262], t$95$2, If[LessEqual[y, -5.4e-267], N[(x + a), $MachinePrecision], If[LessEqual[y, 2.25e-304], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e-289], z, If[LessEqual[y, 7.8e+30], N[(x + a), $MachinePrecision], t$95$1]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -6.4 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.2 \cdot 10^{-107}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq -1.65 \cdot 10^{-262}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 2.25 \cdot 10^{-304}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.34999999999999991e183

    1. Initial program 92.6%

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

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

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

    if -1.34999999999999991e183 < y < -6.3999999999999997e34 or 7.80000000000000021e30 < y

    1. Initial program 94.2%

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

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

    if -6.3999999999999997e34 < y < -2.20000000000000012e-107 or -6.2e-168 < y < -1.6500000000000001e-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 inf 60.9%

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

    if -2.20000000000000012e-107 < y < -6.2e-168 or -1.6500000000000001e-262 < y < -5.39999999999999975e-267 or 1.19999999999999997e-289 < y < 7.80000000000000021e30

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.39999999999999975e-267 < y < 2.2499999999999999e-304

    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 72.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. sub-neg72.8%

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

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

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

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

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

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

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

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

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

    if 2.2499999999999999e-304 < y < 1.19999999999999997e-289

    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 z around inf 55.2%

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

      \[\leadsto \color{blue}{z} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification65.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+183}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq -6.4 \cdot 10^{+34}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{-168}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{-262}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-267}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{-304}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-289}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+30}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

Alternative 4: 47.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ t_2 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -3.9 \cdot 10^{+31}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -2.35 \cdot 10^{-107}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-170}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-260}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-267}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 4.25 \cdot 10^{-305}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-289}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 4.95 \cdot 10^{+30}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (- b a))) (t_2 (* y (- b z))))
   (if (<= y -3.9e+31)
     t_2
     (if (<= y -2.35e-107)
       t_1
       (if (<= y -1.6e-170)
         (+ x a)
         (if (<= y -2.9e-260)
           t_1
           (if (<= y -3.1e-267)
             (+ x a)
             (if (<= y 4.25e-305)
               (* b (- y 2.0))
               (if (<= y 1.2e-289) z (if (<= y 4.95e+30) (+ x a) t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double t_2 = y * (b - z);
	double tmp;
	if (y <= -3.9e+31) {
		tmp = t_2;
	} else if (y <= -2.35e-107) {
		tmp = t_1;
	} else if (y <= -1.6e-170) {
		tmp = x + a;
	} else if (y <= -2.9e-260) {
		tmp = t_1;
	} else if (y <= -3.1e-267) {
		tmp = x + a;
	} else if (y <= 4.25e-305) {
		tmp = b * (y - 2.0);
	} else if (y <= 1.2e-289) {
		tmp = z;
	} else if (y <= 4.95e+30) {
		tmp = x + a;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * (b - a)
    t_2 = y * (b - z)
    if (y <= (-3.9d+31)) then
        tmp = t_2
    else if (y <= (-2.35d-107)) then
        tmp = t_1
    else if (y <= (-1.6d-170)) then
        tmp = x + a
    else if (y <= (-2.9d-260)) then
        tmp = t_1
    else if (y <= (-3.1d-267)) then
        tmp = x + a
    else if (y <= 4.25d-305) then
        tmp = b * (y - 2.0d0)
    else if (y <= 1.2d-289) then
        tmp = z
    else if (y <= 4.95d+30) then
        tmp = x + a
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double t_2 = y * (b - z);
	double tmp;
	if (y <= -3.9e+31) {
		tmp = t_2;
	} else if (y <= -2.35e-107) {
		tmp = t_1;
	} else if (y <= -1.6e-170) {
		tmp = x + a;
	} else if (y <= -2.9e-260) {
		tmp = t_1;
	} else if (y <= -3.1e-267) {
		tmp = x + a;
	} else if (y <= 4.25e-305) {
		tmp = b * (y - 2.0);
	} else if (y <= 1.2e-289) {
		tmp = z;
	} else if (y <= 4.95e+30) {
		tmp = x + a;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (b - a)
	t_2 = y * (b - z)
	tmp = 0
	if y <= -3.9e+31:
		tmp = t_2
	elif y <= -2.35e-107:
		tmp = t_1
	elif y <= -1.6e-170:
		tmp = x + a
	elif y <= -2.9e-260:
		tmp = t_1
	elif y <= -3.1e-267:
		tmp = x + a
	elif y <= 4.25e-305:
		tmp = b * (y - 2.0)
	elif y <= 1.2e-289:
		tmp = z
	elif y <= 4.95e+30:
		tmp = x + a
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(b - a))
	t_2 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -3.9e+31)
		tmp = t_2;
	elseif (y <= -2.35e-107)
		tmp = t_1;
	elseif (y <= -1.6e-170)
		tmp = Float64(x + a);
	elseif (y <= -2.9e-260)
		tmp = t_1;
	elseif (y <= -3.1e-267)
		tmp = Float64(x + a);
	elseif (y <= 4.25e-305)
		tmp = Float64(b * Float64(y - 2.0));
	elseif (y <= 1.2e-289)
		tmp = z;
	elseif (y <= 4.95e+30)
		tmp = Float64(x + a);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (b - a);
	t_2 = y * (b - z);
	tmp = 0.0;
	if (y <= -3.9e+31)
		tmp = t_2;
	elseif (y <= -2.35e-107)
		tmp = t_1;
	elseif (y <= -1.6e-170)
		tmp = x + a;
	elseif (y <= -2.9e-260)
		tmp = t_1;
	elseif (y <= -3.1e-267)
		tmp = x + a;
	elseif (y <= 4.25e-305)
		tmp = b * (y - 2.0);
	elseif (y <= 1.2e-289)
		tmp = z;
	elseif (y <= 4.95e+30)
		tmp = x + a;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.9e+31], t$95$2, If[LessEqual[y, -2.35e-107], t$95$1, If[LessEqual[y, -1.6e-170], N[(x + a), $MachinePrecision], If[LessEqual[y, -2.9e-260], t$95$1, If[LessEqual[y, -3.1e-267], N[(x + a), $MachinePrecision], If[LessEqual[y, 4.25e-305], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e-289], z, If[LessEqual[y, 4.95e+30], N[(x + a), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.35 \cdot 10^{-107}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq -2.9 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 4.25 \cdot 10^{-305}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.89999999999999999e31 or 4.9500000000000001e30 < y

    1. Initial program 93.8%

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

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

    if -3.89999999999999999e31 < y < -2.34999999999999999e-107 or -1.6e-170 < y < -2.8999999999999999e-260

    1. Initial program 100.0%

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

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

    if -2.34999999999999999e-107 < y < -1.6e-170 or -2.8999999999999999e-260 < y < -3.1000000000000001e-267 or 1.19999999999999997e-289 < y < 4.9500000000000001e30

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1000000000000001e-267 < y < 4.2499999999999998e-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 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 72.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. sub-neg72.8%

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

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

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

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

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

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

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

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

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

    if 4.2499999999999998e-305 < y < 1.19999999999999997e-289

    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 z around inf 55.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+31}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2.35 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-170}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-260}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-267}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 4.25 \cdot 10^{-305}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-289}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 4.95 \cdot 10^{+30}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 49.2% 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)\\ t_3 := \left(x + a\right) + -2 \cdot b\\ \mathbf{if}\;y \leq -1.6 \cdot 10^{+183}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq -5 \cdot 10^{+31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-94}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-168}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-231}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-240}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{+27}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))) (t_3 (+ (+ x a) (* -2.0 b))))
   (if (<= y -1.6e+183)
     (- x (* y z))
     (if (<= y -5e+31)
       t_1
       (if (<= y -1.7e-94)
         t_2
         (if (<= y -3.2e-168)
           t_3
           (if (<= y -1.75e-231)
             t_2
             (if (<= y -2.15e-240)
               (* b (- (+ y t) 2.0))
               (if (<= y 1.08e+27) t_3 t_1)))))))))
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 t_3 = (x + a) + (-2.0 * b);
	double tmp;
	if (y <= -1.6e+183) {
		tmp = x - (y * z);
	} else if (y <= -5e+31) {
		tmp = t_1;
	} else if (y <= -1.7e-94) {
		tmp = t_2;
	} else if (y <= -3.2e-168) {
		tmp = t_3;
	} else if (y <= -1.75e-231) {
		tmp = t_2;
	} else if (y <= -2.15e-240) {
		tmp = b * ((y + t) - 2.0);
	} else if (y <= 1.08e+27) {
		tmp = t_3;
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = t * (b - a)
    t_3 = (x + a) + ((-2.0d0) * b)
    if (y <= (-1.6d+183)) then
        tmp = x - (y * z)
    else if (y <= (-5d+31)) then
        tmp = t_1
    else if (y <= (-1.7d-94)) then
        tmp = t_2
    else if (y <= (-3.2d-168)) then
        tmp = t_3
    else if (y <= (-1.75d-231)) then
        tmp = t_2
    else if (y <= (-2.15d-240)) then
        tmp = b * ((y + t) - 2.0d0)
    else if (y <= 1.08d+27) then
        tmp = t_3
    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 = y * (b - z);
	double t_2 = t * (b - a);
	double t_3 = (x + a) + (-2.0 * b);
	double tmp;
	if (y <= -1.6e+183) {
		tmp = x - (y * z);
	} else if (y <= -5e+31) {
		tmp = t_1;
	} else if (y <= -1.7e-94) {
		tmp = t_2;
	} else if (y <= -3.2e-168) {
		tmp = t_3;
	} else if (y <= -1.75e-231) {
		tmp = t_2;
	} else if (y <= -2.15e-240) {
		tmp = b * ((y + t) - 2.0);
	} else if (y <= 1.08e+27) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	t_3 = (x + a) + (-2.0 * b)
	tmp = 0
	if y <= -1.6e+183:
		tmp = x - (y * z)
	elif y <= -5e+31:
		tmp = t_1
	elif y <= -1.7e-94:
		tmp = t_2
	elif y <= -3.2e-168:
		tmp = t_3
	elif y <= -1.75e-231:
		tmp = t_2
	elif y <= -2.15e-240:
		tmp = b * ((y + t) - 2.0)
	elif y <= 1.08e+27:
		tmp = t_3
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(t * Float64(b - a))
	t_3 = Float64(Float64(x + a) + Float64(-2.0 * b))
	tmp = 0.0
	if (y <= -1.6e+183)
		tmp = Float64(x - Float64(y * z));
	elseif (y <= -5e+31)
		tmp = t_1;
	elseif (y <= -1.7e-94)
		tmp = t_2;
	elseif (y <= -3.2e-168)
		tmp = t_3;
	elseif (y <= -1.75e-231)
		tmp = t_2;
	elseif (y <= -2.15e-240)
		tmp = Float64(b * Float64(Float64(y + t) - 2.0));
	elseif (y <= 1.08e+27)
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = t * (b - a);
	t_3 = (x + a) + (-2.0 * b);
	tmp = 0.0;
	if (y <= -1.6e+183)
		tmp = x - (y * z);
	elseif (y <= -5e+31)
		tmp = t_1;
	elseif (y <= -1.7e-94)
		tmp = t_2;
	elseif (y <= -3.2e-168)
		tmp = t_3;
	elseif (y <= -1.75e-231)
		tmp = t_2;
	elseif (y <= -2.15e-240)
		tmp = b * ((y + t) - 2.0);
	elseif (y <= 1.08e+27)
		tmp = t_3;
	else
		tmp = t_1;
	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]}, Block[{t$95$3 = N[(N[(x + a), $MachinePrecision] + N[(-2.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+183], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5e+31], t$95$1, If[LessEqual[y, -1.7e-94], t$95$2, If[LessEqual[y, -3.2e-168], t$95$3, If[LessEqual[y, -1.75e-231], t$95$2, If[LessEqual[y, -2.15e-240], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e+27], t$95$3, t$95$1]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-94}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -3.2 \cdot 10^{-168}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq -1.75 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 1.08 \cdot 10^{+27}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.6000000000000001e183

    1. Initial program 92.6%

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

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

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

    if -1.6000000000000001e183 < y < -5.00000000000000027e31 or 1.08e27 < y

    1. Initial program 94.2%

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

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

    if -5.00000000000000027e31 < y < -1.6999999999999999e-94 or -3.20000000000000006e-168 < y < -1.7500000000000001e-231

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

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

    if -1.6999999999999999e-94 < y < -3.20000000000000006e-168 or -2.15000000000000007e-240 < y < 1.08e27

    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 72.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. sub-neg72.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + x\right) + \color{blue}{b \cdot -2} \]
    10. Simplified56.3%

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

    if -1.7500000000000001e-231 < y < -2.15000000000000007e-240

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+183}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq -5 \cdot 10^{+31}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-94}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-168}:\\ \;\;\;\;\left(x + a\right) + -2 \cdot b\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-240}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{+27}:\\ \;\;\;\;\left(x + a\right) + -2 \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 47.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(y - 2\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{+18}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-204}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-245}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-298}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-265}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-96}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 720000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- y 2.0))) (t_2 (* t (- b a))))
   (if (<= t -6.5e+18)
     t_2
     (if (<= t -2.2e-204)
       (+ x a)
       (if (<= t -2.5e-245)
         t_1
         (if (<= t 2e-298)
           (+ x a)
           (if (<= t 4.8e-265)
             t_1
             (if (<= t 3.1e-96)
               (* y (- z))
               (if (<= t 720000000.0) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (y - 2.0);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -6.5e+18) {
		tmp = t_2;
	} else if (t <= -2.2e-204) {
		tmp = x + a;
	} else if (t <= -2.5e-245) {
		tmp = t_1;
	} else if (t <= 2e-298) {
		tmp = x + a;
	} else if (t <= 4.8e-265) {
		tmp = t_1;
	} else if (t <= 3.1e-96) {
		tmp = y * -z;
	} else if (t <= 720000000.0) {
		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 = b * (y - 2.0d0)
    t_2 = t * (b - a)
    if (t <= (-6.5d+18)) then
        tmp = t_2
    else if (t <= (-2.2d-204)) then
        tmp = x + a
    else if (t <= (-2.5d-245)) then
        tmp = t_1
    else if (t <= 2d-298) then
        tmp = x + a
    else if (t <= 4.8d-265) then
        tmp = t_1
    else if (t <= 3.1d-96) then
        tmp = y * -z
    else if (t <= 720000000.0d0) 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 = b * (y - 2.0);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -6.5e+18) {
		tmp = t_2;
	} else if (t <= -2.2e-204) {
		tmp = x + a;
	} else if (t <= -2.5e-245) {
		tmp = t_1;
	} else if (t <= 2e-298) {
		tmp = x + a;
	} else if (t <= 4.8e-265) {
		tmp = t_1;
	} else if (t <= 3.1e-96) {
		tmp = y * -z;
	} else if (t <= 720000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (y - 2.0)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -6.5e+18:
		tmp = t_2
	elif t <= -2.2e-204:
		tmp = x + a
	elif t <= -2.5e-245:
		tmp = t_1
	elif t <= 2e-298:
		tmp = x + a
	elif t <= 4.8e-265:
		tmp = t_1
	elif t <= 3.1e-96:
		tmp = y * -z
	elif t <= 720000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(y - 2.0))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -6.5e+18)
		tmp = t_2;
	elseif (t <= -2.2e-204)
		tmp = Float64(x + a);
	elseif (t <= -2.5e-245)
		tmp = t_1;
	elseif (t <= 2e-298)
		tmp = Float64(x + a);
	elseif (t <= 4.8e-265)
		tmp = t_1;
	elseif (t <= 3.1e-96)
		tmp = Float64(y * Float64(-z));
	elseif (t <= 720000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (y - 2.0);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -6.5e+18)
		tmp = t_2;
	elseif (t <= -2.2e-204)
		tmp = x + a;
	elseif (t <= -2.5e-245)
		tmp = t_1;
	elseif (t <= 2e-298)
		tmp = x + a;
	elseif (t <= 4.8e-265)
		tmp = t_1;
	elseif (t <= 3.1e-96)
		tmp = y * -z;
	elseif (t <= 720000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+18], t$95$2, If[LessEqual[t, -2.2e-204], N[(x + a), $MachinePrecision], If[LessEqual[t, -2.5e-245], t$95$1, If[LessEqual[t, 2e-298], N[(x + a), $MachinePrecision], If[LessEqual[t, 4.8e-265], t$95$1, If[LessEqual[t, 3.1e-96], N[(y * (-z)), $MachinePrecision], If[LessEqual[t, 720000000.0], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -2.5 \cdot 10^{-245}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-265}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 720000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.5e18 or 7.2e8 < t

    1. Initial program 96.1%

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

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

    if -6.5e18 < t < -2.1999999999999998e-204 or -2.4999999999999998e-245 < t < 1.99999999999999982e-298

    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 t around 0 97.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 96.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. sub-neg96.6%

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

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

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

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

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

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

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

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

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

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

    if -2.1999999999999998e-204 < t < -2.4999999999999998e-245 or 1.99999999999999982e-298 < t < 4.7999999999999999e-265 or 3.0999999999999999e-96 < t < 7.2e8

    1. Initial program 97.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.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 94.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. sub-neg94.6%

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

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

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

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

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

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

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

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

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

    if 4.7999999999999999e-265 < t < 3.0999999999999999e-96

    1. Initial program 98.0%

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

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

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

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

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative35.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-204}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-245}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-298}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-265}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-96}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 720000000:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 63.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-144}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{-96}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t \leq 8 \cdot 10^{-36}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{+79}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t \leq 1.12 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.09999999999999999e53 or 1.12e98 < t

    1. Initial program 95.5%

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

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

    if -1.09999999999999999e53 < t < 3.19999999999999973e-144 or 3.0999999999999999e-96 < t < 7.9999999999999995e-36

    1. Initial program 97.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.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 96.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. sub-neg96.3%

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

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

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

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

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

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

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

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

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

    if 3.19999999999999973e-144 < t < 3.0999999999999999e-96 or 7.9999999999999995e-36 < t < 2.39999999999999986e79

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

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

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

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

    if 2.39999999999999986e79 < t < 1.12e98

    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 50.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. sub-neg100.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+53}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-144}:\\ \;\;\;\;a + \left(x - b \cdot \left(2 - y\right)\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-96}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-36}:\\ \;\;\;\;a + \left(x - b \cdot \left(2 - y\right)\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+79}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+98}:\\ \;\;\;\;x - b \cdot \left(2 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 36.5% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;b \leq 7.6 \cdot 10^{+43}:\\
\;\;\;\;x + a\\

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

\mathbf{elif}\;b \leq 9.6 \cdot 10^{+72}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -2.40000000000000005e57 or 9.6000000000000004e72 < b

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

    if -2.40000000000000005e57 < b < -2.3500000000000001e-113 or -1.14999999999999998e-274 < b < 7.60000000000000016e43

    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 76.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. sub-neg76.0%

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

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

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

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

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

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

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

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

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

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

    if -2.3500000000000001e-113 < b < -1.14999999999999998e-274

    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 z around inf 54.1%

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-lft-neg-out39.2%

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative39.2%

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

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

    if 7.60000000000000016e43 < b < 1.99999999999999997e67

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

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

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

    if 1.99999999999999997e67 < b < 9.6000000000000004e72

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.4 \cdot 10^{+57}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;b \leq -2.35 \cdot 10^{-113}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;b \leq -1.15 \cdot 10^{-274}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 7.6 \cdot 10^{+43}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;b \leq 2 \cdot 10^{+67}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 9.6 \cdot 10^{+72}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 62.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{if}\;y \leq -1.6 \cdot 10^{+183}:\\ \;\;\;\;\left(x + a\right) - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;y \leq -8.8 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-231}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-204}:\\ \;\;\;\;z + \left(\left(x + a\right) + -2 \cdot b\right)\\ \mathbf{elif}\;y \leq 5.9 \cdot 10^{+28}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (+ x (+ z (* a (- 1.0 t))))))
   (if (<= y -1.6e+183)
     (- (+ x a) (* z (+ y -1.0)))
     (if (<= y -8.8e+43)
       t_1
       (if (<= y -1.7e-231)
         t_2
         (if (<= y 1.6e-204)
           (+ z (+ (+ x a) (* -2.0 b)))
           (if (<= y 5.9e+28) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = x + (z + (a * (1.0 - t)));
	double tmp;
	if (y <= -1.6e+183) {
		tmp = (x + a) - (z * (y + -1.0));
	} else if (y <= -8.8e+43) {
		tmp = t_1;
	} else if (y <= -1.7e-231) {
		tmp = t_2;
	} else if (y <= 1.6e-204) {
		tmp = z + ((x + a) + (-2.0 * b));
	} else if (y <= 5.9e+28) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = x + (z + (a * (1.0d0 - t)))
    if (y <= (-1.6d+183)) then
        tmp = (x + a) - (z * (y + (-1.0d0)))
    else if (y <= (-8.8d+43)) then
        tmp = t_1
    else if (y <= (-1.7d-231)) then
        tmp = t_2
    else if (y <= 1.6d-204) then
        tmp = z + ((x + a) + ((-2.0d0) * b))
    else if (y <= 5.9d+28) then
        tmp = t_2
    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 = y * (b - z);
	double t_2 = x + (z + (a * (1.0 - t)));
	double tmp;
	if (y <= -1.6e+183) {
		tmp = (x + a) - (z * (y + -1.0));
	} else if (y <= -8.8e+43) {
		tmp = t_1;
	} else if (y <= -1.7e-231) {
		tmp = t_2;
	} else if (y <= 1.6e-204) {
		tmp = z + ((x + a) + (-2.0 * b));
	} else if (y <= 5.9e+28) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = x + (z + (a * (1.0 - t)))
	tmp = 0
	if y <= -1.6e+183:
		tmp = (x + a) - (z * (y + -1.0))
	elif y <= -8.8e+43:
		tmp = t_1
	elif y <= -1.7e-231:
		tmp = t_2
	elif y <= 1.6e-204:
		tmp = z + ((x + a) + (-2.0 * b))
	elif y <= 5.9e+28:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(x + Float64(z + Float64(a * Float64(1.0 - t))))
	tmp = 0.0
	if (y <= -1.6e+183)
		tmp = Float64(Float64(x + a) - Float64(z * Float64(y + -1.0)));
	elseif (y <= -8.8e+43)
		tmp = t_1;
	elseif (y <= -1.7e-231)
		tmp = t_2;
	elseif (y <= 1.6e-204)
		tmp = Float64(z + Float64(Float64(x + a) + Float64(-2.0 * b)));
	elseif (y <= 5.9e+28)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = x + (z + (a * (1.0 - t)));
	tmp = 0.0;
	if (y <= -1.6e+183)
		tmp = (x + a) - (z * (y + -1.0));
	elseif (y <= -8.8e+43)
		tmp = t_1;
	elseif (y <= -1.7e-231)
		tmp = t_2;
	elseif (y <= 1.6e-204)
		tmp = z + ((x + a) + (-2.0 * b));
	elseif (y <= 5.9e+28)
		tmp = t_2;
	else
		tmp = t_1;
	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[(x + N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+183], N[(N[(x + a), $MachinePrecision] - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.8e+43], t$95$1, If[LessEqual[y, -1.7e-231], t$95$2, If[LessEqual[y, 1.6e-204], N[(z + N[(N[(x + a), $MachinePrecision] + N[(-2.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.9e+28], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -8.8 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 5.9 \cdot 10^{+28}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

    if -1.6000000000000001e183 < y < -8.80000000000000002e43 or 5.9000000000000002e28 < y

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

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

    if -8.80000000000000002e43 < y < -1.7e-231 or 1.6e-204 < y < 5.9000000000000002e28

    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 80.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 0 78.0%

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

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

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

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

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

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

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

    if -1.7e-231 < y < 1.6e-204

    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 75.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. sub-neg75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+183}:\\ \;\;\;\;\left(x + a\right) - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;y \leq -8.8 \cdot 10^{+43}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-231}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-204}:\\ \;\;\;\;z + \left(\left(x + a\right) + -2 \cdot b\right)\\ \mathbf{elif}\;y \leq 5.9 \cdot 10^{+28}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 81.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq -3.4 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{+168}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.0000000000000006e203 or 9.20000000000000022e97 < t < 4.20000000000000006e168

    1. Initial program 91.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 83.7%

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

    if -9.0000000000000006e203 < t < -3.39999999999999989e40 or 4.20000000000000006e168 < t

    1. Initial program 98.2%

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

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

    if -3.39999999999999989e40 < t < 9.20000000000000022e97

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+203}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{+40}:\\ \;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+97}:\\ \;\;\;\;\left(x + b \cdot \left(y + -2\right)\right) + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+168}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 51.2% accurate, 0.7× 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 -2.25 \cdot 10^{+165}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-134}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 4.3 \cdot 10^{+18}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 5 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* y z))) (t_2 (* b (- (+ y t) 2.0))))
   (if (<= b -2.25e+165)
     t_2
     (if (<= b 3e-134)
       t_1
       (if (<= b 4.3e+18)
         (* a (- 1.0 t))
         (if (<= b 5e+36) t_1 (if (<= b 2.05e+68) (* t (- b a)) 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 <= -2.25e+165) {
		tmp = t_2;
	} else if (b <= 3e-134) {
		tmp = t_1;
	} else if (b <= 4.3e+18) {
		tmp = a * (1.0 - t);
	} else if (b <= 5e+36) {
		tmp = t_1;
	} else if (b <= 2.05e+68) {
		tmp = t * (b - a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (y * z)
    t_2 = b * ((y + t) - 2.0d0)
    if (b <= (-2.25d+165)) then
        tmp = t_2
    else if (b <= 3d-134) then
        tmp = t_1
    else if (b <= 4.3d+18) then
        tmp = a * (1.0d0 - t)
    else if (b <= 5d+36) then
        tmp = t_1
    else if (b <= 2.05d+68) then
        tmp = t * (b - a)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (y * z);
	double t_2 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -2.25e+165) {
		tmp = t_2;
	} else if (b <= 3e-134) {
		tmp = t_1;
	} else if (b <= 4.3e+18) {
		tmp = a * (1.0 - t);
	} else if (b <= 5e+36) {
		tmp = t_1;
	} else if (b <= 2.05e+68) {
		tmp = t * (b - a);
	} 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 <= -2.25e+165:
		tmp = t_2
	elif b <= 3e-134:
		tmp = t_1
	elif b <= 4.3e+18:
		tmp = a * (1.0 - t)
	elif b <= 5e+36:
		tmp = t_1
	elif b <= 2.05e+68:
		tmp = t * (b - a)
	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 <= -2.25e+165)
		tmp = t_2;
	elseif (b <= 3e-134)
		tmp = t_1;
	elseif (b <= 4.3e+18)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (b <= 5e+36)
		tmp = t_1;
	elseif (b <= 2.05e+68)
		tmp = Float64(t * Float64(b - a));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (y * z);
	t_2 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -2.25e+165)
		tmp = t_2;
	elseif (b <= 3e-134)
		tmp = t_1;
	elseif (b <= 4.3e+18)
		tmp = a * (1.0 - t);
	elseif (b <= 5e+36)
		tmp = t_1;
	elseif (b <= 2.05e+68)
		tmp = t * (b - a);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.25e+165], t$95$2, If[LessEqual[b, 3e-134], t$95$1, If[LessEqual[b, 4.3e+18], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e+36], t$95$1, If[LessEqual[b, 2.05e+68], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], 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 -2.25 \cdot 10^{+165}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;b \leq 5 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.2499999999999998e165 or 2.05e68 < b

    1. Initial program 94.7%

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

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

    if -2.2499999999999998e165 < b < 3e-134 or 4.3e18 < b < 4.99999999999999977e36

    1. Initial program 98.0%

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

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

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

    if 3e-134 < b < 4.3e18

    1. Initial program 99.9%

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

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

    if 4.99999999999999977e36 < b < 2.05e68

    1. Initial program 85.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.25 \cdot 10^{+165}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-134}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 4.3 \cdot 10^{+18}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 5 \cdot 10^{+36}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 51.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq 4.5 \cdot 10^{-130}:\\
\;\;\;\;x - y \cdot z\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.5500000000000001e165 or 2.05e68 < b

    1. Initial program 94.7%

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

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

    if -1.5500000000000001e165 < b < 4.5e-130

    1. Initial program 97.9%

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

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

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

    if 4.5e-130 < b < 6.4e16

    1. Initial program 99.9%

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

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

    if 6.4e16 < b < 1.0500000000000001e23

    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. sub-neg100.0%

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

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

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

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

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

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

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

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

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

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

    if 1.0500000000000001e23 < b < 2.05e68

    1. Initial program 85.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.55 \cdot 10^{+165}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{-130}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 6.4 \cdot 10^{+16}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{+23}:\\ \;\;\;\;x - b \cdot \left(2 - y\right)\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 52.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := x + a \cdot \left(1 - t\right)\\ \mathbf{if}\;y \leq -1.6 \cdot 10^{+183}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq -2 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-231}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-204}:\\ \;\;\;\;\left(x + a\right) + -2 \cdot b\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+34}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (+ x (* a (- 1.0 t)))))
   (if (<= y -1.6e+183)
     (- x (* y z))
     (if (<= y -2e+42)
       t_1
       (if (<= y -1.7e-231)
         t_2
         (if (<= y 4.5e-204)
           (+ (+ x a) (* -2.0 b))
           (if (<= y 1.65e+34) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = x + (a * (1.0 - t));
	double tmp;
	if (y <= -1.6e+183) {
		tmp = x - (y * z);
	} else if (y <= -2e+42) {
		tmp = t_1;
	} else if (y <= -1.7e-231) {
		tmp = t_2;
	} else if (y <= 4.5e-204) {
		tmp = (x + a) + (-2.0 * b);
	} else if (y <= 1.65e+34) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = x + (a * (1.0d0 - t))
    if (y <= (-1.6d+183)) then
        tmp = x - (y * z)
    else if (y <= (-2d+42)) then
        tmp = t_1
    else if (y <= (-1.7d-231)) then
        tmp = t_2
    else if (y <= 4.5d-204) then
        tmp = (x + a) + ((-2.0d0) * b)
    else if (y <= 1.65d+34) then
        tmp = t_2
    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 = y * (b - z);
	double t_2 = x + (a * (1.0 - t));
	double tmp;
	if (y <= -1.6e+183) {
		tmp = x - (y * z);
	} else if (y <= -2e+42) {
		tmp = t_1;
	} else if (y <= -1.7e-231) {
		tmp = t_2;
	} else if (y <= 4.5e-204) {
		tmp = (x + a) + (-2.0 * b);
	} else if (y <= 1.65e+34) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = x + (a * (1.0 - t))
	tmp = 0
	if y <= -1.6e+183:
		tmp = x - (y * z)
	elif y <= -2e+42:
		tmp = t_1
	elif y <= -1.7e-231:
		tmp = t_2
	elif y <= 4.5e-204:
		tmp = (x + a) + (-2.0 * b)
	elif y <= 1.65e+34:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(x + Float64(a * Float64(1.0 - t)))
	tmp = 0.0
	if (y <= -1.6e+183)
		tmp = Float64(x - Float64(y * z));
	elseif (y <= -2e+42)
		tmp = t_1;
	elseif (y <= -1.7e-231)
		tmp = t_2;
	elseif (y <= 4.5e-204)
		tmp = Float64(Float64(x + a) + Float64(-2.0 * b));
	elseif (y <= 1.65e+34)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = x + (a * (1.0 - t));
	tmp = 0.0;
	if (y <= -1.6e+183)
		tmp = x - (y * z);
	elseif (y <= -2e+42)
		tmp = t_1;
	elseif (y <= -1.7e-231)
		tmp = t_2;
	elseif (y <= 4.5e-204)
		tmp = (x + a) + (-2.0 * b);
	elseif (y <= 1.65e+34)
		tmp = t_2;
	else
		tmp = t_1;
	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[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+183], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e+42], t$95$1, If[LessEqual[y, -1.7e-231], t$95$2, If[LessEqual[y, 4.5e-204], N[(N[(x + a), $MachinePrecision] + N[(-2.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+34], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 1.65 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 92.6%

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

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

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

    if -1.6000000000000001e183 < y < -2.00000000000000009e42 or 1.64999999999999994e34 < y

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

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

    if -2.00000000000000009e42 < y < -1.7e-231 or 4.49999999999999974e-204 < y < 1.64999999999999994e34

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

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

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

    if -1.7e-231 < y < 4.49999999999999974e-204

    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 75.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. sub-neg75.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(a + x\right) + -2 \cdot b} \]
      2. *-commutative59.6%

        \[\leadsto \left(a + x\right) + \color{blue}{b \cdot -2} \]
    10. Simplified59.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+183}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq -2 \cdot 10^{+42}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-231}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-204}:\\ \;\;\;\;\left(x + a\right) + -2 \cdot b\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+34}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 34.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -2.15 \cdot 10^{+85}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 8.2 \cdot 10^{+79}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.4999999999999999e216 or -2.15e85 < y < -4.20000000000000003e43 or 8.2e79 < y

    1. Initial program 92.9%

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-lft-neg-out53.5%

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative53.5%

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

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

    if -2.4999999999999999e216 < y < -2.15e85

    1. Initial program 97.1%

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

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

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

    if -4.20000000000000003e43 < y < -8.9999999999999996e-278

    1. Initial program 100.0%

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

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

    if -8.9999999999999996e-278 < y < 8.2e79

    1. Initial program 98.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.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 72.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. sub-neg72.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+216}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{+85}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{+43}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-278}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+79}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 84.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+48}:\\
\;\;\;\;\left(x - b \cdot \left(2 - \left(y + t\right)\right)\right) + t\_1\\

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


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

    1. Initial program 91.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 b around 0 89.3%

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

    if -1.90000000000000003e72 < z < 3.9000000000000001e48

    1. Initial program 98.7%

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

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

    if 3.9000000000000001e48 < z

    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 95.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 86.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. sub-neg86.0%

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

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

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

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

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

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

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

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

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

Alternative 16: 33.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -2.4 \cdot 10^{+85}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -3.05 \cdot 10^{+43} \lor \neg \left(y \leq 1.65 \cdot 10^{+74}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.0000000000000001e216 or -2.39999999999999997e85 < y < -3.0499999999999999e43 or 1.6500000000000001e74 < y

    1. Initial program 92.9%

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-lft-neg-out53.5%

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative53.5%

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

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

    if -4.0000000000000001e216 < y < -2.39999999999999997e85

    1. Initial program 97.1%

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

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

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

    if -3.0499999999999999e43 < y < 1.6500000000000001e74

    1. Initial program 99.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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 66.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. sub-neg66.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+216}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{+85}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3.05 \cdot 10^{+43} \lor \neg \left(y \leq 1.65 \cdot 10^{+74}\right):\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 62.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+183}:\\
\;\;\;\;x - y \cdot z\\

\mathbf{elif}\;y \leq -8.1 \cdot 10^{+40} \lor \neg \left(y \leq 2.35 \cdot 10^{+31}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.6000000000000001e183

    1. Initial program 92.6%

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

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

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

    if -1.6000000000000001e183 < y < -8.0999999999999998e40 or 2.3500000000000001e31 < y

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

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

    if -8.0999999999999998e40 < y < 2.3500000000000001e31

    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 74.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 0 73.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+183}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq -8.1 \cdot 10^{+40} \lor \neg \left(y \leq 2.35 \cdot 10^{+31}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 63.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+183}:\\
\;\;\;\;\left(x + a\right) - z \cdot \left(y + -1\right)\\

\mathbf{elif}\;y \leq -9.4 \cdot 10^{+42} \lor \neg \left(y \leq 2.85 \cdot 10^{+29}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.6000000000000001e183

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

    if -1.6000000000000001e183 < y < -9.39999999999999971e42 or 2.85e29 < y

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

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

    if -9.39999999999999971e42 < y < 2.85e29

    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 74.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 0 73.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+183}:\\ \;\;\;\;\left(x + a\right) - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;y \leq -9.4 \cdot 10^{+42} \lor \neg \left(y \leq 2.85 \cdot 10^{+29}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 78.7% accurate, 0.9× speedup?

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

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

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

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


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

    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 t around 0 93.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 84.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. sub-neg84.8%

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

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

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

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

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

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

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

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

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

    if -1.5500000000000001e165 < b < 1.11999999999999997e107

    1. Initial program 97.3%

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

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

    if 1.11999999999999997e107 < b

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

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

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

Alternative 20: 78.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.9 \cdot 10^{+166}:\\
\;\;\;\;a + \left(x - b \cdot \left(2 - y\right)\right)\\

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

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


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

    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 t around 0 93.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 84.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. sub-neg84.8%

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

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

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

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

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

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

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

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

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

    if -2.9000000000000001e166 < b < 2.15e107

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

    if 2.15e107 < b

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

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

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

Alternative 21: 69.6% accurate, 1.0× speedup?

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

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

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

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


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

    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 t around 0 93.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 84.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. sub-neg84.8%

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

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

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

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

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

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

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

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

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

    if -2.2499999999999998e165 < b < 7.10000000000000037e40

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

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

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

    if 7.10000000000000037e40 < b

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

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

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

Alternative 22: 23.0% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;x \leq 3.5 \cdot 10^{-246}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;x \leq 8.2 \cdot 10^{+79}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.20000000000000005e76 or 8.2e79 < x

    1. Initial program 97.0%

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

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

    if -9.20000000000000005e76 < x < 3.5000000000000002e-246

    1. Initial program 96.5%

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

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

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

    if 3.5000000000000002e-246 < x < 8.2e79

    1. Initial program 97.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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 68.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. sub-neg68.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{+76}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-246}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{+79}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 24.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.2 \cdot 10^{+68} \lor \neg \left(b \leq 1.8 \cdot 10^{-43}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.1999999999999998e68 or 1.7999999999999999e-43 < b

    1. Initial program 93.8%

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

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

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

    if -8.1999999999999998e68 < b < 1.7999999999999999e-43

    1. Initial program 99.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.2 \cdot 10^{+68} \lor \neg \left(b \leq 1.8 \cdot 10^{-43}\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 32.1% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-14} \lor \neg \left(y \leq 5 \cdot 10^{+36}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4e-14 or 4.99999999999999977e36 < y

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

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

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

    if -1.4e-14 < y < 4.99999999999999977e36

    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 67.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. sub-neg67.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{-14} \lor \neg \left(y \leq 5 \cdot 10^{+36}\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 20.8% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 2.45 \cdot 10^{+76}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6e19 or 2.45000000000000013e76 < x

    1. Initial program 97.2%

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

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

    if -6e19 < x < 2.45000000000000013e76

    1. Initial program 96.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 95.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 68.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. sub-neg68.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{+19}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.45 \cdot 10^{+76}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 11.0% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 96.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 t around 0 95.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 74.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. sub-neg74.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto a \]
  9. Add Preprocessing

Reproduce

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