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

Percentage Accurate: 94.9% → 98.4%
Time: 16.1s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 94.9% accurate, 1.0× speedup?

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

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

Alternative 1: 98.4% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

      \[\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. mul-1-neg33.3%

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

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

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

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{\left(b - a\right)} + \frac{b \cdot \left(y - 2\right)}{t}\right) \]
      4. associate-/l*88.9%

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

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

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

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

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

Alternative 2: 97.4% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 53.9% accurate, 0.6× speedup?

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

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

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

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

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

\mathbf{elif}\;b \leq 5.9 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.20000000000000014e49 or -6.5999999999999997e36 < b < -3.19999999999999982e-19 or 2.99999999999999997e26 < b

    1. Initial program 93.1%

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

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

    if -3.20000000000000014e49 < b < -6.5999999999999997e36 or 2.65000000000000001e-187 < b < 5.9000000000000002e-24

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

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

    if -3.19999999999999982e-19 < b < 2.65000000000000001e-187

    1. Initial program 98.8%

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

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

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

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

    if 5.9000000000000002e-24 < b < 2.99999999999999997e26

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{+49}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{+36}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -3.2 \cdot 10^{-19}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 2.65 \cdot 10^{-187}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 5.9 \cdot 10^{-24}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+26}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.0% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;b \leq -2.5 \cdot 10^{-15}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 1.76 \cdot 10^{-190}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 1.1 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{+28}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.24999999999999991e49 or -7.80000000000000042e36 < b < -2.5e-15 or 2.6000000000000002e28 < b

    1. Initial program 93.1%

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

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

    if -2.24999999999999991e49 < b < -7.80000000000000042e36 or 1.75999999999999998e-190 < b < 1.10000000000000001e-24

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

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

    if -2.5e-15 < b < 1.75999999999999998e-190 or 1.10000000000000001e-24 < b < 2.6000000000000002e28

    1. Initial program 99.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 0 69.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.25 \cdot 10^{+49}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -7.8 \cdot 10^{+36}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-15}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 1.76 \cdot 10^{-190}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{-24}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{+28}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 48.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -1.06 \cdot 10^{+48}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-33}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-260}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-218}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-102}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+124}:\\ \;\;\;\;x - y \cdot z\\ \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 -1.06e+48)
     t_1
     (if (<= t -5e-33)
       (+ x z)
       (if (<= t -8e-260)
         (* y (- b z))
         (if (<= t 9e-218)
           (+ x z)
           (if (<= t 1.3e-102)
             (* b (- y 2.0))
             (if (<= t 2.8e+124) (- x (* 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 <= -1.06e+48) {
		tmp = t_1;
	} else if (t <= -5e-33) {
		tmp = x + z;
	} else if (t <= -8e-260) {
		tmp = y * (b - z);
	} else if (t <= 9e-218) {
		tmp = x + z;
	} else if (t <= 1.3e-102) {
		tmp = b * (y - 2.0);
	} else if (t <= 2.8e+124) {
		tmp = x - (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 <= (-1.06d+48)) then
        tmp = t_1
    else if (t <= (-5d-33)) then
        tmp = x + z
    else if (t <= (-8d-260)) then
        tmp = y * (b - z)
    else if (t <= 9d-218) then
        tmp = x + z
    else if (t <= 1.3d-102) then
        tmp = b * (y - 2.0d0)
    else if (t <= 2.8d+124) then
        tmp = x - (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 <= -1.06e+48) {
		tmp = t_1;
	} else if (t <= -5e-33) {
		tmp = x + z;
	} else if (t <= -8e-260) {
		tmp = y * (b - z);
	} else if (t <= 9e-218) {
		tmp = x + z;
	} else if (t <= 1.3e-102) {
		tmp = b * (y - 2.0);
	} else if (t <= 2.8e+124) {
		tmp = x - (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 <= -1.06e+48:
		tmp = t_1
	elif t <= -5e-33:
		tmp = x + z
	elif t <= -8e-260:
		tmp = y * (b - z)
	elif t <= 9e-218:
		tmp = x + z
	elif t <= 1.3e-102:
		tmp = b * (y - 2.0)
	elif t <= 2.8e+124:
		tmp = x - (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 <= -1.06e+48)
		tmp = t_1;
	elseif (t <= -5e-33)
		tmp = Float64(x + z);
	elseif (t <= -8e-260)
		tmp = Float64(y * Float64(b - z));
	elseif (t <= 9e-218)
		tmp = Float64(x + z);
	elseif (t <= 1.3e-102)
		tmp = Float64(b * Float64(y - 2.0));
	elseif (t <= 2.8e+124)
		tmp = Float64(x - Float64(y * 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 <= -1.06e+48)
		tmp = t_1;
	elseif (t <= -5e-33)
		tmp = x + z;
	elseif (t <= -8e-260)
		tmp = y * (b - z);
	elseif (t <= 9e-218)
		tmp = x + z;
	elseif (t <= 1.3e-102)
		tmp = b * (y - 2.0);
	elseif (t <= 2.8e+124)
		tmp = x - (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, -1.06e+48], t$95$1, If[LessEqual[t, -5e-33], N[(x + z), $MachinePrecision], If[LessEqual[t, -8e-260], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e-218], N[(x + z), $MachinePrecision], If[LessEqual[t, 1.3e-102], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+124], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -5 \cdot 10^{-33}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;t \leq -8 \cdot 10^{-260}:\\
\;\;\;\;y \cdot \left(b - z\right)\\

\mathbf{elif}\;t \leq 9 \cdot 10^{-218}:\\
\;\;\;\;x + z\\

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+124}:\\
\;\;\;\;x - y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.06e48 or 2.8e124 < t

    1. Initial program 92.8%

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

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

    if -1.06e48 < t < -5.00000000000000028e-33 or -7.99999999999999969e-260 < t < 8.99999999999999953e-218

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

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

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

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

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

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

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

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

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

    if -5.00000000000000028e-33 < t < -7.99999999999999969e-260

    1. Initial program 95.6%

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

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

    if 8.99999999999999953e-218 < t < 1.29999999999999993e-102

    1. Initial program 100.0%

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

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

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

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

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

    if 1.29999999999999993e-102 < t < 2.8e124

    1. Initial program 99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.06 \cdot 10^{+48}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-33}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-260}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-218}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-102}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+124}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 46.9% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-216}:\\
\;\;\;\;x + z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.5000000000000008e47 or 1.3e38 < t

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

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

    if -8.5000000000000008e47 < t < -5.8000000000000001e-31 or -4.3999999999999999e-274 < t < 1.25000000000000005e-216

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

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

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

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

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

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

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

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

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

    if -5.8000000000000001e-31 < t < -4.3999999999999999e-274 or 1.25000000000000005e-216 < t < 1.3e38

    1. Initial program 98.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{+47}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-31}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-274}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-216}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+38}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 51.4% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-269}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;y \leq 3.9 \cdot 10^{-283}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.85 \cdot 10^{+23}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.5e31 or 1.85000000000000006e23 < y

    1. Initial program 92.6%

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

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

    if -7.5e31 < y < -5e-186 or -1.9000000000000001e-269 < y < 3.9000000000000002e-283

    1. Initial program 100.0%

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

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

    if -5e-186 < y < -1.9000000000000001e-269 or 3.9000000000000002e-283 < y < 1.85000000000000006e23

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+31}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-186}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-269}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{-283}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+23}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 63.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq 7.2 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.4000000000000002e-14 or 5e14 < b

    1. Initial program 93.5%

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

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

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

    if -4.4000000000000002e-14 < b < 7.19999999999999989e-187 or 4.49999999999999968e-21 < b < 5e14

    1. Initial program 99.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 0 69.1%

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

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

    if 7.19999999999999989e-187 < b < 4.49999999999999968e-21

    1. Initial program 99.9%

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

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

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

Alternative 9: 65.8% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.3e74 or 1.78000000000000005e25 < y

    1. Initial program 91.9%

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

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

    if -1.3e74 < y < -2.8e-51

    1. Initial program 99.9%

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

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

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

    if -2.8e-51 < y < -5.40000000000000036e-74

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

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

    if -5.40000000000000036e-74 < y < 1.78000000000000005e25

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(b \cdot \left(t + -2\right) + \left(-\left(-z\right)\right)\right)} \]
      2. add-sqr-sqrt28.3%

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

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)\right) \]
      4. sqr-neg51.9%

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

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

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \left(-\color{blue}{z}\right)\right) \]
      7. add-sqr-sqrt20.9%

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

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \]
      9. sqr-neg52.8%

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \sqrt{\color{blue}{z \cdot z}}\right) \]
      10. sqrt-unprod43.5%

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}\right) \]
      11. add-sqr-sqrt71.9%

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \color{blue}{z}\right) \]
    8. Applied egg-rr71.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+74}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-51}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-74}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 1.78 \cdot 10^{+25}:\\ \;\;\;\;x + \left(z + \left(t + -2\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 55.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -2.8 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.5e9 or 9.5000000000000001e24 < y

    1. Initial program 92.9%

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

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

    if -4.5e9 < y < -2.8e-51 or -2.00000000000000008e-156 < y < 9.5000000000000001e24

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

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

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

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

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

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

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

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

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

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

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

    if -2.8e-51 < y < -2.00000000000000008e-156

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

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

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

Alternative 11: 40.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -6.5 \cdot 10^{-153}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;a \leq -9.5 \cdot 10^{-170}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{+25}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.50000000000000002e-51 or 3.60000000000000015e25 < a

    1. Initial program 94.4%

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

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

    if -2.50000000000000002e-51 < a < -6.50000000000000032e-153 or -9.5000000000000001e-170 < a < 3.60000000000000015e25

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

    if -6.50000000000000032e-153 < a < -9.5000000000000001e-170

    1. Initial program 83.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{-51}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-153}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-170}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+25}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 40.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -1.8 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq -2.4 \cdot 10^{-279}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+25}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.8e-51 or 3.1999999999999999e25 < a

    1. Initial program 94.4%

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

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

    if -1.8e-51 < a < -2.35000000000000007e-225 or -2.3999999999999999e-279 < a < 3.1999999999999999e25

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

    if -2.35000000000000007e-225 < a < -2.3999999999999999e-279

    1. Initial program 100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-51}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -2.35 \cdot 10^{-225}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-279}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+25}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 86.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.1e-17 or 2e11 < b

    1. Initial program 93.5%

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

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

    if -1.1e-17 < b < 2e11

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 67.0% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.20000000000000043e74 or 5.9999999999999999e24 < y

    1. Initial program 91.9%

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

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

    if -6.20000000000000043e74 < y < -5.1e7

    1. Initial program 99.9%

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

      \[\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. mul-1-neg80.7%

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

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

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

    if -5.1e7 < y < 5.9999999999999999e24

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(b \cdot \left(t + -2\right) + \left(-\left(-z\right)\right)\right)} \]
      2. add-sqr-sqrt28.8%

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

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)\right) \]
      4. sqr-neg51.9%

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

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)\right) \]
      6. add-sqr-sqrt56.2%

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \left(-\color{blue}{z}\right)\right) \]
      7. add-sqr-sqrt22.2%

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

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \]
      9. sqr-neg54.1%

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \sqrt{\color{blue}{z \cdot z}}\right) \]
      10. sqrt-unprod41.5%

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \color{blue}{\sqrt{z} \cdot \sqrt{z}}\right) \]
      11. add-sqr-sqrt70.4%

        \[\leadsto x + \left(b \cdot \left(t + -2\right) + \color{blue}{z}\right) \]
    8. Applied egg-rr70.4%

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

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

Alternative 15: 34.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -1.25 \cdot 10^{-269}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{-283}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 1.02 \cdot 10^{+25}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.6e7 or 1.0199999999999999e25 < y

    1. Initial program 92.9%

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

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

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

    if -4.6e7 < y < -1.24999999999999995e-269 or 7.8000000000000004e-283 < y < 1.0199999999999999e25

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

    if -1.24999999999999995e-269 < y < 7.8000000000000004e-283

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -46000000:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.25 \cdot 10^{-269}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-283}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+25}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 83.8% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.0000000000000004e49 or 1.1e57 < b

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

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

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

    if -5.0000000000000004e49 < b < 1.1e57

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 27.1% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.32e10 or 1.25999999999999995e26 < y

    1. Initial program 92.8%

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

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

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

    if -1.32e10 < y < 1.25999999999999995e26

    1. Initial program 99.3%

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

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

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

Alternative 18: 18.1% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x \leq 7.8 \cdot 10^{+101}:\\
\;\;\;\;-2 \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.14999999999999997e111 or 7.8e101 < x

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

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

    if -2.14999999999999997e111 < x < 7.8e101

    1. Initial program 94.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot -2} \]
    9. Simplified11.5%

      \[\leadsto \color{blue}{b \cdot -2} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification23.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.15 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{+101}:\\ \;\;\;\;-2 \cdot b\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 22.3% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x \leq 1.8 \cdot 10^{-142}:\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.5000000000000001e154 or 1.8e-142 < x

    1. Initial program 99.2%

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

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

    if -9.5000000000000001e154 < x < 1.8e-142

    1. Initial program 93.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+154}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-142}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 15.8% accurate, 21.0× speedup?

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

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

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification19.2%

    \[\leadsto x \]
  5. Add Preprocessing

Reproduce

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