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

Percentage Accurate: 95.7% → 97.6%
Time: 15.3s
Alternatives: 23
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\left(\color{blue}{\left(y + t\right)} - 2\right) \cdot \frac{b}{z} - y\right) \]
      7. associate-+r-71.4%

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

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

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

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

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

Alternative 2: 24.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-a\right)\\ t_2 := y \cdot \left(-z\right)\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+169}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{+71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -0.0098:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-262}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{-281}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-239}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-217}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-11}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+220}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (- a))) (t_2 (* y (- z))))
   (if (<= z -3.5e+169)
     t_2
     (if (<= z -6.6e+71)
       t_1
       (if (<= z -0.0098)
         (* y b)
         (if (<= z -7e-262)
           (* t b)
           (if (<= z 1.22e-281)
             (* y b)
             (if (<= z 1.2e-239)
               t_1
               (if (<= z 7.2e-217)
                 x
                 (if (<= z 7.5e-11)
                   (* t b)
                   (if (<= z 3.2e+61)
                     t_1
                     (if (<= z 1.12e+220) t_2 z))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * -a;
	double t_2 = y * -z;
	double tmp;
	if (z <= -3.5e+169) {
		tmp = t_2;
	} else if (z <= -6.6e+71) {
		tmp = t_1;
	} else if (z <= -0.0098) {
		tmp = y * b;
	} else if (z <= -7e-262) {
		tmp = t * b;
	} else if (z <= 1.22e-281) {
		tmp = y * b;
	} else if (z <= 1.2e-239) {
		tmp = t_1;
	} else if (z <= 7.2e-217) {
		tmp = x;
	} else if (z <= 7.5e-11) {
		tmp = t * b;
	} else if (z <= 3.2e+61) {
		tmp = t_1;
	} else if (z <= 1.12e+220) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * -a
    t_2 = y * -z
    if (z <= (-3.5d+169)) then
        tmp = t_2
    else if (z <= (-6.6d+71)) then
        tmp = t_1
    else if (z <= (-0.0098d0)) then
        tmp = y * b
    else if (z <= (-7d-262)) then
        tmp = t * b
    else if (z <= 1.22d-281) then
        tmp = y * b
    else if (z <= 1.2d-239) then
        tmp = t_1
    else if (z <= 7.2d-217) then
        tmp = x
    else if (z <= 7.5d-11) then
        tmp = t * b
    else if (z <= 3.2d+61) then
        tmp = t_1
    else if (z <= 1.12d+220) then
        tmp = t_2
    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 t_1 = t * -a;
	double t_2 = y * -z;
	double tmp;
	if (z <= -3.5e+169) {
		tmp = t_2;
	} else if (z <= -6.6e+71) {
		tmp = t_1;
	} else if (z <= -0.0098) {
		tmp = y * b;
	} else if (z <= -7e-262) {
		tmp = t * b;
	} else if (z <= 1.22e-281) {
		tmp = y * b;
	} else if (z <= 1.2e-239) {
		tmp = t_1;
	} else if (z <= 7.2e-217) {
		tmp = x;
	} else if (z <= 7.5e-11) {
		tmp = t * b;
	} else if (z <= 3.2e+61) {
		tmp = t_1;
	} else if (z <= 1.12e+220) {
		tmp = t_2;
	} else {
		tmp = z;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * -a
	t_2 = y * -z
	tmp = 0
	if z <= -3.5e+169:
		tmp = t_2
	elif z <= -6.6e+71:
		tmp = t_1
	elif z <= -0.0098:
		tmp = y * b
	elif z <= -7e-262:
		tmp = t * b
	elif z <= 1.22e-281:
		tmp = y * b
	elif z <= 1.2e-239:
		tmp = t_1
	elif z <= 7.2e-217:
		tmp = x
	elif z <= 7.5e-11:
		tmp = t * b
	elif z <= 3.2e+61:
		tmp = t_1
	elif z <= 1.12e+220:
		tmp = t_2
	else:
		tmp = z
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(-a))
	t_2 = Float64(y * Float64(-z))
	tmp = 0.0
	if (z <= -3.5e+169)
		tmp = t_2;
	elseif (z <= -6.6e+71)
		tmp = t_1;
	elseif (z <= -0.0098)
		tmp = Float64(y * b);
	elseif (z <= -7e-262)
		tmp = Float64(t * b);
	elseif (z <= 1.22e-281)
		tmp = Float64(y * b);
	elseif (z <= 1.2e-239)
		tmp = t_1;
	elseif (z <= 7.2e-217)
		tmp = x;
	elseif (z <= 7.5e-11)
		tmp = Float64(t * b);
	elseif (z <= 3.2e+61)
		tmp = t_1;
	elseif (z <= 1.12e+220)
		tmp = t_2;
	else
		tmp = z;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * -a;
	t_2 = y * -z;
	tmp = 0.0;
	if (z <= -3.5e+169)
		tmp = t_2;
	elseif (z <= -6.6e+71)
		tmp = t_1;
	elseif (z <= -0.0098)
		tmp = y * b;
	elseif (z <= -7e-262)
		tmp = t * b;
	elseif (z <= 1.22e-281)
		tmp = y * b;
	elseif (z <= 1.2e-239)
		tmp = t_1;
	elseif (z <= 7.2e-217)
		tmp = x;
	elseif (z <= 7.5e-11)
		tmp = t * b;
	elseif (z <= 3.2e+61)
		tmp = t_1;
	elseif (z <= 1.12e+220)
		tmp = t_2;
	else
		tmp = z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * (-a)), $MachinePrecision]}, Block[{t$95$2 = N[(y * (-z)), $MachinePrecision]}, If[LessEqual[z, -3.5e+169], t$95$2, If[LessEqual[z, -6.6e+71], t$95$1, If[LessEqual[z, -0.0098], N[(y * b), $MachinePrecision], If[LessEqual[z, -7e-262], N[(t * b), $MachinePrecision], If[LessEqual[z, 1.22e-281], N[(y * b), $MachinePrecision], If[LessEqual[z, 1.2e-239], t$95$1, If[LessEqual[z, 7.2e-217], x, If[LessEqual[z, 7.5e-11], N[(t * b), $MachinePrecision], If[LessEqual[z, 3.2e+61], t$95$1, If[LessEqual[z, 1.12e+220], t$95$2, z]]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -0.0098:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;z \leq -7 \cdot 10^{-262}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;z \leq 1.22 \cdot 10^{-281}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-239}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{-217}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-11}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+220}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -3.50000000000000019e169 or 3.1999999999999998e61 < z < 1.12000000000000006e220

    1. Initial program 88.0%

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

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

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

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

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

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

    if -3.50000000000000019e169 < z < -6.5999999999999996e71 or 1.21999999999999996e-281 < z < 1.19999999999999996e-239 or 7.5e-11 < z < 3.1999999999999998e61

    1. Initial program 93.4%

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

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

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

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

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

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

    if -6.5999999999999996e71 < z < -0.0097999999999999997 or -7.00000000000000023e-262 < z < 1.21999999999999996e-281

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

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

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

    if -0.0097999999999999997 < z < -7.00000000000000023e-262 or 7.19999999999999962e-217 < z < 7.5e-11

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

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

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

    if 1.19999999999999996e-239 < z < 7.19999999999999962e-217

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

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

    if 1.12000000000000006e220 < z

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+169}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{+71}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq -0.0098:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-262}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{-281}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-239}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-217}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-11}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+61}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+220}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 98.9% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y + \left(t + -2\right)\right) \cdot \frac{b}{z} - y\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 y around inf 50.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-neg50.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\left(\color{blue}{\left(y + t\right)} - 2\right) \cdot \frac{b}{z} - y\right) \]
      7. associate-+r-71.4%

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

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

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

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

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

Alternative 4: 50.0% accurate, 0.6× 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 -4.8 \cdot 10^{+63}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-113}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{-166}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-307}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{-275}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+22}:\\ \;\;\;\;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 -4.8e+63)
     t_2
     (if (<= t -2.8e-113)
       t_1
       (if (<= t -5.4e-166)
         z
         (if (<= t -1.05e-307)
           t_1
           (if (<= t 2.65e-275) a (if (<= t 5.2e+22) 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 <= -4.8e+63) {
		tmp = t_2;
	} else if (t <= -2.8e-113) {
		tmp = t_1;
	} else if (t <= -5.4e-166) {
		tmp = z;
	} else if (t <= -1.05e-307) {
		tmp = t_1;
	} else if (t <= 2.65e-275) {
		tmp = a;
	} else if (t <= 5.2e+22) {
		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 <= (-4.8d+63)) then
        tmp = t_2
    else if (t <= (-2.8d-113)) then
        tmp = t_1
    else if (t <= (-5.4d-166)) then
        tmp = z
    else if (t <= (-1.05d-307)) then
        tmp = t_1
    else if (t <= 2.65d-275) then
        tmp = a
    else if (t <= 5.2d+22) 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 <= -4.8e+63) {
		tmp = t_2;
	} else if (t <= -2.8e-113) {
		tmp = t_1;
	} else if (t <= -5.4e-166) {
		tmp = z;
	} else if (t <= -1.05e-307) {
		tmp = t_1;
	} else if (t <= 2.65e-275) {
		tmp = a;
	} else if (t <= 5.2e+22) {
		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 <= -4.8e+63:
		tmp = t_2
	elif t <= -2.8e-113:
		tmp = t_1
	elif t <= -5.4e-166:
		tmp = z
	elif t <= -1.05e-307:
		tmp = t_1
	elif t <= 2.65e-275:
		tmp = a
	elif t <= 5.2e+22:
		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 <= -4.8e+63)
		tmp = t_2;
	elseif (t <= -2.8e-113)
		tmp = t_1;
	elseif (t <= -5.4e-166)
		tmp = z;
	elseif (t <= -1.05e-307)
		tmp = t_1;
	elseif (t <= 2.65e-275)
		tmp = a;
	elseif (t <= 5.2e+22)
		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 <= -4.8e+63)
		tmp = t_2;
	elseif (t <= -2.8e-113)
		tmp = t_1;
	elseif (t <= -5.4e-166)
		tmp = z;
	elseif (t <= -1.05e-307)
		tmp = t_1;
	elseif (t <= 2.65e-275)
		tmp = a;
	elseif (t <= 5.2e+22)
		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, -4.8e+63], t$95$2, If[LessEqual[t, -2.8e-113], t$95$1, If[LessEqual[t, -5.4e-166], z, If[LessEqual[t, -1.05e-307], t$95$1, If[LessEqual[t, 2.65e-275], a, If[LessEqual[t, 5.2e+22], 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 -4.8 \cdot 10^{+63}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq -5.4 \cdot 10^{-166}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-307}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.65 \cdot 10^{-275}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.8e63 or 5.2e22 < t

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

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

    if -4.8e63 < t < -2.8e-113 or -5.40000000000000013e-166 < t < -1.0500000000000001e-307 or 2.64999999999999993e-275 < t < 5.2e22

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

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

    if -2.8e-113 < t < -5.40000000000000013e-166

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

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

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

    if -1.0500000000000001e-307 < t < 2.64999999999999993e-275

    1. Initial program 100.0%

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

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

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

Alternative 5: 61.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq -2.65 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 4.5 \cdot 10^{-255}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 4.6 \cdot 10^{-162}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 8.5 \cdot 10^{+14}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.34999999999999996e103 or 8.5e14 < b

    1. Initial program 93.7%

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

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

    if -1.34999999999999996e103 < b < -2.64999999999999984e-273 or 4.49999999999999979e-255 < b < 4.5999999999999996e-162

    1. Initial program 94.1%

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

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

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

    if -2.64999999999999984e-273 < b < 4.49999999999999979e-255 or 4.5999999999999996e-162 < b < 8.5e14

    1. Initial program 97.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.35 \cdot 10^{+103}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -2.65 \cdot 10^{-273}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{-255}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{-162}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{+14}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 60.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq -8200000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -9 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq -6 \cdot 10^{-50}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.39999999999999988e101 or -8.2e12 < b < -9e-13 or 1.12e14 < b

    1. Initial program 94.1%

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

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

    if -2.39999999999999988e101 < b < -8.2e12 or -5.99999999999999981e-50 < b < 1.12e14

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

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

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

    if -9e-13 < b < -5.99999999999999981e-50

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.4 \cdot 10^{+101}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -8200000000000:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -9 \cdot 10^{-13}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -6 \cdot 10^{-50}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.12 \cdot 10^{+14}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 48.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -4.3 \cdot 10^{-166}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.0999999999999999e64 or 6.2e19 < t

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

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

    if -3.0999999999999999e64 < t < -4.3000000000000001e-166 or -5.8e-280 < t < 1.35e-244

    1. Initial program 95.0%

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

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

    if -4.3000000000000001e-166 < t < -5.8e-280

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

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

    if 1.35e-244 < t < 6.2e19

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

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

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

Alternative 8: 33.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -6 \cdot 10^{-111}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.55 \cdot 10^{-236}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 1.8 \cdot 10^{-294}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+63}:\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.7999999999999999e130 or 2.6000000000000001e63 < a

    1. Initial program 86.6%

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

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

    if -2.7999999999999999e130 < a < -6.00000000000000016e-111 or -1.5499999999999999e-236 < a < 1.8000000000000001e-294

    1. Initial program 98.4%

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

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

    if -6.00000000000000016e-111 < a < -1.5499999999999999e-236

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

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

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

    if 1.8000000000000001e-294 < a < 2.6000000000000001e63

    1. Initial program 98.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+130}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-111}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-236}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+63}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 61.0% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.2999999999999999e174 or 1.40000000000000012e64 < z

    1. Initial program 90.3%

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

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

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

    if -1.2999999999999999e174 < z < -3.79999999999999997e80 or 7e5 < z < 1.40000000000000012e64

    1. Initial program 94.8%

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

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

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

    if -3.79999999999999997e80 < z < 7e5

    1. Initial program 97.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+174}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{+80}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;z \leq 700000:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+64}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 47.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z - y \cdot z\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+174}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -9 \cdot 10^{+75}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;z \leq 5400000:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+64}:\\ \;\;\;\;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 (- z (* y z))))
   (if (<= z -1.3e+174)
     t_1
     (if (<= z -9e+75)
       (- a (* t a))
       (if (<= z 5400000.0)
         (* b (- (+ y t) 2.0))
         (if (<= z 2.4e+64) (* a (- 1.0 t)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z - (y * z);
	double tmp;
	if (z <= -1.3e+174) {
		tmp = t_1;
	} else if (z <= -9e+75) {
		tmp = a - (t * a);
	} else if (z <= 5400000.0) {
		tmp = b * ((y + t) - 2.0);
	} else if (z <= 2.4e+64) {
		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 = z - (y * z)
    if (z <= (-1.3d+174)) then
        tmp = t_1
    else if (z <= (-9d+75)) then
        tmp = a - (t * a)
    else if (z <= 5400000.0d0) then
        tmp = b * ((y + t) - 2.0d0)
    else if (z <= 2.4d+64) 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 = z - (y * z);
	double tmp;
	if (z <= -1.3e+174) {
		tmp = t_1;
	} else if (z <= -9e+75) {
		tmp = a - (t * a);
	} else if (z <= 5400000.0) {
		tmp = b * ((y + t) - 2.0);
	} else if (z <= 2.4e+64) {
		tmp = a * (1.0 - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z - (y * z)
	tmp = 0
	if z <= -1.3e+174:
		tmp = t_1
	elif z <= -9e+75:
		tmp = a - (t * a)
	elif z <= 5400000.0:
		tmp = b * ((y + t) - 2.0)
	elif z <= 2.4e+64:
		tmp = a * (1.0 - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z - Float64(y * z))
	tmp = 0.0
	if (z <= -1.3e+174)
		tmp = t_1;
	elseif (z <= -9e+75)
		tmp = Float64(a - Float64(t * a));
	elseif (z <= 5400000.0)
		tmp = Float64(b * Float64(Float64(y + t) - 2.0));
	elseif (z <= 2.4e+64)
		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 = z - (y * z);
	tmp = 0.0;
	if (z <= -1.3e+174)
		tmp = t_1;
	elseif (z <= -9e+75)
		tmp = a - (t * a);
	elseif (z <= 5400000.0)
		tmp = b * ((y + t) - 2.0);
	elseif (z <= 2.4e+64)
		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[(z - N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+174], t$95$1, If[LessEqual[z, -9e+75], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5400000.0], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+64], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z - y \cdot z\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.2999999999999999e174 or 2.39999999999999999e64 < z

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

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

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

    if -1.2999999999999999e174 < z < -9.0000000000000007e75

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

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

        \[\leadsto a \cdot \color{blue}{\left(1 + \left(-t\right)\right)} \]
      2. distribute-rgt-in46.9%

        \[\leadsto \color{blue}{1 \cdot a + \left(-t\right) \cdot a} \]
      3. *-un-lft-identity46.9%

        \[\leadsto \color{blue}{a} + \left(-t\right) \cdot a \]
    5. Applied egg-rr46.9%

      \[\leadsto \color{blue}{a + \left(-t\right) \cdot a} \]
    6. Step-by-step derivation
      1. distribute-lft-neg-out46.9%

        \[\leadsto a + \color{blue}{\left(-t \cdot a\right)} \]
      2. unsub-neg46.9%

        \[\leadsto \color{blue}{a - t \cdot a} \]
      3. *-commutative46.9%

        \[\leadsto a - \color{blue}{a \cdot t} \]
    7. Applied egg-rr46.9%

      \[\leadsto \color{blue}{a - a \cdot t} \]

    if -9.0000000000000007e75 < z < 5.4e6

    1. Initial program 97.0%

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

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

    if 5.4e6 < z < 2.39999999999999999e64

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+174}:\\ \;\;\;\;z - y \cdot z\\ \mathbf{elif}\;z \leq -9 \cdot 10^{+75}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;z \leq 5400000:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+64}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;z - y \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 47.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(1 - y\right)\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+174}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{+80}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;z \leq 3300000:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+64}:\\ \;\;\;\;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 (* z (- 1.0 y))))
   (if (<= z -1.3e+174)
     t_1
     (if (<= z -7.5e+80)
       (- a (* t a))
       (if (<= z 3300000.0)
         (* b (- (+ y t) 2.0))
         (if (<= z 1.2e+64) (* a (- 1.0 t)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (1.0 - y);
	double tmp;
	if (z <= -1.3e+174) {
		tmp = t_1;
	} else if (z <= -7.5e+80) {
		tmp = a - (t * a);
	} else if (z <= 3300000.0) {
		tmp = b * ((y + t) - 2.0);
	} else if (z <= 1.2e+64) {
		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 = z * (1.0d0 - y)
    if (z <= (-1.3d+174)) then
        tmp = t_1
    else if (z <= (-7.5d+80)) then
        tmp = a - (t * a)
    else if (z <= 3300000.0d0) then
        tmp = b * ((y + t) - 2.0d0)
    else if (z <= 1.2d+64) 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 = z * (1.0 - y);
	double tmp;
	if (z <= -1.3e+174) {
		tmp = t_1;
	} else if (z <= -7.5e+80) {
		tmp = a - (t * a);
	} else if (z <= 3300000.0) {
		tmp = b * ((y + t) - 2.0);
	} else if (z <= 1.2e+64) {
		tmp = a * (1.0 - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (1.0 - y)
	tmp = 0
	if z <= -1.3e+174:
		tmp = t_1
	elif z <= -7.5e+80:
		tmp = a - (t * a)
	elif z <= 3300000.0:
		tmp = b * ((y + t) - 2.0)
	elif z <= 1.2e+64:
		tmp = a * (1.0 - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(1.0 - y))
	tmp = 0.0
	if (z <= -1.3e+174)
		tmp = t_1;
	elseif (z <= -7.5e+80)
		tmp = Float64(a - Float64(t * a));
	elseif (z <= 3300000.0)
		tmp = Float64(b * Float64(Float64(y + t) - 2.0));
	elseif (z <= 1.2e+64)
		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 = z * (1.0 - y);
	tmp = 0.0;
	if (z <= -1.3e+174)
		tmp = t_1;
	elseif (z <= -7.5e+80)
		tmp = a - (t * a);
	elseif (z <= 3300000.0)
		tmp = b * ((y + t) - 2.0);
	elseif (z <= 1.2e+64)
		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[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+174], t$95$1, If[LessEqual[z, -7.5e+80], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3300000.0], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+64], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -7.5 \cdot 10^{+80}:\\
\;\;\;\;a - t \cdot a\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.2999999999999999e174 or 1.2e64 < z

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

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

    if -1.2999999999999999e174 < z < -7.49999999999999994e80

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

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

        \[\leadsto a \cdot \color{blue}{\left(1 + \left(-t\right)\right)} \]
      2. distribute-rgt-in46.9%

        \[\leadsto \color{blue}{1 \cdot a + \left(-t\right) \cdot a} \]
      3. *-un-lft-identity46.9%

        \[\leadsto \color{blue}{a} + \left(-t\right) \cdot a \]
    5. Applied egg-rr46.9%

      \[\leadsto \color{blue}{a + \left(-t\right) \cdot a} \]
    6. Step-by-step derivation
      1. distribute-lft-neg-out46.9%

        \[\leadsto a + \color{blue}{\left(-t \cdot a\right)} \]
      2. unsub-neg46.9%

        \[\leadsto \color{blue}{a - t \cdot a} \]
      3. *-commutative46.9%

        \[\leadsto a - \color{blue}{a \cdot t} \]
    7. Applied egg-rr46.9%

      \[\leadsto \color{blue}{a - a \cdot t} \]

    if -7.49999999999999994e80 < z < 3.3e6

    1. Initial program 97.0%

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

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

    if 3.3e6 < z < 1.2e64

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+174}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{+80}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;z \leq 3300000:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+64}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 48.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-307}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-252}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 470000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.2e7 or 4.7e5 < t

    1. Initial program 90.0%

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

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

    if -3.2e7 < t < -1.0500000000000001e-307 or 1.6000000000000001e-252 < t < 4.7e5

    1. Initial program 99.1%

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

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

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

    if -1.0500000000000001e-307 < t < 1.6000000000000001e-252

    1. Initial program 93.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.5%

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

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

Alternative 13: 39.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq -265000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -2.6 \cdot 10^{-46}:\\
\;\;\;\;y \cdot \left(-z\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.09999999999999999e101 or 5.5000000000000001e60 < b

    1. Initial program 93.3%

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

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

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

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

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

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

    if -3.09999999999999999e101 < b < -2.65e11 or -2.6000000000000002e-46 < b < 5.5000000000000001e60

    1. Initial program 94.9%

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

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

    if -2.65e11 < b < -2.6000000000000002e-46

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.1 \cdot 10^{+101}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq -265000000000:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -2.6 \cdot 10^{-46}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{+60}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 85.9% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.89999999999999999e134

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

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

      \[\leadsto \left(x + \color{blue}{-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*81.5%

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

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

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

    if -1.89999999999999999e134 < a < 1.30000000000000006e66

    1. Initial program 98.8%

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

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

    if 1.30000000000000006e66 < a

    1. Initial program 83.3%

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

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

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

Alternative 15: 85.9% accurate, 0.8× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 + \left(x + t\_2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.09999999999999982e134

    1. Initial program 91.4%

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

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

    if -3.09999999999999982e134 < a < 2.3e68

    1. Initial program 98.8%

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

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

    if 2.3e68 < a

    1. Initial program 83.3%

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

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

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

Alternative 16: 82.3% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 85.0%

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

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

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

    if -2.2999999999999999e214 < z < 1.64999999999999999e-27

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

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

    if 1.64999999999999999e-27 < z

    1. Initial program 93.5%

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

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

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

Alternative 17: 25.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-143}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-251}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 7 \cdot 10^{+61}:\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.50000000000000005e63 or 7.00000000000000036e61 < t

    1. Initial program 89.6%

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

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

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

    if -2.50000000000000005e63 < t < -5.50000000000000041e-143

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

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

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

    if -5.50000000000000041e-143 < t < 2.5999999999999999e-251

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

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

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

    if 2.5999999999999999e-251 < t < 7.00000000000000036e61

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+63}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-143}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-251}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+61}:\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 25.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -2.1 \cdot 10^{-143}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-275}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 0.19:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.7499999999999999e64 or 0.19 < t

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

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

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

    if -1.7499999999999999e64 < t < -2.1000000000000001e-143

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

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

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

    if -2.1000000000000001e-143 < t < 4.79999999999999981e-275

    1. Initial program 100.0%

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

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

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

    if 4.79999999999999981e-275 < t < 0.19

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{+64}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-143}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-275}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 0.19:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 85.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.6 \cdot 10^{+101} \lor \neg \left(b \leq 2.5 \cdot 10^{+66}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) + \left(x + a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7.5999999999999996e101 or 2.49999999999999996e66 < b

    1. Initial program 93.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 84.6%

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

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

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

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

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

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

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

    if -7.5999999999999996e101 < b < 2.49999999999999996e66

    1. Initial program 95.3%

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

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

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

Alternative 20: 67.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+210}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\

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

\mathbf{else}:\\
\;\;\;\;z - y \cdot z\\


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

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

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

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

    if -1.4000000000000001e210 < z < 7.2000000000000002e138

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

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

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

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

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

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

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

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

    if 7.2000000000000002e138 < z

    1. Initial program 94.4%

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

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

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

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

Alternative 21: 21.1% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 4.3 \cdot 10^{+52}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.5999999999999995e98 or 4.3e52 < x

    1. Initial program 95.0%

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

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

    if -9.5999999999999995e98 < x < 4.3e52

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

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

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

Alternative 22: 20.8% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.2999999999999999e99 or 3.99999999999999978e58 < x

    1. Initial program 94.8%

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

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

    if -3.2999999999999999e99 < x < 3.99999999999999978e58

    1. Initial program 94.3%

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

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

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

Alternative 23: 11.1% accurate, 21.0× speedup?

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

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

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

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

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

Reproduce

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