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

Percentage Accurate: 95.1% → 97.8%
Time: 16.0s
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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(y + t\right) - 2\right) + \left(\left(x - z \cdot \left(y + -1\right)\right) + a \cdot \left(1 - t\right)\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
         (+ (* b (- (+ y t) 2.0)) (+ (- x (* z (+ y -1.0))) (* a (- 1.0 t))))))
   (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 = (b * ((y + t) - 2.0)) + ((x - (z * (y + -1.0))) + (a * (1.0 - t)));
	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 = (b * ((y + t) - 2.0)) + ((x - (z * (y + -1.0))) + (a * (1.0 - t)));
	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 = (b * ((y + t) - 2.0)) + ((x - (z * (y + -1.0))) + (a * (1.0 - t)))
	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(b * Float64(Float64(y + t) - 2.0)) + Float64(Float64(x - Float64(z * Float64(y + -1.0))) + Float64(a * Float64(1.0 - t))))
	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 = (b * ((y + t) - 2.0)) + ((x - (z * (y + -1.0))) + (a * (1.0 - t)));
	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[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $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 := b \cdot \left(\left(y + t\right) - 2\right) + \left(\left(x - z \cdot \left(y + -1\right)\right) + a \cdot \left(1 - t\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

Alternative 2: 97.5% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 50.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -7.5 \cdot 10^{+14}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-59}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-224}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-219}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-21}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 95000000000:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+57} \lor \neg \left(t \leq 4.6 \cdot 10^{+115}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
   (if (<= t -7.5e+14)
     t_2
     (if (<= t -2.7e-12)
       t_1
       (if (<= t -1.35e-59)
         (+ x a)
         (if (<= t -3e-224)
           (* z (- 1.0 y))
           (if (<= t 1.8e-219)
             t_1
             (if (<= t 2.1e-21)
               (+ x a)
               (if (<= t 95000000000.0)
                 (* b (- (+ y t) 2.0))
                 (if (or (<= t 4.6e+57) (not (<= t 4.6e+115)))
                   t_2
                   t_1))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -7.5e+14) {
		tmp = t_2;
	} else if (t <= -2.7e-12) {
		tmp = t_1;
	} else if (t <= -1.35e-59) {
		tmp = x + a;
	} else if (t <= -3e-224) {
		tmp = z * (1.0 - y);
	} else if (t <= 1.8e-219) {
		tmp = t_1;
	} else if (t <= 2.1e-21) {
		tmp = x + a;
	} else if (t <= 95000000000.0) {
		tmp = b * ((y + t) - 2.0);
	} else if ((t <= 4.6e+57) || !(t <= 4.6e+115)) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = t * (b - a)
    if (t <= (-7.5d+14)) then
        tmp = t_2
    else if (t <= (-2.7d-12)) then
        tmp = t_1
    else if (t <= (-1.35d-59)) then
        tmp = x + a
    else if (t <= (-3d-224)) then
        tmp = z * (1.0d0 - y)
    else if (t <= 1.8d-219) then
        tmp = t_1
    else if (t <= 2.1d-21) then
        tmp = x + a
    else if (t <= 95000000000.0d0) then
        tmp = b * ((y + t) - 2.0d0)
    else if ((t <= 4.6d+57) .or. (.not. (t <= 4.6d+115))) then
        tmp = t_2
    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 t_2 = t * (b - a);
	double tmp;
	if (t <= -7.5e+14) {
		tmp = t_2;
	} else if (t <= -2.7e-12) {
		tmp = t_1;
	} else if (t <= -1.35e-59) {
		tmp = x + a;
	} else if (t <= -3e-224) {
		tmp = z * (1.0 - y);
	} else if (t <= 1.8e-219) {
		tmp = t_1;
	} else if (t <= 2.1e-21) {
		tmp = x + a;
	} else if (t <= 95000000000.0) {
		tmp = b * ((y + t) - 2.0);
	} else if ((t <= 4.6e+57) || !(t <= 4.6e+115)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -7.5e+14:
		tmp = t_2
	elif t <= -2.7e-12:
		tmp = t_1
	elif t <= -1.35e-59:
		tmp = x + a
	elif t <= -3e-224:
		tmp = z * (1.0 - y)
	elif t <= 1.8e-219:
		tmp = t_1
	elif t <= 2.1e-21:
		tmp = x + a
	elif t <= 95000000000.0:
		tmp = b * ((y + t) - 2.0)
	elif (t <= 4.6e+57) or not (t <= 4.6e+115):
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -7.5e+14)
		tmp = t_2;
	elseif (t <= -2.7e-12)
		tmp = t_1;
	elseif (t <= -1.35e-59)
		tmp = Float64(x + a);
	elseif (t <= -3e-224)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (t <= 1.8e-219)
		tmp = t_1;
	elseif (t <= 2.1e-21)
		tmp = Float64(x + a);
	elseif (t <= 95000000000.0)
		tmp = Float64(b * Float64(Float64(y + t) - 2.0));
	elseif ((t <= 4.6e+57) || !(t <= 4.6e+115))
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -7.5e+14)
		tmp = t_2;
	elseif (t <= -2.7e-12)
		tmp = t_1;
	elseif (t <= -1.35e-59)
		tmp = x + a;
	elseif (t <= -3e-224)
		tmp = z * (1.0 - y);
	elseif (t <= 1.8e-219)
		tmp = t_1;
	elseif (t <= 2.1e-21)
		tmp = x + a;
	elseif (t <= 95000000000.0)
		tmp = b * ((y + t) - 2.0);
	elseif ((t <= 4.6e+57) || ~((t <= 4.6e+115)))
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e+14], t$95$2, If[LessEqual[t, -2.7e-12], t$95$1, If[LessEqual[t, -1.35e-59], N[(x + a), $MachinePrecision], If[LessEqual[t, -3e-224], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-219], t$95$1, If[LessEqual[t, 2.1e-21], N[(x + a), $MachinePrecision], If[LessEqual[t, 95000000000.0], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 4.6e+57], N[Not[LessEqual[t, 4.6e+115]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq -3 \cdot 10^{-224}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;t \leq 1.8 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+57} \lor \neg \left(t \leq 4.6 \cdot 10^{+115}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -7.5e14 or 9.5e10 < t < 4.5999999999999998e57 or 4.60000000000000007e115 < t

    1. Initial program 92.2%

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

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

    if -7.5e14 < t < -2.6999999999999998e-12 or -2.99999999999999982e-224 < t < 1.79999999999999987e-219 or 4.5999999999999998e57 < t < 4.60000000000000007e115

    1. Initial program 96.4%

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

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

    if -2.6999999999999998e-12 < t < -1.3499999999999999e-59 or 1.79999999999999987e-219 < t < 2.10000000000000013e-21

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -1.3499999999999999e-59 < t < -2.99999999999999982e-224

    1. Initial program 100.0%

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

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

    if 2.10000000000000013e-21 < t < 9.5e10

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+14}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-12}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-59}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-224}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-219}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-21}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 95000000000:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+57} \lor \neg \left(t \leq 4.6 \cdot 10^{+115}\right):\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 49.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -2.15 \cdot 10^{+15}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-59}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{-225}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-219}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-31}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.65 \lor \neg \left(t \leq 4.8 \cdot 10^{+57}\right) \land t \leq 4.6 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
   (if (<= t -2.15e+15)
     t_2
     (if (<= t -2.7e-12)
       t_1
       (if (<= t -1.1e-59)
         (+ x a)
         (if (<= t -7.6e-225)
           (* z (- 1.0 y))
           (if (<= t 8.5e-219)
             t_1
             (if (<= t 3.2e-31)
               (+ x a)
               (if (or (<= t 1.65) (and (not (<= t 4.8e+57)) (<= t 4.6e+115)))
                 t_1
                 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -2.15e+15) {
		tmp = t_2;
	} else if (t <= -2.7e-12) {
		tmp = t_1;
	} else if (t <= -1.1e-59) {
		tmp = x + a;
	} else if (t <= -7.6e-225) {
		tmp = z * (1.0 - y);
	} else if (t <= 8.5e-219) {
		tmp = t_1;
	} else if (t <= 3.2e-31) {
		tmp = x + a;
	} else if ((t <= 1.65) || (!(t <= 4.8e+57) && (t <= 4.6e+115))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = t * (b - a)
    if (t <= (-2.15d+15)) then
        tmp = t_2
    else if (t <= (-2.7d-12)) then
        tmp = t_1
    else if (t <= (-1.1d-59)) then
        tmp = x + a
    else if (t <= (-7.6d-225)) then
        tmp = z * (1.0d0 - y)
    else if (t <= 8.5d-219) then
        tmp = t_1
    else if (t <= 3.2d-31) then
        tmp = x + a
    else if ((t <= 1.65d0) .or. (.not. (t <= 4.8d+57)) .and. (t <= 4.6d+115)) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -2.15e+15) {
		tmp = t_2;
	} else if (t <= -2.7e-12) {
		tmp = t_1;
	} else if (t <= -1.1e-59) {
		tmp = x + a;
	} else if (t <= -7.6e-225) {
		tmp = z * (1.0 - y);
	} else if (t <= 8.5e-219) {
		tmp = t_1;
	} else if (t <= 3.2e-31) {
		tmp = x + a;
	} else if ((t <= 1.65) || (!(t <= 4.8e+57) && (t <= 4.6e+115))) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -2.15e+15:
		tmp = t_2
	elif t <= -2.7e-12:
		tmp = t_1
	elif t <= -1.1e-59:
		tmp = x + a
	elif t <= -7.6e-225:
		tmp = z * (1.0 - y)
	elif t <= 8.5e-219:
		tmp = t_1
	elif t <= 3.2e-31:
		tmp = x + a
	elif (t <= 1.65) or (not (t <= 4.8e+57) and (t <= 4.6e+115)):
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -2.15e+15)
		tmp = t_2;
	elseif (t <= -2.7e-12)
		tmp = t_1;
	elseif (t <= -1.1e-59)
		tmp = Float64(x + a);
	elseif (t <= -7.6e-225)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (t <= 8.5e-219)
		tmp = t_1;
	elseif (t <= 3.2e-31)
		tmp = Float64(x + a);
	elseif ((t <= 1.65) || (!(t <= 4.8e+57) && (t <= 4.6e+115)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -2.15e+15)
		tmp = t_2;
	elseif (t <= -2.7e-12)
		tmp = t_1;
	elseif (t <= -1.1e-59)
		tmp = x + a;
	elseif (t <= -7.6e-225)
		tmp = z * (1.0 - y);
	elseif (t <= 8.5e-219)
		tmp = t_1;
	elseif (t <= 3.2e-31)
		tmp = x + a;
	elseif ((t <= 1.65) || (~((t <= 4.8e+57)) && (t <= 4.6e+115)))
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.15e+15], t$95$2, If[LessEqual[t, -2.7e-12], t$95$1, If[LessEqual[t, -1.1e-59], N[(x + a), $MachinePrecision], If[LessEqual[t, -7.6e-225], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-219], t$95$1, If[LessEqual[t, 3.2e-31], N[(x + a), $MachinePrecision], If[Or[LessEqual[t, 1.65], And[N[Not[LessEqual[t, 4.8e+57]], $MachinePrecision], LessEqual[t, 4.6e+115]]], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq -7.6 \cdot 10^{-225}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.65 \lor \neg \left(t \leq 4.8 \cdot 10^{+57}\right) \land t \leq 4.6 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.15e15 or 1.6499999999999999 < t < 4.80000000000000009e57 or 4.60000000000000007e115 < t

    1. Initial program 92.4%

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

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

    if -2.15e15 < t < -2.6999999999999998e-12 or -7.6000000000000005e-225 < t < 8.49999999999999964e-219 or 3.20000000000000018e-31 < t < 1.6499999999999999 or 4.80000000000000009e57 < t < 4.60000000000000007e115

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

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

    if -2.6999999999999998e-12 < t < -1.0999999999999999e-59 or 8.49999999999999964e-219 < t < 3.20000000000000018e-31

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -1.0999999999999999e-59 < t < -7.6000000000000005e-225

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.15 \cdot 10^{+15}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-12}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-59}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -7.6 \cdot 10^{-225}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-219}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-31}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.65 \lor \neg \left(t \leq 4.8 \cdot 10^{+57}\right) \land t \leq 4.6 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 55.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + b \cdot \left(y - 2\right)\\ t_2 := x - z \cdot \left(y + -1\right)\\ t_3 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -4400:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-225}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-301}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-142}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{+57}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+115}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (* b (- y 2.0))))
        (t_2 (- x (* z (+ y -1.0))))
        (t_3 (* t (- b a))))
   (if (<= t -4400.0)
     t_3
     (if (<= t -1.65e-63)
       t_1
       (if (<= t -6e-225)
         t_2
         (if (<= t 4.4e-301)
           (* y (- b z))
           (if (<= t 2.25e-142)
             t_2
             (if (<= t 2.6e-7)
               t_1
               (if (<= t 2.65e+57)
                 (+ x (* a (- 1.0 t)))
                 (if (<= t 5.2e+115) t_2 t_3))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (b * (y - 2.0));
	double t_2 = x - (z * (y + -1.0));
	double t_3 = t * (b - a);
	double tmp;
	if (t <= -4400.0) {
		tmp = t_3;
	} else if (t <= -1.65e-63) {
		tmp = t_1;
	} else if (t <= -6e-225) {
		tmp = t_2;
	} else if (t <= 4.4e-301) {
		tmp = y * (b - z);
	} else if (t <= 2.25e-142) {
		tmp = t_2;
	} else if (t <= 2.6e-7) {
		tmp = t_1;
	} else if (t <= 2.65e+57) {
		tmp = x + (a * (1.0 - t));
	} else if (t <= 5.2e+115) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = a + (b * (y - 2.0d0))
    t_2 = x - (z * (y + (-1.0d0)))
    t_3 = t * (b - a)
    if (t <= (-4400.0d0)) then
        tmp = t_3
    else if (t <= (-1.65d-63)) then
        tmp = t_1
    else if (t <= (-6d-225)) then
        tmp = t_2
    else if (t <= 4.4d-301) then
        tmp = y * (b - z)
    else if (t <= 2.25d-142) then
        tmp = t_2
    else if (t <= 2.6d-7) then
        tmp = t_1
    else if (t <= 2.65d+57) then
        tmp = x + (a * (1.0d0 - t))
    else if (t <= 5.2d+115) then
        tmp = t_2
    else
        tmp = t_3
    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 + (b * (y - 2.0));
	double t_2 = x - (z * (y + -1.0));
	double t_3 = t * (b - a);
	double tmp;
	if (t <= -4400.0) {
		tmp = t_3;
	} else if (t <= -1.65e-63) {
		tmp = t_1;
	} else if (t <= -6e-225) {
		tmp = t_2;
	} else if (t <= 4.4e-301) {
		tmp = y * (b - z);
	} else if (t <= 2.25e-142) {
		tmp = t_2;
	} else if (t <= 2.6e-7) {
		tmp = t_1;
	} else if (t <= 2.65e+57) {
		tmp = x + (a * (1.0 - t));
	} else if (t <= 5.2e+115) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (b * (y - 2.0))
	t_2 = x - (z * (y + -1.0))
	t_3 = t * (b - a)
	tmp = 0
	if t <= -4400.0:
		tmp = t_3
	elif t <= -1.65e-63:
		tmp = t_1
	elif t <= -6e-225:
		tmp = t_2
	elif t <= 4.4e-301:
		tmp = y * (b - z)
	elif t <= 2.25e-142:
		tmp = t_2
	elif t <= 2.6e-7:
		tmp = t_1
	elif t <= 2.65e+57:
		tmp = x + (a * (1.0 - t))
	elif t <= 5.2e+115:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(b * Float64(y - 2.0)))
	t_2 = Float64(x - Float64(z * Float64(y + -1.0)))
	t_3 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -4400.0)
		tmp = t_3;
	elseif (t <= -1.65e-63)
		tmp = t_1;
	elseif (t <= -6e-225)
		tmp = t_2;
	elseif (t <= 4.4e-301)
		tmp = Float64(y * Float64(b - z));
	elseif (t <= 2.25e-142)
		tmp = t_2;
	elseif (t <= 2.6e-7)
		tmp = t_1;
	elseif (t <= 2.65e+57)
		tmp = Float64(x + Float64(a * Float64(1.0 - t)));
	elseif (t <= 5.2e+115)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (b * (y - 2.0));
	t_2 = x - (z * (y + -1.0));
	t_3 = t * (b - a);
	tmp = 0.0;
	if (t <= -4400.0)
		tmp = t_3;
	elseif (t <= -1.65e-63)
		tmp = t_1;
	elseif (t <= -6e-225)
		tmp = t_2;
	elseif (t <= 4.4e-301)
		tmp = y * (b - z);
	elseif (t <= 2.25e-142)
		tmp = t_2;
	elseif (t <= 2.6e-7)
		tmp = t_1;
	elseif (t <= 2.65e+57)
		tmp = x + (a * (1.0 - t));
	elseif (t <= 5.2e+115)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4400.0], t$95$3, If[LessEqual[t, -1.65e-63], t$95$1, If[LessEqual[t, -6e-225], t$95$2, If[LessEqual[t, 4.4e-301], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-142], t$95$2, If[LessEqual[t, 2.6e-7], t$95$1, If[LessEqual[t, 2.65e+57], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+115], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.65 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -6 \cdot 10^{-225}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 2.25 \cdot 10^{-142}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+115}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4400 or 5.2000000000000001e115 < t

    1. Initial program 91.2%

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

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

    if -4400 < t < -1.64999999999999997e-63 or 2.25000000000000009e-142 < t < 2.59999999999999999e-7

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -1.64999999999999997e-63 < t < -6.00000000000000035e-225 or 4.4e-301 < t < 2.25000000000000009e-142 or 2.64999999999999993e57 < t < 5.2000000000000001e115

    1. Initial program 97.1%

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

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

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

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

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

    if -6.00000000000000035e-225 < t < 4.4e-301

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

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

    if 2.59999999999999999e-7 < t < 2.64999999999999993e57

    1. Initial program 99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4400:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-63}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-225}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-301}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-142}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-7}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{+57}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+115}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 51.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := a + b \cdot \left(y - 2\right)\\ t_3 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -5000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-68}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-225}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-220}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-192}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.65:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+57} \lor \neg \left(t \leq 5.2 \cdot 10^{+116}\right):\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (+ a (* b (- y 2.0)))) (t_3 (* t (- b a))))
   (if (<= t -5000.0)
     t_3
     (if (<= t -4e-68)
       t_2
       (if (<= t -3.5e-225)
         (* z (- 1.0 y))
         (if (<= t 6.4e-220)
           t_1
           (if (<= t 9.5e-192)
             (+ x a)
             (if (<= t 1.65)
               t_2
               (if (or (<= t 3.4e+57) (not (<= t 5.2e+116))) t_3 t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = a + (b * (y - 2.0));
	double t_3 = t * (b - a);
	double tmp;
	if (t <= -5000.0) {
		tmp = t_3;
	} else if (t <= -4e-68) {
		tmp = t_2;
	} else if (t <= -3.5e-225) {
		tmp = z * (1.0 - y);
	} else if (t <= 6.4e-220) {
		tmp = t_1;
	} else if (t <= 9.5e-192) {
		tmp = x + a;
	} else if (t <= 1.65) {
		tmp = t_2;
	} else if ((t <= 3.4e+57) || !(t <= 5.2e+116)) {
		tmp = t_3;
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = a + (b * (y - 2.0d0))
    t_3 = t * (b - a)
    if (t <= (-5000.0d0)) then
        tmp = t_3
    else if (t <= (-4d-68)) then
        tmp = t_2
    else if (t <= (-3.5d-225)) then
        tmp = z * (1.0d0 - y)
    else if (t <= 6.4d-220) then
        tmp = t_1
    else if (t <= 9.5d-192) then
        tmp = x + a
    else if (t <= 1.65d0) then
        tmp = t_2
    else if ((t <= 3.4d+57) .or. (.not. (t <= 5.2d+116))) then
        tmp = t_3
    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 t_2 = a + (b * (y - 2.0));
	double t_3 = t * (b - a);
	double tmp;
	if (t <= -5000.0) {
		tmp = t_3;
	} else if (t <= -4e-68) {
		tmp = t_2;
	} else if (t <= -3.5e-225) {
		tmp = z * (1.0 - y);
	} else if (t <= 6.4e-220) {
		tmp = t_1;
	} else if (t <= 9.5e-192) {
		tmp = x + a;
	} else if (t <= 1.65) {
		tmp = t_2;
	} else if ((t <= 3.4e+57) || !(t <= 5.2e+116)) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = a + (b * (y - 2.0))
	t_3 = t * (b - a)
	tmp = 0
	if t <= -5000.0:
		tmp = t_3
	elif t <= -4e-68:
		tmp = t_2
	elif t <= -3.5e-225:
		tmp = z * (1.0 - y)
	elif t <= 6.4e-220:
		tmp = t_1
	elif t <= 9.5e-192:
		tmp = x + a
	elif t <= 1.65:
		tmp = t_2
	elif (t <= 3.4e+57) or not (t <= 5.2e+116):
		tmp = t_3
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(a + Float64(b * Float64(y - 2.0)))
	t_3 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -5000.0)
		tmp = t_3;
	elseif (t <= -4e-68)
		tmp = t_2;
	elseif (t <= -3.5e-225)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (t <= 6.4e-220)
		tmp = t_1;
	elseif (t <= 9.5e-192)
		tmp = Float64(x + a);
	elseif (t <= 1.65)
		tmp = t_2;
	elseif ((t <= 3.4e+57) || !(t <= 5.2e+116))
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = a + (b * (y - 2.0));
	t_3 = t * (b - a);
	tmp = 0.0;
	if (t <= -5000.0)
		tmp = t_3;
	elseif (t <= -4e-68)
		tmp = t_2;
	elseif (t <= -3.5e-225)
		tmp = z * (1.0 - y);
	elseif (t <= 6.4e-220)
		tmp = t_1;
	elseif (t <= 9.5e-192)
		tmp = x + a;
	elseif (t <= 1.65)
		tmp = t_2;
	elseif ((t <= 3.4e+57) || ~((t <= 5.2e+116)))
		tmp = t_3;
	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]}, Block[{t$95$2 = N[(a + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5000.0], t$95$3, If[LessEqual[t, -4e-68], t$95$2, If[LessEqual[t, -3.5e-225], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.4e-220], t$95$1, If[LessEqual[t, 9.5e-192], N[(x + a), $MachinePrecision], If[LessEqual[t, 1.65], t$95$2, If[Or[LessEqual[t, 3.4e+57], N[Not[LessEqual[t, 5.2e+116]], $MachinePrecision]], t$95$3, t$95$1]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := a + b \cdot \left(y - 2\right)\\
t_3 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -5000:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq -4 \cdot 10^{-68}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-225}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;t \leq 6.4 \cdot 10^{-220}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.65:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{+57} \lor \neg \left(t \leq 5.2 \cdot 10^{+116}\right):\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -5e3 or 1.6499999999999999 < t < 3.39999999999999992e57 or 5.19999999999999973e116 < t

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

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

    if -5e3 < t < -4.00000000000000027e-68 or 9.4999999999999996e-192 < t < 1.6499999999999999

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -4.00000000000000027e-68 < t < -3.4999999999999997e-225

    1. Initial program 100.0%

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

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

    if -3.4999999999999997e-225 < t < 6.40000000000000011e-220 or 3.39999999999999992e57 < t < 5.19999999999999973e116

    1. Initial program 95.7%

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

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

    if 6.40000000000000011e-220 < t < 9.4999999999999996e-192

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-68}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-225}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-220}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-192}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.65:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+57} \lor \neg \left(t \leq 5.2 \cdot 10^{+116}\right):\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 55.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + b \cdot \left(y - 2\right)\\ t_2 := x - z \cdot \left(y + -1\right)\\ t_3 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -5200:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-225}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-299}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-142}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+116}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (* b (- y 2.0))))
        (t_2 (- x (* z (+ y -1.0))))
        (t_3 (* t (- b a))))
   (if (<= t -5200.0)
     t_3
     (if (<= t -1.3e-61)
       t_1
       (if (<= t -2.8e-225)
         t_2
         (if (<= t 8.5e-299)
           (* y (- b z))
           (if (<= t 3.2e-142)
             t_2
             (if (<= t 1.75e-7) t_1 (if (<= t 2.1e+116) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (b * (y - 2.0));
	double t_2 = x - (z * (y + -1.0));
	double t_3 = t * (b - a);
	double tmp;
	if (t <= -5200.0) {
		tmp = t_3;
	} else if (t <= -1.3e-61) {
		tmp = t_1;
	} else if (t <= -2.8e-225) {
		tmp = t_2;
	} else if (t <= 8.5e-299) {
		tmp = y * (b - z);
	} else if (t <= 3.2e-142) {
		tmp = t_2;
	} else if (t <= 1.75e-7) {
		tmp = t_1;
	} else if (t <= 2.1e+116) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = a + (b * (y - 2.0d0))
    t_2 = x - (z * (y + (-1.0d0)))
    t_3 = t * (b - a)
    if (t <= (-5200.0d0)) then
        tmp = t_3
    else if (t <= (-1.3d-61)) then
        tmp = t_1
    else if (t <= (-2.8d-225)) then
        tmp = t_2
    else if (t <= 8.5d-299) then
        tmp = y * (b - z)
    else if (t <= 3.2d-142) then
        tmp = t_2
    else if (t <= 1.75d-7) then
        tmp = t_1
    else if (t <= 2.1d+116) then
        tmp = t_2
    else
        tmp = t_3
    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 + (b * (y - 2.0));
	double t_2 = x - (z * (y + -1.0));
	double t_3 = t * (b - a);
	double tmp;
	if (t <= -5200.0) {
		tmp = t_3;
	} else if (t <= -1.3e-61) {
		tmp = t_1;
	} else if (t <= -2.8e-225) {
		tmp = t_2;
	} else if (t <= 8.5e-299) {
		tmp = y * (b - z);
	} else if (t <= 3.2e-142) {
		tmp = t_2;
	} else if (t <= 1.75e-7) {
		tmp = t_1;
	} else if (t <= 2.1e+116) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (b * (y - 2.0))
	t_2 = x - (z * (y + -1.0))
	t_3 = t * (b - a)
	tmp = 0
	if t <= -5200.0:
		tmp = t_3
	elif t <= -1.3e-61:
		tmp = t_1
	elif t <= -2.8e-225:
		tmp = t_2
	elif t <= 8.5e-299:
		tmp = y * (b - z)
	elif t <= 3.2e-142:
		tmp = t_2
	elif t <= 1.75e-7:
		tmp = t_1
	elif t <= 2.1e+116:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(b * Float64(y - 2.0)))
	t_2 = Float64(x - Float64(z * Float64(y + -1.0)))
	t_3 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -5200.0)
		tmp = t_3;
	elseif (t <= -1.3e-61)
		tmp = t_1;
	elseif (t <= -2.8e-225)
		tmp = t_2;
	elseif (t <= 8.5e-299)
		tmp = Float64(y * Float64(b - z));
	elseif (t <= 3.2e-142)
		tmp = t_2;
	elseif (t <= 1.75e-7)
		tmp = t_1;
	elseif (t <= 2.1e+116)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (b * (y - 2.0));
	t_2 = x - (z * (y + -1.0));
	t_3 = t * (b - a);
	tmp = 0.0;
	if (t <= -5200.0)
		tmp = t_3;
	elseif (t <= -1.3e-61)
		tmp = t_1;
	elseif (t <= -2.8e-225)
		tmp = t_2;
	elseif (t <= 8.5e-299)
		tmp = y * (b - z);
	elseif (t <= 3.2e-142)
		tmp = t_2;
	elseif (t <= 1.75e-7)
		tmp = t_1;
	elseif (t <= 2.1e+116)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5200.0], t$95$3, If[LessEqual[t, -1.3e-61], t$95$1, If[LessEqual[t, -2.8e-225], t$95$2, If[LessEqual[t, 8.5e-299], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-142], t$95$2, If[LessEqual[t, 1.75e-7], t$95$1, If[LessEqual[t, 2.1e+116], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.3 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.8 \cdot 10^{-225}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;t \leq 1.75 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{+116}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5200 or 2.1000000000000001e116 < t

    1. Initial program 91.2%

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

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

    if -5200 < t < -1.30000000000000005e-61 or 3.1999999999999998e-142 < t < 1.74999999999999992e-7

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -1.30000000000000005e-61 < t < -2.8e-225 or 8.5e-299 < t < 3.1999999999999998e-142 or 1.74999999999999992e-7 < t < 2.1000000000000001e116

    1. Initial program 97.7%

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

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

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

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

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

    if -2.8e-225 < t < 8.5e-299

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5200:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-61}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-225}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-299}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-142}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-7}:\\ \;\;\;\;a + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+116}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 64.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + z\right) + a \cdot \left(1 - t\right)\\ t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\ t_3 := t\_2 - y \cdot z\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+178}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{+93}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{+64}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.32 \cdot 10^{-216}:\\ \;\;\;\;x + t\_2\\ \mathbf{elif}\;y \leq 13600000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ x z) (* a (- 1.0 t))))
        (t_2 (* b (- (+ y t) 2.0)))
        (t_3 (- t_2 (* y z))))
   (if (<= y -6.5e+178)
     (* y (- b z))
     (if (<= y -1.65e+93)
       t_1
       (if (<= y -1.8e+64)
         t_3
         (if (<= y -1.95e-42)
           t_1
           (if (<= y -1.32e-216)
             (+ x t_2)
             (if (<= y 13600000000.0) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + z) + (a * (1.0 - t));
	double t_2 = b * ((y + t) - 2.0);
	double t_3 = t_2 - (y * z);
	double tmp;
	if (y <= -6.5e+178) {
		tmp = y * (b - z);
	} else if (y <= -1.65e+93) {
		tmp = t_1;
	} else if (y <= -1.8e+64) {
		tmp = t_3;
	} else if (y <= -1.95e-42) {
		tmp = t_1;
	} else if (y <= -1.32e-216) {
		tmp = x + t_2;
	} else if (y <= 13600000000.0) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (x + z) + (a * (1.0d0 - t))
    t_2 = b * ((y + t) - 2.0d0)
    t_3 = t_2 - (y * z)
    if (y <= (-6.5d+178)) then
        tmp = y * (b - z)
    else if (y <= (-1.65d+93)) then
        tmp = t_1
    else if (y <= (-1.8d+64)) then
        tmp = t_3
    else if (y <= (-1.95d-42)) then
        tmp = t_1
    else if (y <= (-1.32d-216)) then
        tmp = x + t_2
    else if (y <= 13600000000.0d0) then
        tmp = t_1
    else
        tmp = t_3
    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) + (a * (1.0 - t));
	double t_2 = b * ((y + t) - 2.0);
	double t_3 = t_2 - (y * z);
	double tmp;
	if (y <= -6.5e+178) {
		tmp = y * (b - z);
	} else if (y <= -1.65e+93) {
		tmp = t_1;
	} else if (y <= -1.8e+64) {
		tmp = t_3;
	} else if (y <= -1.95e-42) {
		tmp = t_1;
	} else if (y <= -1.32e-216) {
		tmp = x + t_2;
	} else if (y <= 13600000000.0) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + z) + (a * (1.0 - t))
	t_2 = b * ((y + t) - 2.0)
	t_3 = t_2 - (y * z)
	tmp = 0
	if y <= -6.5e+178:
		tmp = y * (b - z)
	elif y <= -1.65e+93:
		tmp = t_1
	elif y <= -1.8e+64:
		tmp = t_3
	elif y <= -1.95e-42:
		tmp = t_1
	elif y <= -1.32e-216:
		tmp = x + t_2
	elif y <= 13600000000.0:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + z) + Float64(a * Float64(1.0 - t)))
	t_2 = Float64(b * Float64(Float64(y + t) - 2.0))
	t_3 = Float64(t_2 - Float64(y * z))
	tmp = 0.0
	if (y <= -6.5e+178)
		tmp = Float64(y * Float64(b - z));
	elseif (y <= -1.65e+93)
		tmp = t_1;
	elseif (y <= -1.8e+64)
		tmp = t_3;
	elseif (y <= -1.95e-42)
		tmp = t_1;
	elseif (y <= -1.32e-216)
		tmp = Float64(x + t_2);
	elseif (y <= 13600000000.0)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + z) + (a * (1.0 - t));
	t_2 = b * ((y + t) - 2.0);
	t_3 = t_2 - (y * z);
	tmp = 0.0;
	if (y <= -6.5e+178)
		tmp = y * (b - z);
	elseif (y <= -1.65e+93)
		tmp = t_1;
	elseif (y <= -1.8e+64)
		tmp = t_3;
	elseif (y <= -1.95e-42)
		tmp = t_1;
	elseif (y <= -1.32e-216)
		tmp = x + t_2;
	elseif (y <= 13600000000.0)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + z), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 - N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+178], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.65e+93], t$95$1, If[LessEqual[y, -1.8e+64], t$95$3, If[LessEqual[y, -1.95e-42], t$95$1, If[LessEqual[y, -1.32e-216], N[(x + t$95$2), $MachinePrecision], If[LessEqual[y, 13600000000.0], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -1.8 \cdot 10^{+64}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;y \leq -1.32 \cdot 10^{-216}:\\
\;\;\;\;x + t\_2\\

\mathbf{elif}\;y \leq 13600000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.5000000000000005e178

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

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

    if -6.5000000000000005e178 < y < -1.65000000000000004e93 or -1.80000000000000007e64 < y < -1.9500000000000001e-42 or -1.31999999999999997e-216 < y < 1.36e10

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

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

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

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

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

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

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

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

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

    if -1.65000000000000004e93 < y < -1.80000000000000007e64 or 1.36e10 < y

    1. Initial program 98.5%

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

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

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

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

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

    if -1.9500000000000001e-42 < y < -1.31999999999999997e-216

    1. Initial program 99.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+178}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{+93}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{+64}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - y \cdot z\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{-42}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -1.32 \cdot 10^{-216}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq 13600000000:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - y \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 59.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(x + y \cdot b\right)\\ t_2 := x - z \cdot \left(y + -1\right)\\ t_3 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -5200:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-65}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-241}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-8}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+57}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+117}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (+ x (* y b))))
        (t_2 (- x (* z (+ y -1.0))))
        (t_3 (* t (- b a))))
   (if (<= t -5200.0)
     t_3
     (if (<= t -4.2e-65)
       t_1
       (if (<= t -5e-241)
         t_2
         (if (<= t 1.6e-8)
           t_1
           (if (<= t 3.6e+57)
             (+ x (* a (- 1.0 t)))
             (if (<= t 5.4e+117) t_2 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (x + (y * b));
	double t_2 = x - (z * (y + -1.0));
	double t_3 = t * (b - a);
	double tmp;
	if (t <= -5200.0) {
		tmp = t_3;
	} else if (t <= -4.2e-65) {
		tmp = t_1;
	} else if (t <= -5e-241) {
		tmp = t_2;
	} else if (t <= 1.6e-8) {
		tmp = t_1;
	} else if (t <= 3.6e+57) {
		tmp = x + (a * (1.0 - t));
	} else if (t <= 5.4e+117) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = a + (x + (y * b))
    t_2 = x - (z * (y + (-1.0d0)))
    t_3 = t * (b - a)
    if (t <= (-5200.0d0)) then
        tmp = t_3
    else if (t <= (-4.2d-65)) then
        tmp = t_1
    else if (t <= (-5d-241)) then
        tmp = t_2
    else if (t <= 1.6d-8) then
        tmp = t_1
    else if (t <= 3.6d+57) then
        tmp = x + (a * (1.0d0 - t))
    else if (t <= 5.4d+117) then
        tmp = t_2
    else
        tmp = t_3
    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 = x - (z * (y + -1.0));
	double t_3 = t * (b - a);
	double tmp;
	if (t <= -5200.0) {
		tmp = t_3;
	} else if (t <= -4.2e-65) {
		tmp = t_1;
	} else if (t <= -5e-241) {
		tmp = t_2;
	} else if (t <= 1.6e-8) {
		tmp = t_1;
	} else if (t <= 3.6e+57) {
		tmp = x + (a * (1.0 - t));
	} else if (t <= 5.4e+117) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (x + (y * b))
	t_2 = x - (z * (y + -1.0))
	t_3 = t * (b - a)
	tmp = 0
	if t <= -5200.0:
		tmp = t_3
	elif t <= -4.2e-65:
		tmp = t_1
	elif t <= -5e-241:
		tmp = t_2
	elif t <= 1.6e-8:
		tmp = t_1
	elif t <= 3.6e+57:
		tmp = x + (a * (1.0 - t))
	elif t <= 5.4e+117:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(x + Float64(y * b)))
	t_2 = Float64(x - Float64(z * Float64(y + -1.0)))
	t_3 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -5200.0)
		tmp = t_3;
	elseif (t <= -4.2e-65)
		tmp = t_1;
	elseif (t <= -5e-241)
		tmp = t_2;
	elseif (t <= 1.6e-8)
		tmp = t_1;
	elseif (t <= 3.6e+57)
		tmp = Float64(x + Float64(a * Float64(1.0 - t)));
	elseif (t <= 5.4e+117)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (x + (y * b));
	t_2 = x - (z * (y + -1.0));
	t_3 = t * (b - a);
	tmp = 0.0;
	if (t <= -5200.0)
		tmp = t_3;
	elseif (t <= -4.2e-65)
		tmp = t_1;
	elseif (t <= -5e-241)
		tmp = t_2;
	elseif (t <= 1.6e-8)
		tmp = t_1;
	elseif (t <= 3.6e+57)
		tmp = x + (a * (1.0 - t));
	elseif (t <= 5.4e+117)
		tmp = t_2;
	else
		tmp = t_3;
	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[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5200.0], t$95$3, If[LessEqual[t, -4.2e-65], t$95$1, If[LessEqual[t, -5e-241], t$95$2, If[LessEqual[t, 1.6e-8], t$95$1, If[LessEqual[t, 3.6e+57], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+117], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4.2 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -5 \cdot 10^{-241}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 5.4 \cdot 10^{+117}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5200 or 5.4000000000000005e117 < t

    1. Initial program 91.2%

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

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

    if -5200 < t < -4.20000000000000006e-65 or -4.9999999999999998e-241 < t < 1.6000000000000001e-8

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000006e-65 < t < -4.9999999999999998e-241 or 3.6000000000000002e57 < t < 5.4000000000000005e117

    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 z around inf 88.0%

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

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

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

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

    if 1.6000000000000001e-8 < t < 3.6000000000000002e57

    1. Initial program 99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5200:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-65}:\\ \;\;\;\;a + \left(x + y \cdot b\right)\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-241}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-8}:\\ \;\;\;\;a + \left(x + y \cdot b\right)\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+57}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+117}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 81.9% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;b \leq -1.45 \cdot 10^{-18}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 7 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -6.9999999999999997e90 or -2.24999999999999998e36 < b < -1.45e-18

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

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

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

    if -6.9999999999999997e90 < b < -2.24999999999999998e36 or -1.45e-18 < b < 6.9999999999999997e133

    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 z around inf 84.7%

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

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

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

    if 6.9999999999999997e133 < b

    1. Initial program 86.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 y around inf 73.0%

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + \left(y + \color{blue}{\left(-\frac{y \cdot z}{b}\right)}\right)\right) + \left(-2\right)\right) \]
      3. unsub-neg79.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7 \cdot 10^{+90}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{+36}:\\ \;\;\;\;\left(x - z \cdot \left(y + -1\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -1.45 \cdot 10^{-18}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+133}:\\ \;\;\;\;\left(x - z \cdot \left(y + -1\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(-2 + \left(t - \left(y \cdot \frac{z}{b} - y\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 81.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\ t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -7.6 \cdot 10^{+90}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -5.5 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -1.55 \cdot 10^{-18}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{+134}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(-2 + \left(t - \left(y \cdot \frac{z}{b} - y\right)\right)\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)))))
        (t_2 (+ x (* b (- (+ y t) 2.0)))))
   (if (<= b -7.6e+90)
     t_2
     (if (<= b -5.5e+36)
       t_1
       (if (<= b -1.55e-18)
         t_2
         (if (<= b 2.6e+134) t_1 (* b (+ -2.0 (- t (- (* y (/ z b)) y))))))))))
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)));
	double t_2 = x + (b * ((y + t) - 2.0));
	double tmp;
	if (b <= -7.6e+90) {
		tmp = t_2;
	} else if (b <= -5.5e+36) {
		tmp = t_1;
	} else if (b <= -1.55e-18) {
		tmp = t_2;
	} else if (b <= 2.6e+134) {
		tmp = t_1;
	} else {
		tmp = b * (-2.0 + (t - ((y * (z / b)) - y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + ((z * (1.0d0 - y)) + (a * (1.0d0 - t)))
    t_2 = x + (b * ((y + t) - 2.0d0))
    if (b <= (-7.6d+90)) then
        tmp = t_2
    else if (b <= (-5.5d+36)) then
        tmp = t_1
    else if (b <= (-1.55d-18)) then
        tmp = t_2
    else if (b <= 2.6d+134) then
        tmp = t_1
    else
        tmp = b * ((-2.0d0) + (t - ((y * (z / b)) - y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((z * (1.0 - y)) + (a * (1.0 - t)));
	double t_2 = x + (b * ((y + t) - 2.0));
	double tmp;
	if (b <= -7.6e+90) {
		tmp = t_2;
	} else if (b <= -5.5e+36) {
		tmp = t_1;
	} else if (b <= -1.55e-18) {
		tmp = t_2;
	} else if (b <= 2.6e+134) {
		tmp = t_1;
	} else {
		tmp = b * (-2.0 + (t - ((y * (z / b)) - y)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + ((z * (1.0 - y)) + (a * (1.0 - t)))
	t_2 = x + (b * ((y + t) - 2.0))
	tmp = 0
	if b <= -7.6e+90:
		tmp = t_2
	elif b <= -5.5e+36:
		tmp = t_1
	elif b <= -1.55e-18:
		tmp = t_2
	elif b <= 2.6e+134:
		tmp = t_1
	else:
		tmp = b * (-2.0 + (t - ((y * (z / b)) - y)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(Float64(z * Float64(1.0 - y)) + Float64(a * Float64(1.0 - t))))
	t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0)))
	tmp = 0.0
	if (b <= -7.6e+90)
		tmp = t_2;
	elseif (b <= -5.5e+36)
		tmp = t_1;
	elseif (b <= -1.55e-18)
		tmp = t_2;
	elseif (b <= 2.6e+134)
		tmp = t_1;
	else
		tmp = Float64(b * Float64(-2.0 + Float64(t - Float64(Float64(y * Float64(z / b)) - y))));
	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)));
	t_2 = x + (b * ((y + t) - 2.0));
	tmp = 0.0;
	if (b <= -7.6e+90)
		tmp = t_2;
	elseif (b <= -5.5e+36)
		tmp = t_1;
	elseif (b <= -1.55e-18)
		tmp = t_2;
	elseif (b <= 2.6e+134)
		tmp = t_1;
	else
		tmp = b * (-2.0 + (t - ((y * (z / b)) - y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.6e+90], t$95$2, If[LessEqual[b, -5.5e+36], t$95$1, If[LessEqual[b, -1.55e-18], t$95$2, If[LessEqual[b, 2.6e+134], t$95$1, N[(b * N[(-2.0 + N[(t - N[(N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq -1.55 \cdot 10^{-18}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -7.6000000000000002e90 or -5.5000000000000002e36 < b < -1.55000000000000003e-18

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

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

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

    if -7.6000000000000002e90 < b < -5.5000000000000002e36 or -1.55000000000000003e-18 < b < 2.6000000000000002e134

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

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

    if 2.6000000000000002e134 < b

    1. Initial program 86.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 y around inf 73.0%

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + \left(y + \color{blue}{\left(-\frac{y \cdot z}{b}\right)}\right)\right) + \left(-2\right)\right) \]
      3. unsub-neg79.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.6 \cdot 10^{+90}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -5.5 \cdot 10^{+36}:\\ \;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;b \leq -1.55 \cdot 10^{-18}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{+134}:\\ \;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(-2 + \left(t - \left(y \cdot \frac{z}{b} - y\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 82.0% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;b \leq 1.05 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.1500000000000001e89 or -4.1999999999999998e35 < b < -8.1999999999999997e-19

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

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

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

    if -2.1500000000000001e89 < b < -4.1999999999999998e35 or -8.1999999999999997e-19 < b < 1.05e134

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e134 < b

    1. Initial program 86.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 y around inf 73.0%

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + \left(y + \color{blue}{\left(-\frac{y \cdot z}{b}\right)}\right)\right) + \left(-2\right)\right) \]
      3. unsub-neg79.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.15 \cdot 10^{+89}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -4.2 \cdot 10^{+35}:\\ \;\;\;\;\left(a + \left(x - t \cdot a\right)\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -8.2 \cdot 10^{-19}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{+134}:\\ \;\;\;\;\left(a + \left(x - t \cdot a\right)\right) + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(-2 + \left(t - \left(y \cdot \frac{z}{b} - y\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 38.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -2.4 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -3 \cdot 10^{-255}:\\
\;\;\;\;z \cdot \left(-y\right)\\

\mathbf{elif}\;a \leq 6.8 \cdot 10^{-122}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 3 \cdot 10^{+21}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.6e-13 or 3e21 < a

    1. Initial program 92.9%

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

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

    if -2.6e-13 < a < -2.39999999999999997e-130 or -3.00000000000000002e-255 < a < 6.7999999999999996e-122

    1. Initial program 100.0%

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

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

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

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

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

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

    if -2.39999999999999997e-130 < a < -3.00000000000000002e-255

    1. Initial program 96.2%

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

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

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

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

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

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

    if 6.7999999999999996e-122 < a < 3e21

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{-13}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-130}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-255}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-122}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;a \leq 3 \cdot 10^{+21}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 33.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;y \leq -2.05 \cdot 10^{+180}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-241}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.28 \cdot 10^{+88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{+178}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \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))))
   (if (<= y -2.05e+180)
     (* y b)
     (if (<= y -9.2e-42)
       t_1
       (if (<= y -1.8e-241)
         (* t b)
         (if (<= y 1.28e+88) t_1 (if (<= y 8.8e+178) (* z (- y)) (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double tmp;
	if (y <= -2.05e+180) {
		tmp = y * b;
	} else if (y <= -9.2e-42) {
		tmp = t_1;
	} else if (y <= -1.8e-241) {
		tmp = t * b;
	} else if (y <= 1.28e+88) {
		tmp = t_1;
	} else if (y <= 8.8e+178) {
		tmp = z * -y;
	} 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 = a * (1.0d0 - t)
    if (y <= (-2.05d+180)) then
        tmp = y * b
    else if (y <= (-9.2d-42)) then
        tmp = t_1
    else if (y <= (-1.8d-241)) then
        tmp = t * b
    else if (y <= 1.28d+88) then
        tmp = t_1
    else if (y <= 8.8d+178) then
        tmp = z * -y
    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 tmp;
	if (y <= -2.05e+180) {
		tmp = y * b;
	} else if (y <= -9.2e-42) {
		tmp = t_1;
	} else if (y <= -1.8e-241) {
		tmp = t * b;
	} else if (y <= 1.28e+88) {
		tmp = t_1;
	} else if (y <= 8.8e+178) {
		tmp = z * -y;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	tmp = 0
	if y <= -2.05e+180:
		tmp = y * b
	elif y <= -9.2e-42:
		tmp = t_1
	elif y <= -1.8e-241:
		tmp = t * b
	elif y <= 1.28e+88:
		tmp = t_1
	elif y <= 8.8e+178:
		tmp = z * -y
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (y <= -2.05e+180)
		tmp = Float64(y * b);
	elseif (y <= -9.2e-42)
		tmp = t_1;
	elseif (y <= -1.8e-241)
		tmp = Float64(t * b);
	elseif (y <= 1.28e+88)
		tmp = t_1;
	elseif (y <= 8.8e+178)
		tmp = Float64(z * Float64(-y));
	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);
	tmp = 0.0;
	if (y <= -2.05e+180)
		tmp = y * b;
	elseif (y <= -9.2e-42)
		tmp = t_1;
	elseif (y <= -1.8e-241)
		tmp = t * b;
	elseif (y <= 1.28e+88)
		tmp = t_1;
	elseif (y <= 8.8e+178)
		tmp = z * -y;
	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]}, If[LessEqual[y, -2.05e+180], N[(y * b), $MachinePrecision], If[LessEqual[y, -9.2e-42], t$95$1, If[LessEqual[y, -1.8e-241], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.28e+88], t$95$1, If[LessEqual[y, 8.8e+178], N[(z * (-y)), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -1.8 \cdot 10^{-241}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 1.28 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.05e180 or 8.79999999999999989e178 < y

    1. Initial program 94.6%

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

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

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

    if -2.05e180 < y < -9.20000000000000015e-42 or -1.7999999999999999e-241 < y < 1.28e88

    1. Initial program 95.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.4%

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

    if -9.20000000000000015e-42 < y < -1.7999999999999999e-241

    1. Initial program 100.0%

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

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

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

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

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

    if 1.28e88 < y < 8.79999999999999989e178

    1. Initial program 96.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.05 \cdot 10^{+180}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-42}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-241}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.28 \cdot 10^{+88}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{+178}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 62.5% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 3.5 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.5000000000000005e178 or 3.5e20 < y

    1. Initial program 95.7%

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

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

    if -6.5000000000000005e178 < y < -2.69999999999999999e-42 or -1.31999999999999997e-216 < y < 3.5e20

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

    if -2.69999999999999999e-42 < y < -1.31999999999999997e-216

    1. Initial program 99.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+178}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-42}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -1.32 \cdot 10^{-216}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+20}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 61.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.89999999999999984e62

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

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

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

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

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

    if -2.89999999999999984e62 < z < 3.79999999999999995e-131 or 2.74999999999999992e32 < z < 3.6000000000000003e69

    1. Initial program 99.1%

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

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

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

    if 3.79999999999999995e-131 < z < 2.74999999999999992e32

    1. Initial program 97.1%

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

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

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

    if 3.6000000000000003e69 < z

    1. Initial program 93.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+62}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-131}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{+32}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+69}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(1 + \frac{x}{z}\right) - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 86.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+59} \lor \neg \left(z \leq 1.7 \cdot 10^{+69}\right):\\ \;\;\;\;z \cdot \left(\left(1 + \frac{x}{z}\right) + \left(\frac{t\_1}{z} - 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 -3.4e+59) (not (<= z 1.7e+69)))
     (* z (+ (+ 1.0 (/ x z)) (- (/ t_1 z) 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 <= -3.4e+59) || !(z <= 1.7e+69)) {
		tmp = z * ((1.0 + (x / z)) + ((t_1 / z) - 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 <= (-3.4d+59)) .or. (.not. (z <= 1.7d+69))) then
        tmp = z * ((1.0d0 + (x / z)) + ((t_1 / z) - 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 <= -3.4e+59) || !(z <= 1.7e+69)) {
		tmp = z * ((1.0 + (x / z)) + ((t_1 / z) - 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 <= -3.4e+59) or not (z <= 1.7e+69):
		tmp = z * ((1.0 + (x / z)) + ((t_1 / z) - 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 <= -3.4e+59) || !(z <= 1.7e+69))
		tmp = Float64(z * Float64(Float64(1.0 + Float64(x / z)) + Float64(Float64(t_1 / z) - 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 <= -3.4e+59) || ~((z <= 1.7e+69)))
		tmp = z * ((1.0 + (x / z)) + ((t_1 / z) - 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, -3.4e+59], N[Not[LessEqual[z, 1.7e+69]], $MachinePrecision]], N[(z * N[(N[(1.0 + N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 / z), $MachinePrecision] - y), $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 -3.4 \cdot 10^{+59} \lor \neg \left(z \leq 1.7 \cdot 10^{+69}\right):\\
\;\;\;\;z \cdot \left(\left(1 + \frac{x}{z}\right) + \left(\frac{t\_1}{z} - 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 < -3.40000000000000006e59 or 1.69999999999999993e69 < z

    1. Initial program 92.4%

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

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

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

    if -3.40000000000000006e59 < z < 1.69999999999999993e69

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+59} \lor \neg \left(z \leq 1.7 \cdot 10^{+69}\right):\\ \;\;\;\;z \cdot \left(\left(1 + \frac{x}{z}\right) + \left(\frac{a \cdot \left(1 - t\right)}{z} - 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 18: 50.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.5 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-305}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{-204}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+17}:\\ \;\;\;\;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.5e+54)
     t_1
     (if (<= y 8.8e-305)
       (* t (- b a))
       (if (<= y 2.55e-204)
         (+ x a)
         (if (<= y 1.25e+17) (* 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.5e+54) {
		tmp = t_1;
	} else if (y <= 8.8e-305) {
		tmp = t * (b - a);
	} else if (y <= 2.55e-204) {
		tmp = x + a;
	} else if (y <= 1.25e+17) {
		tmp = 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.5d+54)) then
        tmp = t_1
    else if (y <= 8.8d-305) then
        tmp = t * (b - a)
    else if (y <= 2.55d-204) then
        tmp = x + a
    else if (y <= 1.25d+17) then
        tmp = 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.5e+54) {
		tmp = t_1;
	} else if (y <= 8.8e-305) {
		tmp = t * (b - a);
	} else if (y <= 2.55e-204) {
		tmp = x + a;
	} else if (y <= 1.25e+17) {
		tmp = 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.5e+54:
		tmp = t_1
	elif y <= 8.8e-305:
		tmp = t * (b - a)
	elif y <= 2.55e-204:
		tmp = x + a
	elif y <= 1.25e+17:
		tmp = 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.5e+54)
		tmp = t_1;
	elseif (y <= 8.8e-305)
		tmp = Float64(t * Float64(b - a));
	elseif (y <= 2.55e-204)
		tmp = Float64(x + a);
	elseif (y <= 1.25e+17)
		tmp = 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.5e+54)
		tmp = t_1;
	elseif (y <= 8.8e-305)
		tmp = t * (b - a);
	elseif (y <= 2.55e-204)
		tmp = x + a;
	elseif (y <= 1.25e+17)
		tmp = 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.5e+54], t$95$1, If[LessEqual[y, 8.8e-305], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.55e-204], N[(x + a), $MachinePrecision], If[LessEqual[y, 1.25e+17], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq 1.25 \cdot 10^{+17}:\\
\;\;\;\;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.4999999999999999e54 or 1.25e17 < y

    1. Initial program 94.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 y around inf 67.9%

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

    if -1.4999999999999999e54 < y < 8.79999999999999987e-305

    1. Initial program 98.5%

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

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

    if 8.79999999999999987e-305 < y < 2.55000000000000014e-204

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

    if 2.55000000000000014e-204 < y < 1.25e17

    1. Initial program 97.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+54}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-305}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{-204}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+17}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 49.2% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-308}:\\
\;\;\;\;y \cdot b\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5200 or 8e8 < t

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

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

    if -5200 < t < -2.3000000000000001e-199 or 2.6e-308 < t < 8e8

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -2.3000000000000001e-199 < t < 2.6e-308

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5200:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-199}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-308}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 800000000:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 86.0% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.2000000000000003e65 < z < 5.0000000000000004e68

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

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

    if 5.0000000000000004e68 < z

    1. Initial program 93.9%

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

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

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

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

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

Alternative 21: 36.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := -t \cdot a\\
\mathbf{if}\;t \leq -5200:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.28 \cdot 10^{-306}:\\
\;\;\;\;y \cdot b\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5200 or 5.5e10 < t

    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 z around inf 80.3%

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

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

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

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

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-rgt-neg-in46.0%

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

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

    if -5200 < t < -9.99999999999999982e-200 or 1.28000000000000004e-306 < t < 5.5e10

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -9.99999999999999982e-200 < t < 1.28000000000000004e-306

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5200:\\ \;\;\;\;-t \cdot a\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-199}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.28 \cdot 10^{-306}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 55000000000:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;-t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 32.2% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq -3.4 \cdot 10^{-282}:\\
\;\;\;\;z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.60000000000000002e76 or 1.2e20 < y

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

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

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

    if -4.60000000000000002e76 < y < -3.3e-128 or -3.39999999999999999e-282 < y < 1.2e20

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

    if -3.3e-128 < y < -3.39999999999999999e-282

    1. Initial program 99.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+76}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-128}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-282}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+20}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 26.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-128}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.36 \cdot 10^{-8}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.2000000000000001e64 or 1.3599999999999999e-8 < y

    1. Initial program 95.1%

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

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

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

    if -4.2000000000000001e64 < y < -4.2000000000000002e-128

    1. Initial program 94.2%

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

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

    if -4.2000000000000002e-128 < y < 1.3599999999999999e-8

    1. Initial program 97.9%

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

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

      \[\leadsto \color{blue}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification32.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+64}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-128}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.36 \cdot 10^{-8}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 20.9% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+160}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5e74 or 1.45e160 < z

    1. Initial program 92.1%

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

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

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

    if -4.5e74 < z < 1.45e160

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

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

Alternative 25: 21.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1150000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 5.7 \cdot 10^{+40}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.15e12 or 5.6999999999999998e40 < x

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

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

    if -1.15e12 < x < 5.6999999999999998e40

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

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

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

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

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

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

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

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

Alternative 26: 11.6% 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 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 71.9%

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

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

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

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

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

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

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

Reproduce

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