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

Percentage Accurate: 95.4% → 97.9%
Time: 18.8s
Alternatives: 25
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 alternatives:

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

Initial Program: 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.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(x - z \cdot \left(y + -1\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(y + -1\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 97.5% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, \color{blue}{x - \left(\left(y - 1\right) \cdot z - \left(-\left(t - 1\right) \cdot a\right)\right)}\right) \]
    8. fma-neg97.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-neg97.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-eval97.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-neg97.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-neg97.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-eval97.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. Simplified97.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 simplification97.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 3: 67.2% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3e17 or 2.0999999999999998e104 < y

    1. Initial program 86.6%

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

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

    if -3e17 < y < 6.19999999999999992e-165

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

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

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

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

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

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

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

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

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

    if 6.19999999999999992e-165 < y < 4.5e-10

    1. Initial program 97.4%

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

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

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

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

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

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

    if 4.5e-10 < y < 2.0999999999999998e104

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

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

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

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

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

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

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

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

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

Alternative 4: 67.3% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.5999999999999996e35 or 5.2000000000000005e108 < y

    1. Initial program 86.6%

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

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

    if -4.5999999999999996e35 < y < 6.19999999999999992e-165

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

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

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

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

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

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

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

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

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

    if 6.19999999999999992e-165 < y < 1.3e-11

    1. Initial program 97.4%

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

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

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

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

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

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

    if 1.3e-11 < y < 5.2000000000000005e108

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+35}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-165}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-11}:\\ \;\;\;\;z + \left(x + b \cdot \left(t - 2\right)\right)\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+108}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 48.9% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.3e16 or 4.3e8 < y

    1. Initial program 88.8%

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

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

    if -5.3e16 < y < 1.85000000000000005e-215

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

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

    if 1.85000000000000005e-215 < y < 8.5000000000000003e-139

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a} \]
    7. Simplified66.1%

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

    if 8.5000000000000003e-139 < y < 4.3e8

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

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

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

Alternative 6: 48.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -95000000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.5000000000000001e113 or 1.30000000000000007e79 < z

    1. Initial program 87.3%

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

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

    if -9.5000000000000001e113 < z < -9.5e7 or 7.99999999999999964e-57 < z < 1.30000000000000007e79

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

    if -9.5e7 < z < 7.99999999999999964e-57

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

Alternative 7: 49.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.9 \cdot 10^{+31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{-215}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-70}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 350000000000:\\ \;\;\;\;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 (* y (- b z))))
   (if (<= y -1.9e+31)
     t_1
     (if (<= y 2.15e-215)
       (* a (- 1.0 t))
       (if (<= y 2.9e-70)
         (+ x a)
         (if (<= y 350000000000.0) (* t (- b a)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double tmp;
	if (y <= -1.9e+31) {
		tmp = t_1;
	} else if (y <= 2.15e-215) {
		tmp = a * (1.0 - t);
	} else if (y <= 2.9e-70) {
		tmp = x + a;
	} else if (y <= 350000000000.0) {
		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 = y * (b - z)
    if (y <= (-1.9d+31)) then
        tmp = t_1
    else if (y <= 2.15d-215) then
        tmp = a * (1.0d0 - t)
    else if (y <= 2.9d-70) then
        tmp = x + a
    else if (y <= 350000000000.0d0) 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 = y * (b - z);
	double tmp;
	if (y <= -1.9e+31) {
		tmp = t_1;
	} else if (y <= 2.15e-215) {
		tmp = a * (1.0 - t);
	} else if (y <= 2.9e-70) {
		tmp = x + a;
	} else if (y <= 350000000000.0) {
		tmp = t * (b - a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	tmp = 0
	if y <= -1.9e+31:
		tmp = t_1
	elif y <= 2.15e-215:
		tmp = a * (1.0 - t)
	elif y <= 2.9e-70:
		tmp = x + a
	elif y <= 350000000000.0:
		tmp = t * (b - a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -1.9e+31)
		tmp = t_1;
	elseif (y <= 2.15e-215)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (y <= 2.9e-70)
		tmp = Float64(x + a);
	elseif (y <= 350000000000.0)
		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 = y * (b - z);
	tmp = 0.0;
	if (y <= -1.9e+31)
		tmp = t_1;
	elseif (y <= 2.15e-215)
		tmp = a * (1.0 - t);
	elseif (y <= 2.9e-70)
		tmp = x + a;
	elseif (y <= 350000000000.0)
		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[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+31], t$95$1, If[LessEqual[y, 2.15e-215], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-70], N[(x + a), $MachinePrecision], If[LessEqual[y, 350000000000.0], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 350000000000:\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.9000000000000001e31 or 3.5e11 < y

    1. Initial program 88.7%

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

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

    if -1.9000000000000001e31 < y < 2.15000000000000012e-215

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

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

    if 2.15000000000000012e-215 < y < 2.89999999999999971e-70

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

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

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

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

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

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

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

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

    if 2.89999999999999971e-70 < y < 3.5e11

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

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

Alternative 8: 87.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{+113} \lor \neg \left(z \leq 4.5 \cdot 10^{+55}\right):\\
\;\;\;\;z + \left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.6999999999999998e113 or 4.49999999999999998e55 < z

    1. Initial program 88.0%

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

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

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

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

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

    if -5.6999999999999998e113 < z < 4.49999999999999998e55

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

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

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

Alternative 9: 85.9% accurate, 0.8× speedup?

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

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

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

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


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

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

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

    if -4.90000000000000021e113 < z < 1.15e-16

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

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

    if 1.15e-16 < z

    1. Initial program 84.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 a around 0 85.5%

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

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

Alternative 10: 85.4% accurate, 0.8× speedup?

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

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

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

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


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

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

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

    if -3.5000000000000001e113 < z < 4.09999999999999979e67

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

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

    if 4.09999999999999979e67 < z

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

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

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

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

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

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

Alternative 11: 66.5% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.09999999999999981e32 or 1.65000000000000004e103 < y

    1. Initial program 86.6%

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

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

    if -4.09999999999999981e32 < y < 1.9000000000000001e-138

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e-138 < y < 1.65000000000000004e103

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

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

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

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

Alternative 12: 58.7% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.09999999999999981e32 or 2.69999999999999993e103 < y

    1. Initial program 86.6%

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

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

    if -4.09999999999999981e32 < y < 2.6000000000000002e-164

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

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

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

    if 2.6000000000000002e-164 < y < 2.69999999999999993e103

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+32}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-164}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+103}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 35.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -7 \cdot 10^{+36}:\\
\;\;\;\;-y \cdot z\\

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

\mathbf{elif}\;y \leq 1.3 \cdot 10^{+105}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.4999999999999999e260 or 1.3000000000000001e105 < y

    1. Initial program 84.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 z around 0 65.0%

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

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

    if -1.4999999999999999e260 < y < -6.9999999999999996e36

    1. Initial program 88.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 54.2%

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

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

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

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

    if -6.9999999999999996e36 < y < 1.6499999999999999e-215

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

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

    if 1.6499999999999999e-215 < y < 1.3000000000000001e105

    1. Initial program 98.5%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a} \]
    7. Simplified38.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+260}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -7 \cdot 10^{+36}:\\ \;\;\;\;-y \cdot z\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-215}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+105}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 85.3% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7.5000000000000001e114 or 1.6e12 < b

    1. Initial program 87.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 z around 0 85.0%

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

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

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

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

    if -7.5000000000000001e114 < b < 1.6e12

    1. Initial program 97.5%

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

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

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

Alternative 15: 52.5% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.7e18 or 2.1e7 < y

    1. Initial program 88.8%

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

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

    if -1.7e18 < y < -1.05e-178

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

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

    if -1.05e-178 < y < 2.1e7

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 75.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+43} \lor \neg \left(z \leq 3 \cdot 10^{+66}\right):\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) - t \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7500000000000001e43 or 3.00000000000000002e66 < z

    1. Initial program 87.5%

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

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

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

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

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

    if -1.7500000000000001e43 < z < 3.00000000000000002e66

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

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

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

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

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

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

Alternative 17: 49.6% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.65 \cdot 10^{+50}:\\
\;\;\;\;x - t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.99999999999999956e30 or 1.65e50 < y

    1. Initial program 87.8%

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

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

    if -5.99999999999999956e30 < y < 2.20000000000000007e-218

    1. Initial program 98.9%

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

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

    if 2.20000000000000007e-218 < y < 1.65e50

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{t \cdot a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 18: 34.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq -4.6 \cdot 10^{+35}:\\
\;\;\;\;-y \cdot z\\

\mathbf{elif}\;y \leq 3.7 \cdot 10^{+104}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.4999999999999999e260 or 3.6999999999999998e104 < y

    1. Initial program 84.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 z around 0 65.0%

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

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

    if -1.4999999999999999e260 < y < -4.5999999999999996e35

    1. Initial program 88.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 54.2%

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

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

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

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

    if -4.5999999999999996e35 < y < 3.6999999999999998e104

    1. Initial program 98.1%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a} \]
    7. Simplified38.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+260}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{+35}:\\ \;\;\;\;-y \cdot z\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+104}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 25.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 1.1 \cdot 10^{-233}:\\
\;\;\;\;a\\

\mathbf{elif}\;y \leq 220000000000:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.1999999999999998e29 or 2.2e11 < y

    1. Initial program 88.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 64.7%

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

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

    if -6.1999999999999998e29 < y < 1.1e-233

    1. Initial program 98.8%

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

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

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

    if 1.1e-233 < y < 2.2e11

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+29}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-233}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 220000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 58.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+26} \lor \neg \left(y \leq 1.4 \cdot 10^{+104}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.25e26 or 1.4e104 < y

    1. Initial program 86.6%

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

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

    if -1.25e26 < y < 1.4e104

    1. Initial program 98.1%

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

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

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

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

Alternative 21: 19.3% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;z \leq 1.02 \cdot 10^{-182}:\\
\;\;\;\;a\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+183}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.64999999999999999e75 or 2.99999999999999996e183 < z

    1. Initial program 88.6%

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

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

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

    if -1.64999999999999999e75 < z < 1.02e-182

    1. Initial program 98.1%

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

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

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

    if 1.02e-182 < z < 2.99999999999999996e183

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 22: 49.1% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+53} \lor \neg \left(t \leq 2 \cdot 10^{+22}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.4999999999999997e53 or 2e22 < t

    1. Initial program 90.0%

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

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

    if -7.4999999999999997e53 < t < 2e22

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

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

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

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

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

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

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

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

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

Alternative 23: 34.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+33} \lor \neg \left(y \leq 4.8 \cdot 10^{+106}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.4999999999999998e33 or 4.8000000000000001e106 < y

    1. Initial program 86.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 z around 0 59.1%

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

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

    if -8.4999999999999998e33 < y < 4.8000000000000001e106

    1. Initial program 98.1%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a} \]
    7. Simplified38.2%

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

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

Alternative 24: 21.0% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 5.8 \cdot 10^{+50}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.6e124 or 5.8e50 < x

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

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

    if -2.6e124 < x < 5.8e50

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

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

      \[\leadsto \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 25: 11.7% 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 93.7%

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

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

    \[\leadsto \color{blue}{a} \]
  5. Add Preprocessing

Reproduce

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