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

Percentage Accurate: 95.3% → 98.0%
Time: 16.8s
Alternatives: 26
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 26 alternatives:

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

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

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right) \leq \infty:\\ \;\;\;\;\left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\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 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := y \cdot \left(-z\right)\\ \mathbf{if}\;y \leq -6 \cdot 10^{+140}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{+94}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{+26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-136}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+20}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+128}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 10^{+212}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))) (t_2 (* y (- z))))
   (if (<= y -6e+140)
     t_2
     (if (<= y -9.2e+94)
       (* y b)
       (if (<= y -3.9e+26)
         t_2
         (if (<= y -2e-20)
           t_1
           (if (<= y 9.5e-136)
             (+ x z)
             (if (<= y 7.8e-83)
               t_1
               (if (<= y 1.85e+20)
                 (+ x z)
                 (if (<= y 1.05e+128)
                   t_2
                   (if (<= y 2.2e+165)
                     t_1
                     (if (<= y 1e+212) t_2 (* y b)))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = y * -z;
	double tmp;
	if (y <= -6e+140) {
		tmp = t_2;
	} else if (y <= -9.2e+94) {
		tmp = y * b;
	} else if (y <= -3.9e+26) {
		tmp = t_2;
	} else if (y <= -2e-20) {
		tmp = t_1;
	} else if (y <= 9.5e-136) {
		tmp = x + z;
	} else if (y <= 7.8e-83) {
		tmp = t_1;
	} else if (y <= 1.85e+20) {
		tmp = x + z;
	} else if (y <= 1.05e+128) {
		tmp = t_2;
	} else if (y <= 2.2e+165) {
		tmp = t_1;
	} else if (y <= 1e+212) {
		tmp = t_2;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    t_2 = y * -z
    if (y <= (-6d+140)) then
        tmp = t_2
    else if (y <= (-9.2d+94)) then
        tmp = y * b
    else if (y <= (-3.9d+26)) then
        tmp = t_2
    else if (y <= (-2d-20)) then
        tmp = t_1
    else if (y <= 9.5d-136) then
        tmp = x + z
    else if (y <= 7.8d-83) then
        tmp = t_1
    else if (y <= 1.85d+20) then
        tmp = x + z
    else if (y <= 1.05d+128) then
        tmp = t_2
    else if (y <= 2.2d+165) then
        tmp = t_1
    else if (y <= 1d+212) then
        tmp = t_2
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = y * -z;
	double tmp;
	if (y <= -6e+140) {
		tmp = t_2;
	} else if (y <= -9.2e+94) {
		tmp = y * b;
	} else if (y <= -3.9e+26) {
		tmp = t_2;
	} else if (y <= -2e-20) {
		tmp = t_1;
	} else if (y <= 9.5e-136) {
		tmp = x + z;
	} else if (y <= 7.8e-83) {
		tmp = t_1;
	} else if (y <= 1.85e+20) {
		tmp = x + z;
	} else if (y <= 1.05e+128) {
		tmp = t_2;
	} else if (y <= 2.2e+165) {
		tmp = t_1;
	} else if (y <= 1e+212) {
		tmp = t_2;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = y * -z
	tmp = 0
	if y <= -6e+140:
		tmp = t_2
	elif y <= -9.2e+94:
		tmp = y * b
	elif y <= -3.9e+26:
		tmp = t_2
	elif y <= -2e-20:
		tmp = t_1
	elif y <= 9.5e-136:
		tmp = x + z
	elif y <= 7.8e-83:
		tmp = t_1
	elif y <= 1.85e+20:
		tmp = x + z
	elif y <= 1.05e+128:
		tmp = t_2
	elif y <= 2.2e+165:
		tmp = t_1
	elif y <= 1e+212:
		tmp = t_2
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	t_2 = Float64(y * Float64(-z))
	tmp = 0.0
	if (y <= -6e+140)
		tmp = t_2;
	elseif (y <= -9.2e+94)
		tmp = Float64(y * b);
	elseif (y <= -3.9e+26)
		tmp = t_2;
	elseif (y <= -2e-20)
		tmp = t_1;
	elseif (y <= 9.5e-136)
		tmp = Float64(x + z);
	elseif (y <= 7.8e-83)
		tmp = t_1;
	elseif (y <= 1.85e+20)
		tmp = Float64(x + z);
	elseif (y <= 1.05e+128)
		tmp = t_2;
	elseif (y <= 2.2e+165)
		tmp = t_1;
	elseif (y <= 1e+212)
		tmp = t_2;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = y * -z;
	tmp = 0.0;
	if (y <= -6e+140)
		tmp = t_2;
	elseif (y <= -9.2e+94)
		tmp = y * b;
	elseif (y <= -3.9e+26)
		tmp = t_2;
	elseif (y <= -2e-20)
		tmp = t_1;
	elseif (y <= 9.5e-136)
		tmp = x + z;
	elseif (y <= 7.8e-83)
		tmp = t_1;
	elseif (y <= 1.85e+20)
		tmp = x + z;
	elseif (y <= 1.05e+128)
		tmp = t_2;
	elseif (y <= 2.2e+165)
		tmp = t_1;
	elseif (y <= 1e+212)
		tmp = t_2;
	else
		tmp = y * b;
	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[(y * (-z)), $MachinePrecision]}, If[LessEqual[y, -6e+140], t$95$2, If[LessEqual[y, -9.2e+94], N[(y * b), $MachinePrecision], If[LessEqual[y, -3.9e+26], t$95$2, If[LessEqual[y, -2e-20], t$95$1, If[LessEqual[y, 9.5e-136], N[(x + z), $MachinePrecision], If[LessEqual[y, 7.8e-83], t$95$1, If[LessEqual[y, 1.85e+20], N[(x + z), $MachinePrecision], If[LessEqual[y, 1.05e+128], t$95$2, If[LessEqual[y, 2.2e+165], t$95$1, If[LessEqual[y, 1e+212], t$95$2, N[(y * b), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -9.2 \cdot 10^{+94}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -3.9 \cdot 10^{+26}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -2 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 7.8 \cdot 10^{-83}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.05 \cdot 10^{+128}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+165}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 10^{+212}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.99999999999999993e140 or -9.1999999999999999e94 < y < -3.9e26 or 1.85e20 < y < 1.05e128 or 2.1999999999999999e165 < y < 9.9999999999999991e211

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative52.2%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in52.2%

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

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

    if -5.99999999999999993e140 < y < -9.1999999999999999e94 or 9.9999999999999991e211 < y

    1. Initial program 90.0%

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

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

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

    if -3.9e26 < y < -1.99999999999999989e-20 or 9.5000000000000007e-136 < y < 7.800000000000001e-83 or 1.05e128 < y < 2.1999999999999999e165

    1. Initial program 94.3%

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

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

    if -1.99999999999999989e-20 < y < 9.5000000000000007e-136 or 7.800000000000001e-83 < y < 1.85e20

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + \color{blue}{z}\right) + \left(-a \cdot \left(t + -1\right)\right) \]
      8. distribute-lft-in65.9%

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

        \[\leadsto \left(x + z\right) + \left(-\left(a \cdot t + \color{blue}{-1 \cdot a}\right)\right) \]
      10. distribute-neg-in65.9%

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

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \left(-\color{blue}{\left(-a\right)}\right)\right) \]
      14. remove-double-neg65.9%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a}\right) \]
      15. *-rgt-identity65.9%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a \cdot 1}\right) \]
      16. distribute-lft-in65.9%

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

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

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

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

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

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative49.5%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified49.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+140}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{+94}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{+26}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-20}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-136}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-83}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+20}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+128}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+165}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 10^{+212}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 38.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(y - 2\right)\\ \mathbf{if}\;b \leq -190000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-291}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{+75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+92}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{+127} \lor \neg \left(b \leq 7.5 \cdot 10^{+177}\right):\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- y 2.0))))
   (if (<= b -190000000.0)
     t_1
     (if (<= b 1.15e-291)
       (* a (- 1.0 t))
       (if (<= b 9.0)
         (+ x z)
         (if (<= b 1.25e+75)
           t_1
           (if (<= b 3e+92)
             (+ x z)
             (if (or (<= b 6.6e+127) (not (<= b 7.5e+177)))
               (* b (- t 2.0))
               t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (y - 2.0);
	double tmp;
	if (b <= -190000000.0) {
		tmp = t_1;
	} else if (b <= 1.15e-291) {
		tmp = a * (1.0 - t);
	} else if (b <= 9.0) {
		tmp = x + z;
	} else if (b <= 1.25e+75) {
		tmp = t_1;
	} else if (b <= 3e+92) {
		tmp = x + z;
	} else if ((b <= 6.6e+127) || !(b <= 7.5e+177)) {
		tmp = b * (t - 2.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * (y - 2.0d0)
    if (b <= (-190000000.0d0)) then
        tmp = t_1
    else if (b <= 1.15d-291) then
        tmp = a * (1.0d0 - t)
    else if (b <= 9.0d0) then
        tmp = x + z
    else if (b <= 1.25d+75) then
        tmp = t_1
    else if (b <= 3d+92) then
        tmp = x + z
    else if ((b <= 6.6d+127) .or. (.not. (b <= 7.5d+177))) then
        tmp = b * (t - 2.0d0)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (y - 2.0);
	double tmp;
	if (b <= -190000000.0) {
		tmp = t_1;
	} else if (b <= 1.15e-291) {
		tmp = a * (1.0 - t);
	} else if (b <= 9.0) {
		tmp = x + z;
	} else if (b <= 1.25e+75) {
		tmp = t_1;
	} else if (b <= 3e+92) {
		tmp = x + z;
	} else if ((b <= 6.6e+127) || !(b <= 7.5e+177)) {
		tmp = b * (t - 2.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (y - 2.0)
	tmp = 0
	if b <= -190000000.0:
		tmp = t_1
	elif b <= 1.15e-291:
		tmp = a * (1.0 - t)
	elif b <= 9.0:
		tmp = x + z
	elif b <= 1.25e+75:
		tmp = t_1
	elif b <= 3e+92:
		tmp = x + z
	elif (b <= 6.6e+127) or not (b <= 7.5e+177):
		tmp = b * (t - 2.0)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(y - 2.0))
	tmp = 0.0
	if (b <= -190000000.0)
		tmp = t_1;
	elseif (b <= 1.15e-291)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (b <= 9.0)
		tmp = Float64(x + z);
	elseif (b <= 1.25e+75)
		tmp = t_1;
	elseif (b <= 3e+92)
		tmp = Float64(x + z);
	elseif ((b <= 6.6e+127) || !(b <= 7.5e+177))
		tmp = Float64(b * Float64(t - 2.0));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (y - 2.0);
	tmp = 0.0;
	if (b <= -190000000.0)
		tmp = t_1;
	elseif (b <= 1.15e-291)
		tmp = a * (1.0 - t);
	elseif (b <= 9.0)
		tmp = x + z;
	elseif (b <= 1.25e+75)
		tmp = t_1;
	elseif (b <= 3e+92)
		tmp = x + z;
	elseif ((b <= 6.6e+127) || ~((b <= 7.5e+177)))
		tmp = b * (t - 2.0);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -190000000.0], t$95$1, If[LessEqual[b, 1.15e-291], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.0], N[(x + z), $MachinePrecision], If[LessEqual[b, 1.25e+75], t$95$1, If[LessEqual[b, 3e+92], N[(x + z), $MachinePrecision], If[Or[LessEqual[b, 6.6e+127], N[Not[LessEqual[b, 7.5e+177]], $MachinePrecision]], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(y - 2\right)\\
\mathbf{if}\;b \leq -190000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 9:\\
\;\;\;\;x + z\\

\mathbf{elif}\;b \leq 1.25 \cdot 10^{+75}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 6.6 \cdot 10^{+127} \lor \neg \left(b \leq 7.5 \cdot 10^{+177}\right):\\
\;\;\;\;b \cdot \left(t - 2\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.9e8 or 9 < b < 1.2500000000000001e75 or 6.59999999999999953e127 < b < 7.50000000000000039e177

    1. Initial program 91.1%

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

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

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

    if -1.9e8 < b < 1.15e-291

    1. Initial program 98.8%

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

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

    if 1.15e-291 < b < 9 or 1.2500000000000001e75 < b < 3.00000000000000013e92

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + z\right) + \left(-\left(a \cdot t + \color{blue}{-1 \cdot a}\right)\right) \]
      10. distribute-neg-in69.5%

        \[\leadsto \left(x + z\right) + \color{blue}{\left(\left(-a \cdot t\right) + \left(--1 \cdot a\right)\right)} \]
      11. distribute-rgt-neg-in69.5%

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \left(-\color{blue}{\left(-a\right)}\right)\right) \]
      14. remove-double-neg69.5%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a}\right) \]
      15. *-rgt-identity69.5%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a \cdot 1}\right) \]
      16. distribute-lft-in69.5%

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

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

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

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

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

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative47.9%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified47.9%

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

    if 3.00000000000000013e92 < b < 6.59999999999999953e127 or 7.50000000000000039e177 < b

    1. Initial program 85.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -190000000:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-291}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{+75}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+92}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{+127} \lor \neg \left(b \leq 7.5 \cdot 10^{+177}\right):\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 36.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(-z\right)\\ \mathbf{if}\;y \leq -6.4 \cdot 10^{+157}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{+90}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.14 \cdot 10^{-14}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+25}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+115} \lor \neg \left(y \leq 1.5 \cdot 10^{+166}\right) \land y \leq 4.5 \cdot 10^{+213}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- z))))
   (if (<= y -6.4e+157)
     t_1
     (if (<= y -4.5e+90)
       (* y b)
       (if (<= y -1.14e-14)
         (* t b)
         (if (<= y 1.5e+25)
           (+ x z)
           (if (or (<= y 3.4e+115) (and (not (<= y 1.5e+166)) (<= y 4.5e+213)))
             t_1
             (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double tmp;
	if (y <= -6.4e+157) {
		tmp = t_1;
	} else if (y <= -4.5e+90) {
		tmp = y * b;
	} else if (y <= -1.14e-14) {
		tmp = t * b;
	} else if (y <= 1.5e+25) {
		tmp = x + z;
	} else if ((y <= 3.4e+115) || (!(y <= 1.5e+166) && (y <= 4.5e+213))) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * -z
    if (y <= (-6.4d+157)) then
        tmp = t_1
    else if (y <= (-4.5d+90)) then
        tmp = y * b
    else if (y <= (-1.14d-14)) then
        tmp = t * b
    else if (y <= 1.5d+25) then
        tmp = x + z
    else if ((y <= 3.4d+115) .or. (.not. (y <= 1.5d+166)) .and. (y <= 4.5d+213)) then
        tmp = t_1
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double tmp;
	if (y <= -6.4e+157) {
		tmp = t_1;
	} else if (y <= -4.5e+90) {
		tmp = y * b;
	} else if (y <= -1.14e-14) {
		tmp = t * b;
	} else if (y <= 1.5e+25) {
		tmp = x + z;
	} else if ((y <= 3.4e+115) || (!(y <= 1.5e+166) && (y <= 4.5e+213))) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * -z
	tmp = 0
	if y <= -6.4e+157:
		tmp = t_1
	elif y <= -4.5e+90:
		tmp = y * b
	elif y <= -1.14e-14:
		tmp = t * b
	elif y <= 1.5e+25:
		tmp = x + z
	elif (y <= 3.4e+115) or (not (y <= 1.5e+166) and (y <= 4.5e+213)):
		tmp = t_1
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(-z))
	tmp = 0.0
	if (y <= -6.4e+157)
		tmp = t_1;
	elseif (y <= -4.5e+90)
		tmp = Float64(y * b);
	elseif (y <= -1.14e-14)
		tmp = Float64(t * b);
	elseif (y <= 1.5e+25)
		tmp = Float64(x + z);
	elseif ((y <= 3.4e+115) || (!(y <= 1.5e+166) && (y <= 4.5e+213)))
		tmp = t_1;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * -z;
	tmp = 0.0;
	if (y <= -6.4e+157)
		tmp = t_1;
	elseif (y <= -4.5e+90)
		tmp = y * b;
	elseif (y <= -1.14e-14)
		tmp = t * b;
	elseif (y <= 1.5e+25)
		tmp = x + z;
	elseif ((y <= 3.4e+115) || (~((y <= 1.5e+166)) && (y <= 4.5e+213)))
		tmp = t_1;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, If[LessEqual[y, -6.4e+157], t$95$1, If[LessEqual[y, -4.5e+90], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.14e-14], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.5e+25], N[(x + z), $MachinePrecision], If[Or[LessEqual[y, 3.4e+115], And[N[Not[LessEqual[y, 1.5e+166]], $MachinePrecision], LessEqual[y, 4.5e+213]]], t$95$1, N[(y * b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4.5 \cdot 10^{+90}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -1.14 \cdot 10^{-14}:\\
\;\;\;\;t \cdot b\\

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+115} \lor \neg \left(y \leq 1.5 \cdot 10^{+166}\right) \land y \leq 4.5 \cdot 10^{+213}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.3999999999999999e157 or 1.50000000000000003e25 < y < 3.4000000000000001e115 or 1.49999999999999999e166 < y < 4.5000000000000002e213

    1. Initial program 91.6%

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative57.3%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in57.3%

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

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

    if -6.3999999999999999e157 < y < -4.5e90 or 3.4000000000000001e115 < y < 1.49999999999999999e166 or 4.5000000000000002e213 < y

    1. Initial program 92.3%

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

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

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

    if -4.5e90 < y < -1.1400000000000001e-14

    1. Initial program 94.9%

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

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

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

    if -1.1400000000000001e-14 < y < 1.50000000000000003e25

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative45.9%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified45.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{+157}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{+90}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.14 \cdot 10^{-14}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+25}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+115} \lor \neg \left(y \leq 1.5 \cdot 10^{+166}\right) \land y \leq 4.5 \cdot 10^{+213}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 66.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \left(b \cdot \left(2 - t\right) - z\right)\\ t_2 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.5 \cdot 10^{+136}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{+70}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq -8.8 \cdot 10^{+27}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-229}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-305}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (- (* b (- 2.0 t)) z))) (t_2 (* y (- b z))))
   (if (<= y -1.5e+136)
     t_2
     (if (<= y -2.3e+70)
       (+ x (* b (- (+ y t) 2.0)))
       (if (<= y -8.8e+27)
         (+ x (* z (- 1.0 y)))
         (if (<= y -1.5e-229)
           t_1
           (if (<= y 3.4e-305)
             (+ (+ x z) (* a (- 1.0 t)))
             (if (<= y 2.15e+21) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - ((b * (2.0 - t)) - z);
	double t_2 = y * (b - z);
	double tmp;
	if (y <= -1.5e+136) {
		tmp = t_2;
	} else if (y <= -2.3e+70) {
		tmp = x + (b * ((y + t) - 2.0));
	} else if (y <= -8.8e+27) {
		tmp = x + (z * (1.0 - y));
	} else if (y <= -1.5e-229) {
		tmp = t_1;
	} else if (y <= 3.4e-305) {
		tmp = (x + z) + (a * (1.0 - t));
	} else if (y <= 2.15e+21) {
		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 - ((b * (2.0d0 - t)) - z)
    t_2 = y * (b - z)
    if (y <= (-1.5d+136)) then
        tmp = t_2
    else if (y <= (-2.3d+70)) then
        tmp = x + (b * ((y + t) - 2.0d0))
    else if (y <= (-8.8d+27)) then
        tmp = x + (z * (1.0d0 - y))
    else if (y <= (-1.5d-229)) then
        tmp = t_1
    else if (y <= 3.4d-305) then
        tmp = (x + z) + (a * (1.0d0 - t))
    else if (y <= 2.15d+21) 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 - ((b * (2.0 - t)) - z);
	double t_2 = y * (b - z);
	double tmp;
	if (y <= -1.5e+136) {
		tmp = t_2;
	} else if (y <= -2.3e+70) {
		tmp = x + (b * ((y + t) - 2.0));
	} else if (y <= -8.8e+27) {
		tmp = x + (z * (1.0 - y));
	} else if (y <= -1.5e-229) {
		tmp = t_1;
	} else if (y <= 3.4e-305) {
		tmp = (x + z) + (a * (1.0 - t));
	} else if (y <= 2.15e+21) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - ((b * (2.0 - t)) - z)
	t_2 = y * (b - z)
	tmp = 0
	if y <= -1.5e+136:
		tmp = t_2
	elif y <= -2.3e+70:
		tmp = x + (b * ((y + t) - 2.0))
	elif y <= -8.8e+27:
		tmp = x + (z * (1.0 - y))
	elif y <= -1.5e-229:
		tmp = t_1
	elif y <= 3.4e-305:
		tmp = (x + z) + (a * (1.0 - t))
	elif y <= 2.15e+21:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(Float64(b * Float64(2.0 - t)) - z))
	t_2 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -1.5e+136)
		tmp = t_2;
	elseif (y <= -2.3e+70)
		tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0)));
	elseif (y <= -8.8e+27)
		tmp = Float64(x + Float64(z * Float64(1.0 - y)));
	elseif (y <= -1.5e-229)
		tmp = t_1;
	elseif (y <= 3.4e-305)
		tmp = Float64(Float64(x + z) + Float64(a * Float64(1.0 - t)));
	elseif (y <= 2.15e+21)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - ((b * (2.0 - t)) - z);
	t_2 = y * (b - z);
	tmp = 0.0;
	if (y <= -1.5e+136)
		tmp = t_2;
	elseif (y <= -2.3e+70)
		tmp = x + (b * ((y + t) - 2.0));
	elseif (y <= -8.8e+27)
		tmp = x + (z * (1.0 - y));
	elseif (y <= -1.5e-229)
		tmp = t_1;
	elseif (y <= 3.4e-305)
		tmp = (x + z) + (a * (1.0 - t));
	elseif (y <= 2.15e+21)
		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[(N[(b * N[(2.0 - t), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+136], t$95$2, If[LessEqual[y, -2.3e+70], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.8e+27], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.5e-229], t$95$1, If[LessEqual[y, 3.4e-305], N[(N[(x + z), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e+21], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -8.8 \cdot 10^{+27}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\

\mathbf{elif}\;y \leq -1.5 \cdot 10^{-229}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 2.15 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.49999999999999989e136 or 2.15e21 < y

    1. Initial program 90.7%

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

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

    if -1.49999999999999989e136 < y < -2.29999999999999994e70

    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 80.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 71.0%

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

    if -2.29999999999999994e70 < y < -8.7999999999999995e27

    1. Initial program 100.0%

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

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

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

    if -8.7999999999999995e27 < y < -1.50000000000000001e-229 or 3.4000000000000001e-305 < y < 2.15e21

    1. Initial program 96.6%

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

      \[\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 t around 0 81.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-z \cdot \left(y + -1\right)\right)} + \mathsf{fma}\left(b, t + \left(y + -2\right), x\right) \]
      11. distribute-rgt-neg-in81.5%

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

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

        \[\leadsto \mathsf{fma}\left(z, -\color{blue}{\left(-1 + y\right)}, \mathsf{fma}\left(b, t + \left(y + -2\right), x\right)\right) \]
      14. distribute-neg-in81.5%

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

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

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

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

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

    if -1.50000000000000001e-229 < y < 3.4000000000000001e-305

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + z\right) + \left(-\left(a \cdot t + \color{blue}{-1 \cdot a}\right)\right) \]
      10. distribute-neg-in92.5%

        \[\leadsto \left(x + z\right) + \color{blue}{\left(\left(-a \cdot t\right) + \left(--1 \cdot a\right)\right)} \]
      11. distribute-rgt-neg-in92.5%

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \left(-\color{blue}{\left(-a\right)}\right)\right) \]
      14. remove-double-neg92.5%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a}\right) \]
      15. *-rgt-identity92.5%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a \cdot 1}\right) \]
      16. distribute-lft-in92.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+136}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{+70}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq -8.8 \cdot 10^{+27}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-229}:\\ \;\;\;\;x - \left(b \cdot \left(2 - t\right) - z\right)\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-305}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+21}:\\ \;\;\;\;x - \left(b \cdot \left(2 - t\right) - z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 38.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;b \leq -7.5 \cdot 10^{+186}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -3.2 \cdot 10^{+156}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;b \leq -126000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.95 \cdot 10^{+93}:\\
\;\;\;\;x + z\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.54999999999999991e264 or -7.4999999999999998e186 < b < -3.20000000000000002e156

    1. Initial program 94.7%

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

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

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

    if -1.54999999999999991e264 < b < -7.4999999999999998e186 or -3.20000000000000002e156 < b < -1.26e8 or 1.9500000000000001e93 < b

    1. Initial program 89.6%

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

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

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

    if -1.26e8 < b < 1.26000000000000002e-291

    1. Initial program 98.8%

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

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

    if 1.26000000000000002e-291 < b < 1.9500000000000001e93

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative43.0%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified43.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.55 \cdot 10^{+264}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -7.5 \cdot 10^{+186}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq -3.2 \cdot 10^{+156}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -126000000:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq 1.26 \cdot 10^{-291}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+93}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 47.4% accurate, 0.6× 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 -1.35 \cdot 10^{+57}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-186}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-299}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-112}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+66}:\\ \;\;\;\;x + z\\ \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 -1.35e+57)
     t_2
     (if (<= t -4.8e-186)
       (+ x z)
       (if (<= t -1.2e-299)
         t_1
         (if (<= t 5.2e-112)
           (+ x z)
           (if (<= t 4.8e-51) t_1 (if (<= t 4e+66) (+ x z) 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 <= -1.35e+57) {
		tmp = t_2;
	} else if (t <= -4.8e-186) {
		tmp = x + z;
	} else if (t <= -1.2e-299) {
		tmp = t_1;
	} else if (t <= 5.2e-112) {
		tmp = x + z;
	} else if (t <= 4.8e-51) {
		tmp = t_1;
	} else if (t <= 4e+66) {
		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 = b * (y - 2.0d0)
    t_2 = t * (b - a)
    if (t <= (-1.35d+57)) then
        tmp = t_2
    else if (t <= (-4.8d-186)) then
        tmp = x + z
    else if (t <= (-1.2d-299)) then
        tmp = t_1
    else if (t <= 5.2d-112) then
        tmp = x + z
    else if (t <= 4.8d-51) then
        tmp = t_1
    else if (t <= 4d+66) 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 = b * (y - 2.0);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -1.35e+57) {
		tmp = t_2;
	} else if (t <= -4.8e-186) {
		tmp = x + z;
	} else if (t <= -1.2e-299) {
		tmp = t_1;
	} else if (t <= 5.2e-112) {
		tmp = x + z;
	} else if (t <= 4.8e-51) {
		tmp = t_1;
	} else if (t <= 4e+66) {
		tmp = x + z;
	} 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 <= -1.35e+57:
		tmp = t_2
	elif t <= -4.8e-186:
		tmp = x + z
	elif t <= -1.2e-299:
		tmp = t_1
	elif t <= 5.2e-112:
		tmp = x + z
	elif t <= 4.8e-51:
		tmp = t_1
	elif t <= 4e+66:
		tmp = x + z
	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 <= -1.35e+57)
		tmp = t_2;
	elseif (t <= -4.8e-186)
		tmp = Float64(x + z);
	elseif (t <= -1.2e-299)
		tmp = t_1;
	elseif (t <= 5.2e-112)
		tmp = Float64(x + z);
	elseif (t <= 4.8e-51)
		tmp = t_1;
	elseif (t <= 4e+66)
		tmp = Float64(x + z);
	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 <= -1.35e+57)
		tmp = t_2;
	elseif (t <= -4.8e-186)
		tmp = x + z;
	elseif (t <= -1.2e-299)
		tmp = t_1;
	elseif (t <= 5.2e-112)
		tmp = x + z;
	elseif (t <= 4.8e-51)
		tmp = t_1;
	elseif (t <= 4e+66)
		tmp = x + z;
	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, -1.35e+57], t$95$2, If[LessEqual[t, -4.8e-186], N[(x + z), $MachinePrecision], If[LessEqual[t, -1.2e-299], t$95$1, If[LessEqual[t, 5.2e-112], N[(x + z), $MachinePrecision], If[LessEqual[t, 4.8e-51], t$95$1, If[LessEqual[t, 4e+66], N[(x + z), $MachinePrecision], 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 -1.35 \cdot 10^{+57}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq -1.2 \cdot 10^{-299}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-51}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 4 \cdot 10^{+66}:\\
\;\;\;\;x + z\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.3499999999999999e57 or 3.99999999999999978e66 < t

    1. Initial program 87.6%

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

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

    if -1.3499999999999999e57 < t < -4.80000000000000006e-186 or -1.2000000000000001e-299 < t < 5.19999999999999983e-112 or 4.8e-51 < t < 3.99999999999999978e66

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \left(-\color{blue}{\left(-a\right)}\right)\right) \]
      14. remove-double-neg57.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative42.2%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified42.2%

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

    if -4.80000000000000006e-186 < t < -1.2000000000000001e-299 or 5.19999999999999983e-112 < t < 4.8e-51

    1. Initial program 95.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+57}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-186}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-299}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-112}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-51}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+66}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 50.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -2.5 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-20}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-136}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+20}:\\ \;\;\;\;x + z\\ \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 -2.5e+26)
     t_1
     (if (<= y -2e-20)
       (* a (- 1.0 t))
       (if (<= y 3.7e-136)
         (+ x z)
         (if (<= y 4.6e-82) (* t (- b a)) (if (<= y 1.2e+20) (+ x z) 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 <= -2.5e+26) {
		tmp = t_1;
	} else if (y <= -2e-20) {
		tmp = a * (1.0 - t);
	} else if (y <= 3.7e-136) {
		tmp = x + z;
	} else if (y <= 4.6e-82) {
		tmp = t * (b - a);
	} else if (y <= 1.2e+20) {
		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 = y * (b - z)
    if (y <= (-2.5d+26)) then
        tmp = t_1
    else if (y <= (-2d-20)) then
        tmp = a * (1.0d0 - t)
    else if (y <= 3.7d-136) then
        tmp = x + z
    else if (y <= 4.6d-82) then
        tmp = t * (b - a)
    else if (y <= 1.2d+20) 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 = y * (b - z);
	double tmp;
	if (y <= -2.5e+26) {
		tmp = t_1;
	} else if (y <= -2e-20) {
		tmp = a * (1.0 - t);
	} else if (y <= 3.7e-136) {
		tmp = x + z;
	} else if (y <= 4.6e-82) {
		tmp = t * (b - a);
	} else if (y <= 1.2e+20) {
		tmp = x + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	tmp = 0
	if y <= -2.5e+26:
		tmp = t_1
	elif y <= -2e-20:
		tmp = a * (1.0 - t)
	elif y <= 3.7e-136:
		tmp = x + z
	elif y <= 4.6e-82:
		tmp = t * (b - a)
	elif y <= 1.2e+20:
		tmp = x + z
	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 <= -2.5e+26)
		tmp = t_1;
	elseif (y <= -2e-20)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (y <= 3.7e-136)
		tmp = Float64(x + z);
	elseif (y <= 4.6e-82)
		tmp = Float64(t * Float64(b - a));
	elseif (y <= 1.2e+20)
		tmp = Float64(x + z);
	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 <= -2.5e+26)
		tmp = t_1;
	elseif (y <= -2e-20)
		tmp = a * (1.0 - t);
	elseif (y <= 3.7e-136)
		tmp = x + z;
	elseif (y <= 4.6e-82)
		tmp = t * (b - a);
	elseif (y <= 1.2e+20)
		tmp = x + z;
	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, -2.5e+26], t$95$1, If[LessEqual[y, -2e-20], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e-136], N[(x + z), $MachinePrecision], If[LessEqual[y, 4.6e-82], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+20], N[(x + z), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-82}:\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+20}:\\
\;\;\;\;x + z\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.5e26 or 1.2e20 < y

    1. Initial program 92.0%

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

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

    if -2.5e26 < y < -1.99999999999999989e-20

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

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

    if -1.99999999999999989e-20 < y < 3.7e-136 or 4.59999999999999994e-82 < y < 1.2e20

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + \color{blue}{z}\right) + \left(-a \cdot \left(t + -1\right)\right) \]
      8. distribute-lft-in65.9%

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

        \[\leadsto \left(x + z\right) + \left(-\left(a \cdot t + \color{blue}{-1 \cdot a}\right)\right) \]
      10. distribute-neg-in65.9%

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

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \left(-\color{blue}{\left(-a\right)}\right)\right) \]
      14. remove-double-neg65.9%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a}\right) \]
      15. *-rgt-identity65.9%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a \cdot 1}\right) \]
      16. distribute-lft-in65.9%

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

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

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

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

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

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative49.5%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified49.5%

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

    if 3.7e-136 < y < 4.59999999999999994e-82

    1. Initial program 90.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 65.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+26}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-20}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-136}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-82}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+20}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 64.5% 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 -118000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.35 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-291}:\\ \;\;\;\;z + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-16}:\\ \;\;\;\;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 -118000000.0)
     t_2
     (if (<= b -1.35e-267)
       t_1
       (if (<= b 2.9e-291)
         (+ z (* a (- 1.0 t)))
         (if (<= b 6.5e-16) 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 <= -118000000.0) {
		tmp = t_2;
	} else if (b <= -1.35e-267) {
		tmp = t_1;
	} else if (b <= 2.9e-291) {
		tmp = z + (a * (1.0 - t));
	} else if (b <= 6.5e-16) {
		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 <= (-118000000.0d0)) then
        tmp = t_2
    else if (b <= (-1.35d-267)) then
        tmp = t_1
    else if (b <= 2.9d-291) then
        tmp = z + (a * (1.0d0 - t))
    else if (b <= 6.5d-16) 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 <= -118000000.0) {
		tmp = t_2;
	} else if (b <= -1.35e-267) {
		tmp = t_1;
	} else if (b <= 2.9e-291) {
		tmp = z + (a * (1.0 - t));
	} else if (b <= 6.5e-16) {
		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 <= -118000000.0:
		tmp = t_2
	elif b <= -1.35e-267:
		tmp = t_1
	elif b <= 2.9e-291:
		tmp = z + (a * (1.0 - t))
	elif b <= 6.5e-16:
		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 <= -118000000.0)
		tmp = t_2;
	elseif (b <= -1.35e-267)
		tmp = t_1;
	elseif (b <= 2.9e-291)
		tmp = Float64(z + Float64(a * Float64(1.0 - t)));
	elseif (b <= 6.5e-16)
		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 <= -118000000.0)
		tmp = t_2;
	elseif (b <= -1.35e-267)
		tmp = t_1;
	elseif (b <= 2.9e-291)
		tmp = z + (a * (1.0 - t));
	elseif (b <= 6.5e-16)
		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, -118000000.0], t$95$2, If[LessEqual[b, -1.35e-267], t$95$1, If[LessEqual[b, 2.9e-291], N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e-16], 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 -118000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq -1.35 \cdot 10^{-267}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 6.5 \cdot 10^{-16}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.18e8 or 6.50000000000000011e-16 < b

    1. Initial program 90.0%

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

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

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

    if -1.18e8 < b < -1.34999999999999994e-267 or 2.90000000000000002e-291 < b < 6.50000000000000011e-16

    1. Initial program 99.1%

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

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

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

    if -1.34999999999999994e-267 < b < 2.90000000000000002e-291

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + z\right) + \left(-\left(a \cdot t + \color{blue}{-1 \cdot a}\right)\right) \]
      10. distribute-neg-in75.5%

        \[\leadsto \left(x + z\right) + \color{blue}{\left(\left(-a \cdot t\right) + \left(--1 \cdot a\right)\right)} \]
      11. distribute-rgt-neg-in75.5%

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \left(-\color{blue}{\left(-a\right)}\right)\right) \]
      14. remove-double-neg75.5%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a}\right) \]
      15. *-rgt-identity75.5%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a \cdot 1}\right) \]
      16. distribute-lft-in75.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -118000000:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.35 \cdot 10^{-267}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-291}:\\ \;\;\;\;z + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-16}:\\ \;\;\;\;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 11: 66.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.52 \cdot 10^{+137}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{+70}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+28}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+24}:\\ \;\;\;\;x - \left(b \cdot \left(2 - t\right) - z\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.52e+137)
     t_1
     (if (<= y -1.35e+70)
       (+ x (* b (- (+ y t) 2.0)))
       (if (<= y -5.8e+28)
         (+ x (* z (- 1.0 y)))
         (if (<= y 2.15e+24) (- x (- (* b (- 2.0 t)) z)) 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.52e+137) {
		tmp = t_1;
	} else if (y <= -1.35e+70) {
		tmp = x + (b * ((y + t) - 2.0));
	} else if (y <= -5.8e+28) {
		tmp = x + (z * (1.0 - y));
	} else if (y <= 2.15e+24) {
		tmp = x - ((b * (2.0 - t)) - 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 = y * (b - z)
    if (y <= (-1.52d+137)) then
        tmp = t_1
    else if (y <= (-1.35d+70)) then
        tmp = x + (b * ((y + t) - 2.0d0))
    else if (y <= (-5.8d+28)) then
        tmp = x + (z * (1.0d0 - y))
    else if (y <= 2.15d+24) then
        tmp = x - ((b * (2.0d0 - t)) - 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 = y * (b - z);
	double tmp;
	if (y <= -1.52e+137) {
		tmp = t_1;
	} else if (y <= -1.35e+70) {
		tmp = x + (b * ((y + t) - 2.0));
	} else if (y <= -5.8e+28) {
		tmp = x + (z * (1.0 - y));
	} else if (y <= 2.15e+24) {
		tmp = x - ((b * (2.0 - t)) - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	tmp = 0
	if y <= -1.52e+137:
		tmp = t_1
	elif y <= -1.35e+70:
		tmp = x + (b * ((y + t) - 2.0))
	elif y <= -5.8e+28:
		tmp = x + (z * (1.0 - y))
	elif y <= 2.15e+24:
		tmp = x - ((b * (2.0 - t)) - z)
	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.52e+137)
		tmp = t_1;
	elseif (y <= -1.35e+70)
		tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0)));
	elseif (y <= -5.8e+28)
		tmp = Float64(x + Float64(z * Float64(1.0 - y)));
	elseif (y <= 2.15e+24)
		tmp = Float64(x - Float64(Float64(b * Float64(2.0 - t)) - z));
	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.52e+137)
		tmp = t_1;
	elseif (y <= -1.35e+70)
		tmp = x + (b * ((y + t) - 2.0));
	elseif (y <= -5.8e+28)
		tmp = x + (z * (1.0 - y));
	elseif (y <= 2.15e+24)
		tmp = x - ((b * (2.0 - t)) - z);
	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.52e+137], t$95$1, If[LessEqual[y, -1.35e+70], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.8e+28], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e+24], N[(x - N[(N[(b * N[(2.0 - t), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -5.8 \cdot 10^{+28}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.52000000000000006e137 or 2.14999999999999994e24 < y

    1. Initial program 90.7%

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

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

    if -1.52000000000000006e137 < y < -1.35e70

    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 80.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 71.0%

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

    if -1.35e70 < y < -5.8000000000000002e28

    1. Initial program 100.0%

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

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

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

    if -5.8000000000000002e28 < y < 2.14999999999999994e24

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-z\right) \cdot \left(y + -1\right) + \mathsf{fma}\left(b, t + \left(y + -2\right), x\right)} \]
      10. distribute-lft-neg-in78.7%

        \[\leadsto \color{blue}{\left(-z \cdot \left(y + -1\right)\right)} + \mathsf{fma}\left(b, t + \left(y + -2\right), x\right) \]
      11. distribute-rgt-neg-in78.7%

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

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

        \[\leadsto \mathsf{fma}\left(z, -\color{blue}{\left(-1 + y\right)}, \mathsf{fma}\left(b, t + \left(y + -2\right), x\right)\right) \]
      14. distribute-neg-in78.7%

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\left(--1\right) + \left(-y\right)}, \mathsf{fma}\left(b, t + \left(y + -2\right), x\right)\right) \]
      15. metadata-eval78.7%

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{1} + \left(-y\right), \mathsf{fma}\left(b, t + \left(y + -2\right), x\right)\right) \]
      16. sub-neg78.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.52 \cdot 10^{+137}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{+70}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+28}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+24}:\\ \;\;\;\;x - \left(b \cdot \left(2 - t\right) - z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 56.2% accurate, 0.8× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.39999999999999999e35 or 9.2e19 < 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 72.3%

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

    if -1.39999999999999999e35 < y < 5.2999999999999997e-263

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + \color{blue}{z}\right) + \left(-a \cdot \left(t + -1\right)\right) \]
      8. distribute-lft-in70.7%

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

        \[\leadsto \left(x + z\right) + \left(-\left(a \cdot t + \color{blue}{-1 \cdot a}\right)\right) \]
      10. distribute-neg-in70.7%

        \[\leadsto \left(x + z\right) + \color{blue}{\left(\left(-a \cdot t\right) + \left(--1 \cdot a\right)\right)} \]
      11. distribute-rgt-neg-in70.7%

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

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

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a \cdot 1}\right) \]
      16. distribute-lft-in70.7%

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

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

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

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

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

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

    if 5.2999999999999997e-263 < y < 1.79999999999999989e-135

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(y + -2\right)\right) + \left(-\color{blue}{\left(-a\right)}\right) \]
      5. remove-double-neg68.5%

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

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

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

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

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

    if 1.79999999999999989e-135 < y < 9.2e19

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + \color{blue}{z}\right) + \left(-a \cdot \left(t + -1\right)\right) \]
      8. distribute-lft-in59.7%

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

        \[\leadsto \left(x + z\right) + \left(-\left(a \cdot t + \color{blue}{-1 \cdot a}\right)\right) \]
      10. distribute-neg-in59.7%

        \[\leadsto \left(x + z\right) + \color{blue}{\left(\left(-a \cdot t\right) + \left(--1 \cdot a\right)\right)} \]
      11. distribute-rgt-neg-in59.7%

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

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

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a \cdot 1}\right) \]
      16. distribute-lft-in59.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+35}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 5.3 \cdot 10^{-263}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-135}:\\ \;\;\;\;a + \left(x + -2 \cdot b\right)\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+19}:\\ \;\;\;\;z + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 59.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 5.8 \cdot 10^{-102}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.45 \cdot 10^{-52}:\\
\;\;\;\;a + \left(x + -2 \cdot b\right)\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{+65}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.05e60 or 9.5000000000000005e65 < t

    1. Initial program 87.6%

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

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

    if -2.05e60 < t < 5.79999999999999973e-102 or 2.45000000000000009e-52 < t < 9.5000000000000005e65

    1. Initial program 98.6%

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

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(y + -2\right)\right) + \left(-\color{blue}{\left(-a\right)}\right) \]
      5. remove-double-neg67.0%

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

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

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

    if 5.79999999999999973e-102 < t < 2.45000000000000009e-52

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-102}:\\ \;\;\;\;a + \left(x + y \cdot b\right)\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{-52}:\\ \;\;\;\;a + \left(x + -2 \cdot b\right)\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+65}:\\ \;\;\;\;a + \left(x + y \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 60.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \left(1 - y\right)\\ t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -1.65 \cdot 10^{+124}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.45 \cdot 10^{-267}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-292}:\\ \;\;\;\;z + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.6:\\ \;\;\;\;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 (* b (- (+ y t) 2.0))))
   (if (<= b -1.65e+124)
     t_2
     (if (<= b -1.45e-267)
       t_1
       (if (<= b 5.8e-292) (+ z (* a (- 1.0 t))) (if (<= b 1.6) 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 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.65e+124) {
		tmp = t_2;
	} else if (b <= -1.45e-267) {
		tmp = t_1;
	} else if (b <= 5.8e-292) {
		tmp = z + (a * (1.0 - t));
	} else if (b <= 1.6) {
		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 = b * ((y + t) - 2.0d0)
    if (b <= (-1.65d+124)) then
        tmp = t_2
    else if (b <= (-1.45d-267)) then
        tmp = t_1
    else if (b <= 5.8d-292) then
        tmp = z + (a * (1.0d0 - t))
    else if (b <= 1.6d0) 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 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.65e+124) {
		tmp = t_2;
	} else if (b <= -1.45e-267) {
		tmp = t_1;
	} else if (b <= 5.8e-292) {
		tmp = z + (a * (1.0 - t));
	} else if (b <= 1.6) {
		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 = b * ((y + t) - 2.0)
	tmp = 0
	if b <= -1.65e+124:
		tmp = t_2
	elif b <= -1.45e-267:
		tmp = t_1
	elif b <= 5.8e-292:
		tmp = z + (a * (1.0 - t))
	elif b <= 1.6:
		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(b * Float64(Float64(y + t) - 2.0))
	tmp = 0.0
	if (b <= -1.65e+124)
		tmp = t_2;
	elseif (b <= -1.45e-267)
		tmp = t_1;
	elseif (b <= 5.8e-292)
		tmp = Float64(z + Float64(a * Float64(1.0 - t)));
	elseif (b <= 1.6)
		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 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -1.65e+124)
		tmp = t_2;
	elseif (b <= -1.45e-267)
		tmp = t_1;
	elseif (b <= 5.8e-292)
		tmp = z + (a * (1.0 - t));
	elseif (b <= 1.6)
		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[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.65e+124], t$95$2, If[LessEqual[b, -1.45e-267], t$95$1, If[LessEqual[b, 5.8e-292], N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -1.45 \cdot 10^{-267}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.6:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.65000000000000007e124 or 1.6000000000000001 < b

    1. Initial program 87.9%

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

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

    if -1.65000000000000007e124 < b < -1.45000000000000011e-267 or 5.79999999999999985e-292 < b < 1.6000000000000001

    1. Initial program 99.3%

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

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

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

    if -1.45000000000000011e-267 < b < 5.79999999999999985e-292

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + z\right) + \left(-\left(a \cdot t + \color{blue}{-1 \cdot a}\right)\right) \]
      10. distribute-neg-in75.5%

        \[\leadsto \left(x + z\right) + \color{blue}{\left(\left(-a \cdot t\right) + \left(--1 \cdot a\right)\right)} \]
      11. distribute-rgt-neg-in75.5%

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \left(-\color{blue}{\left(-a\right)}\right)\right) \]
      14. remove-double-neg75.5%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a}\right) \]
      15. *-rgt-identity75.5%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a \cdot 1}\right) \]
      16. distribute-lft-in75.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+124}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.45 \cdot 10^{-267}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-292}:\\ \;\;\;\;z + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.6:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 84.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{-16} \lor \neg \left(z \leq 2 \cdot 10^{+81}\right):\\
\;\;\;\;x + \left(t_1 + z \cdot \left(1 - y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.7999999999999996e-16 or 1.99999999999999984e81 < z

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

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

    if -5.7999999999999996e-16 < z < 1.99999999999999984e81

    1. Initial program 96.1%

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

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

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

Alternative 16: 85.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-13} \lor \neg \left(z \leq 9.5 \cdot 10^{+78}\right):\\
\;\;\;\;t_1 + z \cdot \left(1 - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6e-13 or 9.5000000000000006e78 < z

    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 a around 0 89.7%

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

    if -1.6e-13 < z < 9.5000000000000006e78

    1. Initial program 96.1%

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

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

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

Alternative 17: 84.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{-14} \lor \neg \left(z \leq 7.2 \cdot 10^{+76}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.14999999999999999e-14 or 7.2000000000000006e76 < z

    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 a around 0 89.7%

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

    if -2.14999999999999999e-14 < z < 7.2000000000000006e76

    1. Initial program 96.1%

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

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

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

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

Alternative 18: 27.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq 4.3 \cdot 10^{-107}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 3.05 \cdot 10^{-52}:\\
\;\;\;\;-2 \cdot b\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{+65}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.49999999999999996e57 or 1.60000000000000003e65 < t

    1. Initial program 87.8%

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

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

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

    if -4.49999999999999996e57 < t < 4.2999999999999997e-107 or 3.04999999999999995e-52 < t < 1.60000000000000003e65

    1. Initial program 98.6%

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

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

    if 4.2999999999999997e-107 < t < 3.04999999999999995e-52

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{-2 \cdot b} \]
    6. Step-by-step derivation
      1. *-commutative42.9%

        \[\leadsto \color{blue}{b \cdot -2} \]
    7. Simplified42.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+57}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-107}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.05 \cdot 10^{-52}:\\ \;\;\;\;-2 \cdot b\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+65}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 28.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -2.95 \cdot 10^{-192}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 4 \cdot 10^{-134}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 4.7 \cdot 10^{+64}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.5e57 or 4.70000000000000029e64 < t

    1. Initial program 87.8%

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

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

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

    if -1.5e57 < t < -2.9499999999999998e-192 or 4.00000000000000016e-134 < t < 4.70000000000000029e64

    1. Initial program 100.0%

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

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

    if -2.9499999999999998e-192 < t < 4.00000000000000016e-134

    1. Initial program 96.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+57}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -2.95 \cdot 10^{-192}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-134}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+64}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 83.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -125000000 \lor \neg \left(b \leq 92000000000000\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.25e8 or 9.2e13 < b

    1. Initial program 89.8%

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

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

    if -1.25e8 < b < 9.2e13

    1. Initial program 99.3%

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

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

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

Alternative 21: 76.6% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.26e8 or 1e14 < b

    1. Initial program 89.8%

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

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

    if -1.26e8 < b < 1e14

    1. Initial program 99.3%

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

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

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

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

Alternative 22: 56.2% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4e38 or 7.3999999999999996e22 < 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 72.3%

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

    if -1.4e38 < y < 7.3999999999999996e22

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \left(-\color{blue}{\left(-a\right)}\right)\right) \]
      14. remove-double-neg66.3%

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

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

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

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

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

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

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

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

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

Alternative 23: 35.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{+93} \lor \neg \left(y \leq 2.9 \cdot 10^{+81}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.60000000000000017e93 or 2.9e81 < y

    1. Initial program 91.0%

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

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

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

    if -6.60000000000000017e93 < y < 2.9e81

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + \color{blue}{z}\right) + \left(-a \cdot \left(t + -1\right)\right) \]
      8. distribute-lft-in61.7%

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

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

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

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

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

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a \cdot 1}\right) \]
      16. distribute-lft-in61.7%

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

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

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

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

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

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative39.7%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified39.7%

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

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

Alternative 24: 20.7% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 1.65 \cdot 10^{+38}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.0000000000000005e121 or 1.65e38 < x

    1. Initial program 95.9%

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

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

    if -6.0000000000000005e121 < x < 1.65e38

    1. Initial program 94.3%

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

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

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

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

Alternative 25: 20.7% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.35 \cdot 10^{-16}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 3.8 \cdot 10^{-8}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.35000000000000018e-16 or 3.80000000000000028e-8 < x

    1. Initial program 95.0%

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

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

    if -4.35000000000000018e-16 < x < 3.80000000000000028e-8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a}\right) \]
      15. *-rgt-identity43.1%

        \[\leadsto \left(x + z\right) + \left(a \cdot \left(-1 \cdot t\right) + \color{blue}{a \cdot 1}\right) \]
      16. distribute-lft-in43.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.35 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-8}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 10.7% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 94.9%

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

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

    \[\leadsto \color{blue}{a} \]
  5. Final simplification10.4%

    \[\leadsto a \]
  6. Add Preprocessing

Reproduce

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