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

Percentage Accurate: 95.0% → 97.8%
Time: 11.3s
Alternatives: 21
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 21 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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #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
    3. Taylor expanded in y around 0 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.4% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.5e7 or 4.8000000000000002e99 < b

    1. Initial program 87.3%

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

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

    if -2.5e7 < b < 7e-109

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

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

    if 7e-109 < b < 4.8000000000000002e99

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x - z \cdot y\right) + \left(\color{blue}{z} + \left(-\left(t + -1\right) \cdot a\right)\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      11. distribute-lft-neg-in97.7%

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

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

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

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

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

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

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

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

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

Alternative 3: 81.8% accurate, 0.7× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 - t \cdot a\\


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

    1. Initial program 79.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 86.5%

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

    if -9.50000000000000069e68 < b < 3.5e-109

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x - z \cdot y\right) + \left(\color{blue}{z} + \left(-\left(t + -1\right) \cdot a\right)\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      11. distribute-lft-neg-in99.2%

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

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

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

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

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

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

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

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

    if 3.5e-109 < b < 1.7e102

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x - z \cdot y\right) + \left(\color{blue}{z} + \left(-\left(t + -1\right) \cdot a\right)\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      11. distribute-lft-neg-in97.8%

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

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

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

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

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

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

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

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

    if 1.7e102 < b

    1. Initial program 92.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 85.1%

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

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

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

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

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

Alternative 4: 32.8% accurate, 0.7× speedup?

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

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

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

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

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

\mathbf{elif}\;y \leq 1.6 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.0999999999999999e215 or 1.6e134 < y

    1. Initial program 81.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 inf 64.4%

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

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

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

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

    if -3.0999999999999999e215 < y < -1.55999999999999996e118 or 9.5e10 < y < 1.6e134

    1. Initial program 93.9%

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

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

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

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

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

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

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

    if -1.55999999999999996e118 < y < 8.49999999999999981e-117

    1. Initial program 98.4%

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

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

    if 8.49999999999999981e-117 < y < 9.5e10

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{+215}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.56 \cdot 10^{+118}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-117}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 95000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+134}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 27.8% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.65 \cdot 10^{-102}:\\
\;\;\;\;t \cdot b\\

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

\mathbf{elif}\;y \leq 1.66 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.2e214 or 1.65999999999999991e134 < y

    1. Initial program 81.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 inf 64.4%

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

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

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

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

    if -1.2e214 < y < -1.60000000000000001e42 or 4.1e7 < y < 1.65999999999999991e134

    1. Initial program 95.5%

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

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

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

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

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

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

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

    if -1.60000000000000001e42 < y < 1.65e-102

    1. Initial program 98.2%

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

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

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

    if 1.65e-102 < y < 4.1e7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+214}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{+42}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-102}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 41000000:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.66 \cdot 10^{+134}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 80.1% accurate, 0.7× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 - t \cdot a\\


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

    1. Initial program 79.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 86.5%

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

    if -8.1999999999999998e68 < b < 7e-109

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x - z \cdot y\right) + \left(\color{blue}{z} + \left(-\left(t + -1\right) \cdot a\right)\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      11. distribute-lft-neg-in99.2%

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

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

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

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

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

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

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

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

    if 7e-109 < b < 9.99999999999999977e101

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x - z \cdot y\right) + \left(\color{blue}{z} + \left(-\left(t + -1\right) \cdot a\right)\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      11. distribute-lft-neg-in97.8%

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

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

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

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

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

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

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

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

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

    if 9.99999999999999977e101 < b

    1. Initial program 92.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 85.1%

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

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

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

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

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

Alternative 7: 80.3% accurate, 0.7× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 - t \cdot a\\


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

    1. Initial program 79.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 86.5%

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

    if -6.99999999999999974e69 < b < 7e-109

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x - z \cdot y\right) + \left(\color{blue}{z} + \left(-\left(t + -1\right) \cdot a\right)\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      11. distribute-lft-neg-in99.2%

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

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

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

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

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

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

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

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

    if 7e-109 < b < 2.6e99

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x - z \cdot y\right) + \left(\color{blue}{z} + \left(-\left(t + -1\right) \cdot a\right)\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      11. distribute-lft-neg-in97.7%

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

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

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

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

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

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

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

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

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

    if 2.6e99 < b

    1. Initial program 92.9%

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

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

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

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

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

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

Alternative 8: 80.3% accurate, 0.7× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 - t \cdot a\\


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

    1. Initial program 79.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 86.5%

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

    if -1.05000000000000004e70 < b < 7e-109

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

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

    if 7e-109 < b < 3.8e99

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x - z \cdot y\right) + \left(\color{blue}{z} + \left(-\left(t + -1\right) \cdot a\right)\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      11. distribute-lft-neg-in97.7%

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

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

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

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

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

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

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

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

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

    if 3.8e99 < b

    1. Initial program 92.9%

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

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

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

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

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

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

Alternative 9: 51.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq -2.35 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 2.1 \cdot 10^{-230}:\\
\;\;\;\;a - t \cdot a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -7.20000000000000018e-5 or 2.9e17 < b

    1. Initial program 89.1%

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

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

    if -7.20000000000000018e-5 < b < -2.34999999999999995e-169 or 2.0999999999999998e-230 < b < 2.9e17

    1. Initial program 98.9%

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

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

    if -2.34999999999999995e-169 < b < 2.0999999999999998e-230

    1. Initial program 100.0%

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

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

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

        \[\leadsto a + \color{blue}{\left(-a \cdot t\right)} \]
      2. distribute-lft-neg-in54.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.2 \cdot 10^{-5}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -2.35 \cdot 10^{-169}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{-230}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{+17}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 44.4% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-137}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.66 \cdot 10^{+37}:\\
\;\;\;\;y \cdot \left(-z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.8e12 or 1.66000000000000004e37 < 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 68.9%

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

    if -4.8e12 < t < -3.4999999999999999e-289

    1. Initial program 95.9%

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

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

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

    if -3.4999999999999999e-289 < t < 8.5000000000000001e-137

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

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

    if 8.5000000000000001e-137 < t < 1.66000000000000004e37

    1. Initial program 100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4800000000000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-289}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-137}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.66 \cdot 10^{+37}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 85.3% accurate, 0.8× speedup?

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

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

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

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


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

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

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

    if -4.3e7 < b < 1.75e-109

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

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

    if 1.75e-109 < b

    1. Initial program 95.3%

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

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

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

Alternative 12: 81.8% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 - t \cdot a\\


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

    1. Initial program 79.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 86.5%

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

    if -1.1e70 < b < 6e17

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

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

    if 6e17 < b

    1. Initial program 94.9%

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

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

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

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

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

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

Alternative 13: 70.0% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 - t \cdot a\\


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

    1. Initial program 79.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 86.5%

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

    if -8.6000000000000002e68 < b < 6.5e17

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5e17 < b

    1. Initial program 94.9%

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

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

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

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

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

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

Alternative 14: 39.0% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.99999999999999997e67 or 4.7e17 < b

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

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

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

    if -1.99999999999999997e67 < b < 2.7000000000000001e-150

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

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

    if 2.7000000000000001e-150 < b < 4.7e17

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

Alternative 15: 69.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+68} \lor \neg \left(b \leq 7.2 \cdot 10^{+17}\right):\\
\;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.3e68 or 7.2e17 < b

    1. Initial program 88.0%

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

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

    if -2.3e68 < b < 7.2e17

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 27.0% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq -3.4 \cdot 10^{-258}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 9.6 \cdot 10^{+39}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.80000000000000012e75

    1. Initial program 88.4%

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

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

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

    if -2.80000000000000012e75 < t < -3.3999999999999998e-258

    1. Initial program 95.1%

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

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

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

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

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

    if -3.3999999999999998e-258 < t < 9.6000000000000004e39

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

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

    if 9.6000000000000004e39 < t

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

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

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

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

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

Alternative 17: 26.9% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -4.8 \cdot 10^{-259}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+39}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.4e75 or 1.15000000000000006e39 < t

    1. Initial program 89.1%

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

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

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

    if -2.4e75 < t < -4.8000000000000001e-259

    1. Initial program 95.1%

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

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

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

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

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

    if -4.8000000000000001e-259 < t < 1.15000000000000006e39

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

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

Alternative 18: 50.5% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+100} \lor \neg \left(t \leq 4.5 \cdot 10^{+38}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0999999999999999e100 or 4.4999999999999998e38 < t

    1. Initial program 88.4%

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

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

    if -2.0999999999999999e100 < t < 4.4999999999999998e38

    1. Initial program 97.5%

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

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

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

Alternative 19: 25.6% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.42 \cdot 10^{+62} \lor \neg \left(b \leq 1.32 \cdot 10^{+123}\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.42e62 or 1.32e123 < b

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

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

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

    if -1.42e62 < b < 1.32e123

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

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

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

Alternative 20: 20.7% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 2.25 \cdot 10^{-26}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.7000000000000001e130 or 2.2499999999999999e-26 < x

    1. Initial program 94.5%

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

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

    if -3.7000000000000001e130 < x < 2.2499999999999999e-26

    1. Initial program 93.9%

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

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

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

Alternative 21: 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 a around inf 26.6%

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

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

Reproduce

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