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

Percentage Accurate: 95.6% → 98.2%
Time: 18.0s
Alternatives: 23
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 23 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.6% 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: 98.2% 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 61.3%

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

    \[\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.9% 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 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. Step-by-step derivation
    1. +-commutative94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;b \leq -3.3 \cdot 10^{-105}:\\
\;\;\;\;\left(x + a\right) - t\_2\\

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

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


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

    1. Initial program 87.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 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-a \cdot \left(t + -1\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      4. distribute-rgt-neg-in81.6%

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

        \[\leadsto a \cdot \left(-\color{blue}{\left(-1 + t\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      6. distribute-neg-in81.6%

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

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

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

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

    if -1.6e18 < b < -3.2999999999999999e-105

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

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

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

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

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

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

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

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

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

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

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

    if -3.2999999999999999e-105 < b < 1.10000000000000005e113

    1. Initial program 99.2%

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

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

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

    if 1.10000000000000005e113 < b

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \left(-\left(-1 + y\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      6. distribute-neg-in80.1%

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

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

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

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

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

Alternative 4: 48.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -8.2 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 5.9 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.15000000000000008e165 or 5.8999999999999998e50 < t

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

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

    if -1.15000000000000008e165 < t < -8.19999999999999974e-25 or 7.99999999999999947e-88 < t < 5.8999999999999998e50

    1. Initial program 95.0%

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

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

    if -8.19999999999999974e-25 < t < 7.99999999999999947e-88

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

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

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

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

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

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

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

Alternative 5: 39.8% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;b \leq 2.2 \cdot 10^{+94}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.25000000000000009e245 or 2.20000000000000012e94 < b

    1. Initial program 83.6%

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

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

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

    if -1.25000000000000009e245 < b < -1.14999999999999998e50

    1. Initial program 89.5%

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

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

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

    if -1.14999999999999998e50 < b < 1.1e20

    1. Initial program 99.3%

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

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

    if 1.1e20 < b < 2.20000000000000012e94

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

Alternative 6: 87.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -31000000 \lor \neg \left(b \leq 68000000000\right):\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x - \left(a \cdot \left(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 -31000000.0) (not (<= b 68000000000.0)))
   (+ (+ x (* b (- (+ y t) 2.0))) (* a (- 1.0 t)))
   (- 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 <= -31000000.0) || !(b <= 68000000000.0)) {
		tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
	} 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 <= (-31000000.0d0)) .or. (.not. (b <= 68000000000.0d0))) then
        tmp = (x + (b * ((y + t) - 2.0d0))) + (a * (1.0d0 - t))
    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 <= -31000000.0) || !(b <= 68000000000.0)) {
		tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
	} 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 <= -31000000.0) or not (b <= 68000000000.0):
		tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t))
	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 <= -31000000.0) || !(b <= 68000000000.0))
		tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + Float64(a * Float64(1.0 - t)));
	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 <= -31000000.0) || ~((b <= 68000000000.0)))
		tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
	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, -31000000.0], N[Not[LessEqual[b, 68000000000.0]], $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], 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 -31000000 \lor \neg \left(b \leq 68000000000\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.1e7 or 6.8e10 < b

    1. Initial program 88.6%

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

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

    if -3.1e7 < b < 6.8e10

    1. Initial program 99.2%

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

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

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

Alternative 7: 86.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -160:\\ \;\;\;\;t\_1 + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-77}:\\ \;\;\;\;x - \left(a \cdot \left(t + -1\right) + z \cdot \left(y + -1\right)\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 (<= b -160.0)
     (+ t_1 (* a (- 1.0 t)))
     (if (<= b 2.9e-77)
       (- x (+ (* a (+ t -1.0)) (* z (+ y -1.0))))
       (+ 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 (b <= -160.0) {
		tmp = t_1 + (a * (1.0 - t));
	} else if (b <= 2.9e-77) {
		tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
	} 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 (b <= (-160.0d0)) then
        tmp = t_1 + (a * (1.0d0 - t))
    else if (b <= 2.9d-77) then
        tmp = x - ((a * (t + (-1.0d0))) + (z * (y + (-1.0d0))))
    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 (b <= -160.0) {
		tmp = t_1 + (a * (1.0 - t));
	} else if (b <= 2.9e-77) {
		tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
	} 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 b <= -160.0:
		tmp = t_1 + (a * (1.0 - t))
	elif b <= 2.9e-77:
		tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)))
	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 (b <= -160.0)
		tmp = Float64(t_1 + Float64(a * Float64(1.0 - t)));
	elseif (b <= 2.9e-77)
		tmp = Float64(x - Float64(Float64(a * Float64(t + -1.0)) + Float64(z * Float64(y + -1.0))));
	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 (b <= -160.0)
		tmp = t_1 + (a * (1.0 - t));
	elseif (b <= 2.9e-77)
		tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
	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[b, -160.0], N[(t$95$1 + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.9e-77], N[(x - N[(N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y + -1.0), $MachinePrecision]), $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}\;b \leq -160:\\
\;\;\;\;t\_1 + a \cdot \left(1 - t\right)\\

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

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


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

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

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

    if -160 < b < 2.8999999999999999e-77

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

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

    if 2.8999999999999999e-77 < b

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -160:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-77}:\\ \;\;\;\;x - \left(a \cdot \left(t + -1\right) + z \cdot \left(y + -1\right)\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 8: 63.6% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.05e18 or 3.9999999999999997e-77 < b

    1. Initial program 89.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 z around -inf 76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.05e18 < b < -5.5000000000000004e-87

    1. Initial program 96.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \left(a + z\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv76.7%

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

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

        \[\leadsto x + 1 \cdot \color{blue}{\left(z + a\right)} \]
      4. *-lft-identity76.7%

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

        \[\leadsto x + \color{blue}{\left(a + z\right)} \]
    9. Simplified76.7%

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

    if -5.5000000000000004e-87 < b < 3.9999999999999997e-77

    1. Initial program 100.0%

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

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

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

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

Alternative 9: 26.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -380:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-108}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-114}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+88}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -380.0)
   (* y b)
   (if (<= y -4.6e-108)
     z
     (if (<= y 1.9e-114) x (if (<= y 1.15e+88) (* t b) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -380.0) {
		tmp = y * b;
	} else if (y <= -4.6e-108) {
		tmp = z;
	} else if (y <= 1.9e-114) {
		tmp = x;
	} else if (y <= 1.15e+88) {
		tmp = t * b;
	} 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 <= (-380.0d0)) then
        tmp = y * b
    else if (y <= (-4.6d-108)) then
        tmp = z
    else if (y <= 1.9d-114) then
        tmp = x
    else if (y <= 1.15d+88) then
        tmp = t * b
    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 <= -380.0) {
		tmp = y * b;
	} else if (y <= -4.6e-108) {
		tmp = z;
	} else if (y <= 1.9e-114) {
		tmp = x;
	} else if (y <= 1.15e+88) {
		tmp = t * b;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -380.0:
		tmp = y * b
	elif y <= -4.6e-108:
		tmp = z
	elif y <= 1.9e-114:
		tmp = x
	elif y <= 1.15e+88:
		tmp = t * b
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -380.0)
		tmp = Float64(y * b);
	elseif (y <= -4.6e-108)
		tmp = z;
	elseif (y <= 1.9e-114)
		tmp = x;
	elseif (y <= 1.15e+88)
		tmp = Float64(t * b);
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -380.0)
		tmp = y * b;
	elseif (y <= -4.6e-108)
		tmp = z;
	elseif (y <= 1.9e-114)
		tmp = x;
	elseif (y <= 1.15e+88)
		tmp = t * b;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -380.0], N[(y * b), $MachinePrecision], If[LessEqual[y, -4.6e-108], z, If[LessEqual[y, 1.9e-114], x, If[LessEqual[y, 1.15e+88], N[(t * b), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 1.9 \cdot 10^{-114}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+88}:\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -380 or 1.1500000000000001e88 < y

    1. Initial program 90.8%

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

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

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

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

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

    if -380 < y < -4.59999999999999992e-108

    1. Initial program 95.7%

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

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

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

    if -4.59999999999999992e-108 < y < 1.8999999999999999e-114

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

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

    if 1.8999999999999999e-114 < y < 1.1500000000000001e88

    1. Initial program 93.5%

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

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

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

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified33.9%

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

Alternative 10: 83.0% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 87.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 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-a \cdot \left(t + -1\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      4. distribute-rgt-neg-in81.6%

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

        \[\leadsto a \cdot \left(-\color{blue}{\left(-1 + t\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      6. distribute-neg-in81.6%

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

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

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

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

    if -9.2e18 < b < 3.30000000000000023e170

    1. Initial program 97.6%

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

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

    if 3.30000000000000023e170 < b

    1. Initial program 87.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 73.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-z\right) \cdot \left(\left(-\frac{x - a \cdot \left(t + -1\right)}{z}\right) + \left(-\color{blue}{\left(-\left(y + -1\right)\right)}\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      10. remove-double-neg73.3%

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

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

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

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

Alternative 11: 72.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq 3.4 \cdot 10^{-77}:\\
\;\;\;\;\left(x + a\right) - t\_2\\

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


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

    1. Initial program 87.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 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-a \cdot \left(t + -1\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      4. distribute-rgt-neg-in81.6%

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

        \[\leadsto a \cdot \left(-\color{blue}{\left(-1 + t\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      6. distribute-neg-in81.6%

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

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

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

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

    if -5.2e16 < b < 3.39999999999999983e-77

    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 b around 0 96.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 0 76.4%

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

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

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

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

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

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

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

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

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

    if 3.39999999999999983e-77 < b

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-z \cdot \left(-1 + y\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      5. distribute-rgt-neg-in71.8%

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

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

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

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

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

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

Alternative 12: 61.5% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.7999999999999998e49 or 2.19999999999999992e92 < b

    1. Initial program 85.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 74.5%

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

    if -2.7999999999999998e49 < b < -1.05e-89

    1. Initial program 96.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \left(a + z\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv70.7%

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

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

        \[\leadsto x + 1 \cdot \color{blue}{\left(z + a\right)} \]
      4. *-lft-identity70.7%

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

        \[\leadsto x + \color{blue}{\left(a + z\right)} \]
    9. Simplified70.7%

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

    if -1.05e-89 < b < 2.19999999999999992e92

    1. Initial program 100.0%

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

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

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

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

Alternative 13: 56.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -5.8 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-110}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;y \leq 3700000000:\\ \;\;\;\;z + b \cdot \left(t - 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.8e+85)
     t_1
     (if (<= y 6.5e-110)
       (+ x (+ z a))
       (if (<= y 3700000000.0) (+ z (* b (- 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.8e+85) {
		tmp = t_1;
	} else if (y <= 6.5e-110) {
		tmp = x + (z + a);
	} else if (y <= 3700000000.0) {
		tmp = z + (b * (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.8d+85)) then
        tmp = t_1
    else if (y <= 6.5d-110) then
        tmp = x + (z + a)
    else if (y <= 3700000000.0d0) then
        tmp = z + (b * (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.8e+85) {
		tmp = t_1;
	} else if (y <= 6.5e-110) {
		tmp = x + (z + a);
	} else if (y <= 3700000000.0) {
		tmp = z + (b * (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.8e+85:
		tmp = t_1
	elif y <= 6.5e-110:
		tmp = x + (z + a)
	elif y <= 3700000000.0:
		tmp = z + (b * (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.8e+85)
		tmp = t_1;
	elseif (y <= 6.5e-110)
		tmp = Float64(x + Float64(z + a));
	elseif (y <= 3700000000.0)
		tmp = Float64(z + Float64(b * Float64(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.8e+85)
		tmp = t_1;
	elseif (y <= 6.5e-110)
		tmp = x + (z + a);
	elseif (y <= 3700000000.0)
		tmp = z + (b * (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.8e+85], t$95$1, If[LessEqual[y, 6.5e-110], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3700000000.0], N[(z + N[(b * N[(t - 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 -5.8 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.79999999999999995e85 or 3.7e9 < y

    1. Initial program 89.4%

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

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

    if -5.79999999999999995e85 < y < 6.4999999999999996e-110

    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 t around 0 71.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \left(a + z\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv59.0%

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

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

        \[\leadsto x + 1 \cdot \color{blue}{\left(z + a\right)} \]
      4. *-lft-identity59.0%

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

        \[\leadsto x + \color{blue}{\left(a + z\right)} \]
    9. Simplified59.0%

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

    if 6.4999999999999996e-110 < y < 3.7e9

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-z \cdot \left(-1 + y\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      5. distribute-rgt-neg-in69.0%

        \[\leadsto \color{blue}{z \cdot \left(-\left(-1 + y\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      6. distribute-neg-in69.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+85}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-110}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;y \leq 3700000000:\\ \;\;\;\;z + b \cdot \left(t - 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 72.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+49} \lor \neg \left(b \leq 14000000000\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.29999999999999994e49 or 1.4e10 < b

    1. Initial program 87.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 -inf 72.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-z\right) \cdot \left(\left(-\frac{x - a \cdot \left(t + -1\right)}{z}\right) + \left(-\color{blue}{\left(-\left(y + -1\right)\right)}\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      10. remove-double-neg72.6%

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

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

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

    if -1.29999999999999994e49 < b < 1.4e10

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 72.7% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq 106000000000:\\
\;\;\;\;\left(x + a\right) - z \cdot \left(y + -1\right)\\

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


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

    1. Initial program 87.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 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-a \cdot \left(t + -1\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      4. distribute-rgt-neg-in81.6%

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

        \[\leadsto a \cdot \left(-\color{blue}{\left(-1 + t\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      6. distribute-neg-in81.6%

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

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

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

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

    if -4e16 < b < 1.06e11

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.06e11 < b

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 36.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -1.95 \cdot 10^{+24}:\\
\;\;\;\;t \cdot \left(-a\right)\\

\mathbf{elif}\;t \leq 6400000000000:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.7999999999999999e258 or 6.4e12 < t

    1. Initial program 84.3%

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

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

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

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

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

    if -4.7999999999999999e258 < t < -1.9499999999999999e24

    1. Initial program 96.2%

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

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

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

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

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

    if -1.9499999999999999e24 < t < 6.4e12

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

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

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

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

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

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

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

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

Alternative 17: 33.9% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq -4.8 \cdot 10^{+49}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;b \leq 4 \cdot 10^{+95}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.00000000000000009e245 or 4.00000000000000008e95 < b

    1. Initial program 83.6%

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

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

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

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified43.3%

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

    if -2.00000000000000009e245 < b < -4.8e49

    1. Initial program 89.5%

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

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

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

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

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

    if -4.8e49 < b < 4.00000000000000008e95

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

Alternative 18: 56.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+51} \lor \neg \left(b \leq 3.6 \cdot 10^{+103}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\

\mathbf{else}:\\
\;\;\;\;x + \left(z + a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7e51 or 3.60000000000000017e103 < b

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

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

    if -7e51 < b < 3.60000000000000017e103

    1. Initial program 98.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \left(a + z\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv51.7%

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

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

        \[\leadsto x + 1 \cdot \color{blue}{\left(z + a\right)} \]
      4. *-lft-identity51.7%

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

        \[\leadsto x + \color{blue}{\left(a + z\right)} \]
    9. Simplified51.7%

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

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

Alternative 19: 56.6% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+35} \lor \neg \left(t \leq 900000000000\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{else}:\\
\;\;\;\;x + \left(z + a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.49999999999999995e35 or 9e11 < t

    1. Initial program 89.0%

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

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

    if -1.49999999999999995e35 < t < 9e11

    1. Initial program 98.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \left(a + z\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv58.7%

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

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

        \[\leadsto x + 1 \cdot \color{blue}{\left(z + a\right)} \]
      4. *-lft-identity58.7%

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

        \[\leadsto x + \color{blue}{\left(a + z\right)} \]
    9. Simplified58.7%

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

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

Alternative 20: 50.3% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+24} \lor \neg \left(t \leq 1700000000000\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 < -1.2e24 or 1.7e12 < t

    1. Initial program 89.4%

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

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

    if -1.2e24 < t < 1.7e12

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

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

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

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

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

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

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

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

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

Alternative 21: 26.2% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.06 \cdot 10^{+67} \lor \neg \left(t \leq 0.056\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.0599999999999999e67 or 0.0560000000000000012 < t

    1. Initial program 89.7%

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

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

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

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

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

    if -1.0599999999999999e67 < t < 0.0560000000000000012

    1. Initial program 97.8%

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

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

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

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

Alternative 22: 21.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{+106}:\\
\;\;\;\;a\\

\mathbf{elif}\;a \leq 1.16 \cdot 10^{+96}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.60000000000000015e106 or 1.16000000000000005e96 < a

    1. Initial program 93.0%

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

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

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

    if -6.60000000000000015e106 < a < 1.16000000000000005e96

    1. Initial program 94.7%

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

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

Alternative 23: 11.3% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 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 t around 0 71.7%

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

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

Reproduce

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