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

Percentage Accurate: 94.9% → 97.9%
Time: 13.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: 94.9% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.1× 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) + \left(\left(y + t\right) - 2\right) \cdot b \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \left(t + -1\right) \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<=
      (+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))
      INFINITY)
   (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* (+ t -1.0) a))))
   (* t (- b a))))
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))) + (((y + t) - 2.0) * b)) <= ((double) INFINITY)) {
		tmp = fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, ((t + -1.0) * a))));
	} else {
		tmp = t * (b - a);
	}
	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(Float64(Float64(y + t) - 2.0) * b)) <= Inf)
		tmp = fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(Float64(t + -1.0) * a))));
	else
		tmp = Float64(t * Float64(b - a));
	end
	return 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[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(N[(t + -1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(b - a), $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) + \left(\left(y + t\right) - 2\right) \cdot b \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \left(t + -1\right) \cdot a\right)\right)\\

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

Alternative 3: 59.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \left(y \cdot z - z\right)\\ t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\ t_3 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -45000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -6.8 \cdot 10^{-285}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-290}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{-193}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-134}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{-118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-82}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{+36}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (- (* y z) z)))
        (t_2 (* (- (+ y t) 2.0) b))
        (t_3 (* a (- 1.0 t))))
   (if (<= b -45000.0)
     t_2
     (if (<= b -6.8e-285)
       t_1
       (if (<= b 1.5e-290)
         t_3
         (if (<= b 9.8e-193)
           t_1
           (if (<= b 2.9e-134)
             t_3
             (if (<= b 4.5e-118)
               t_1
               (if (<= b 2.6e-82) t_3 (if (<= b 2.9e+36) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - ((y * z) - z);
	double t_2 = ((y + t) - 2.0) * b;
	double t_3 = a * (1.0 - t);
	double tmp;
	if (b <= -45000.0) {
		tmp = t_2;
	} else if (b <= -6.8e-285) {
		tmp = t_1;
	} else if (b <= 1.5e-290) {
		tmp = t_3;
	} else if (b <= 9.8e-193) {
		tmp = t_1;
	} else if (b <= 2.9e-134) {
		tmp = t_3;
	} else if (b <= 4.5e-118) {
		tmp = t_1;
	} else if (b <= 2.6e-82) {
		tmp = t_3;
	} else if (b <= 2.9e+36) {
		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) :: t_3
    real(8) :: tmp
    t_1 = x - ((y * z) - z)
    t_2 = ((y + t) - 2.0d0) * b
    t_3 = a * (1.0d0 - t)
    if (b <= (-45000.0d0)) then
        tmp = t_2
    else if (b <= (-6.8d-285)) then
        tmp = t_1
    else if (b <= 1.5d-290) then
        tmp = t_3
    else if (b <= 9.8d-193) then
        tmp = t_1
    else if (b <= 2.9d-134) then
        tmp = t_3
    else if (b <= 4.5d-118) then
        tmp = t_1
    else if (b <= 2.6d-82) then
        tmp = t_3
    else if (b <= 2.9d+36) 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 - ((y * z) - z);
	double t_2 = ((y + t) - 2.0) * b;
	double t_3 = a * (1.0 - t);
	double tmp;
	if (b <= -45000.0) {
		tmp = t_2;
	} else if (b <= -6.8e-285) {
		tmp = t_1;
	} else if (b <= 1.5e-290) {
		tmp = t_3;
	} else if (b <= 9.8e-193) {
		tmp = t_1;
	} else if (b <= 2.9e-134) {
		tmp = t_3;
	} else if (b <= 4.5e-118) {
		tmp = t_1;
	} else if (b <= 2.6e-82) {
		tmp = t_3;
	} else if (b <= 2.9e+36) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - ((y * z) - z)
	t_2 = ((y + t) - 2.0) * b
	t_3 = a * (1.0 - t)
	tmp = 0
	if b <= -45000.0:
		tmp = t_2
	elif b <= -6.8e-285:
		tmp = t_1
	elif b <= 1.5e-290:
		tmp = t_3
	elif b <= 9.8e-193:
		tmp = t_1
	elif b <= 2.9e-134:
		tmp = t_3
	elif b <= 4.5e-118:
		tmp = t_1
	elif b <= 2.6e-82:
		tmp = t_3
	elif b <= 2.9e+36:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(Float64(y * z) - z))
	t_2 = Float64(Float64(Float64(y + t) - 2.0) * b)
	t_3 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (b <= -45000.0)
		tmp = t_2;
	elseif (b <= -6.8e-285)
		tmp = t_1;
	elseif (b <= 1.5e-290)
		tmp = t_3;
	elseif (b <= 9.8e-193)
		tmp = t_1;
	elseif (b <= 2.9e-134)
		tmp = t_3;
	elseif (b <= 4.5e-118)
		tmp = t_1;
	elseif (b <= 2.6e-82)
		tmp = t_3;
	elseif (b <= 2.9e+36)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - ((y * z) - z);
	t_2 = ((y + t) - 2.0) * b;
	t_3 = a * (1.0 - t);
	tmp = 0.0;
	if (b <= -45000.0)
		tmp = t_2;
	elseif (b <= -6.8e-285)
		tmp = t_1;
	elseif (b <= 1.5e-290)
		tmp = t_3;
	elseif (b <= 9.8e-193)
		tmp = t_1;
	elseif (b <= 2.9e-134)
		tmp = t_3;
	elseif (b <= 4.5e-118)
		tmp = t_1;
	elseif (b <= 2.6e-82)
		tmp = t_3;
	elseif (b <= 2.9e+36)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(N[(y * z), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -45000.0], t$95$2, If[LessEqual[b, -6.8e-285], t$95$1, If[LessEqual[b, 1.5e-290], t$95$3, If[LessEqual[b, 9.8e-193], t$95$1, If[LessEqual[b, 2.9e-134], t$95$3, If[LessEqual[b, 4.5e-118], t$95$1, If[LessEqual[b, 2.6e-82], t$95$3, If[LessEqual[b, 2.9e+36], t$95$1, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -6.8 \cdot 10^{-285}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.5 \cdot 10^{-290}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 9.8 \cdot 10^{-193}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.9 \cdot 10^{-134}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 4.5 \cdot 10^{-118}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{-82}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 2.9 \cdot 10^{+36}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -45000 or 2.9e36 < b

    1. Initial program 89.8%

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

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

    if -45000 < b < -6.7999999999999998e-285 or 1.49999999999999996e-290 < b < 9.80000000000000032e-193 or 2.89999999999999993e-134 < b < 4.5e-118 or 2.6e-82 < b < 2.9e36

    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. Taylor expanded in b around 0 90.1%

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

      \[\leadsto x - \color{blue}{z \cdot \left(y - 1\right)} \]
    4. Step-by-step derivation
      1. sub-neg69.8%

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

        \[\leadsto x - z \cdot \left(y + \color{blue}{-1}\right) \]
      3. distribute-rgt-in69.8%

        \[\leadsto x - \color{blue}{\left(y \cdot z + -1 \cdot z\right)} \]
      4. neg-mul-169.8%

        \[\leadsto x - \left(y \cdot z + \color{blue}{\left(-z\right)}\right) \]
      5. unsub-neg69.8%

        \[\leadsto x - \color{blue}{\left(y \cdot z - z\right)} \]
    5. Simplified69.8%

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

    if -6.7999999999999998e-285 < b < 1.49999999999999996e-290 or 9.80000000000000032e-193 < b < 2.89999999999999993e-134 or 4.5e-118 < b < 2.6e-82

    1. Initial program 96.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. Taylor expanded in a around inf 80.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -45000:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -6.8 \cdot 10^{-285}:\\ \;\;\;\;x - \left(y \cdot z - z\right)\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-290}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{-193}:\\ \;\;\;\;x - \left(y \cdot z - z\right)\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-134}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{-118}:\\ \;\;\;\;x - \left(y \cdot z - z\right)\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-82}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{+36}:\\ \;\;\;\;x - \left(y \cdot z - z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 4: 73.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq -5.8 \cdot 10^{+18}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -480000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq -5.8 \cdot 10^{-285}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 6.5 \cdot 10^{+36}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -6.7000000000000003e87 or -5.8e18 < b < -4.8e5 or 6.4999999999999998e36 < b

    1. Initial program 88.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. Taylor expanded in b around inf 81.2%

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

    if -6.7000000000000003e87 < b < -5.8e18 or -4.8e5 < b < -5.7999999999999999e-285 or 5.4000000000000002e-295 < b < 6.4999999999999998e36

    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. Taylor expanded in b around 0 87.8%

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

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

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

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

    if -5.7999999999999999e-285 < b < 5.4000000000000002e-295

    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. Taylor expanded in a around inf 88.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.7 \cdot 10^{+87}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{+18}:\\ \;\;\;\;x - \left(\left(y + -1\right) \cdot z + t \cdot a\right)\\ \mathbf{elif}\;b \leq -480000:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{-285}:\\ \;\;\;\;x - \left(\left(y + -1\right) \cdot z + t \cdot a\right)\\ \mathbf{elif}\;b \leq 5.4 \cdot 10^{-295}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{+36}:\\ \;\;\;\;x - \left(\left(y + -1\right) \cdot z + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 5: 71.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq -8.5 \cdot 10^{+19}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -5 \cdot 10^{-45}:\\
\;\;\;\;t_2 - y \cdot z\\

\mathbf{elif}\;b \leq -5.8 \cdot 10^{-285}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 4.4 \cdot 10^{+37}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -4.99999999999999983e89 or 4.4000000000000001e37 < b

    1. Initial program 88.1%

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

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

    if -4.99999999999999983e89 < b < -8.5e19 or -4.99999999999999976e-45 < b < -5.7999999999999999e-285 or 5.4000000000000002e-295 < b < 4.4000000000000001e37

    1. Initial program 98.5%

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

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

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

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

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

    if -8.5e19 < b < -4.99999999999999976e-45

    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. Taylor expanded in y around inf 82.5%

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

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

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

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

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

    if -5.7999999999999999e-285 < b < 5.4000000000000002e-295

    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. Taylor expanded in a around inf 88.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+89}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -8.5 \cdot 10^{+19}:\\ \;\;\;\;x - \left(\left(y + -1\right) \cdot z + t \cdot a\right)\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-45}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - y \cdot z\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{-285}:\\ \;\;\;\;x - \left(\left(y + -1\right) \cdot z + t \cdot a\right)\\ \mathbf{elif}\;b \leq 5.4 \cdot 10^{-295}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 4.4 \cdot 10^{+37}:\\ \;\;\;\;x - \left(\left(y + -1\right) \cdot z + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 6: 81.0% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;b \leq -1.8 \cdot 10^{-9}:\\
\;\;\;\;t_2 - y \cdot z\\

\mathbf{elif}\;b \leq 3.7 \cdot 10^{+37}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) - t_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.2999999999999999e84 or 3.6999999999999999e37 < b

    1. Initial program 88.1%

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

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

    if -2.2999999999999999e84 < b < -1.75e20

    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. Taylor expanded in b around 0 67.5%

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

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

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

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

    if -1.75e20 < b < -1.8e-9

    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. Taylor expanded in y around inf 87.2%

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

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

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

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

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

    if -1.8e-9 < b < 3.6999999999999999e37

    1. Initial program 99.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.3 \cdot 10^{+84}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -1.75 \cdot 10^{+20}:\\ \;\;\;\;x - \left(\left(y + -1\right) \cdot z + t \cdot a\right)\\ \mathbf{elif}\;b \leq -1.8 \cdot 10^{-9}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - y \cdot z\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{+37}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) - \left(y + -1\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 7: 54.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot z\\ t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\ t_3 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -110000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.02 \cdot 10^{-284}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{-289}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{-193}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-82}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 900000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* y z))) (t_2 (* (- (+ y t) 2.0) b)) (t_3 (* a (- 1.0 t))))
   (if (<= b -110000.0)
     t_2
     (if (<= b -1.02e-284)
       t_1
       (if (<= b 1.95e-289)
         t_3
         (if (<= b 1.75e-193)
           t_1
           (if (<= b 2.5e-82) t_3 (if (<= b 900000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (y * z);
	double t_2 = ((y + t) - 2.0) * b;
	double t_3 = a * (1.0 - t);
	double tmp;
	if (b <= -110000.0) {
		tmp = t_2;
	} else if (b <= -1.02e-284) {
		tmp = t_1;
	} else if (b <= 1.95e-289) {
		tmp = t_3;
	} else if (b <= 1.75e-193) {
		tmp = t_1;
	} else if (b <= 2.5e-82) {
		tmp = t_3;
	} else if (b <= 900000000.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) :: t_3
    real(8) :: tmp
    t_1 = x - (y * z)
    t_2 = ((y + t) - 2.0d0) * b
    t_3 = a * (1.0d0 - t)
    if (b <= (-110000.0d0)) then
        tmp = t_2
    else if (b <= (-1.02d-284)) then
        tmp = t_1
    else if (b <= 1.95d-289) then
        tmp = t_3
    else if (b <= 1.75d-193) then
        tmp = t_1
    else if (b <= 2.5d-82) then
        tmp = t_3
    else if (b <= 900000000.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 = x - (y * z);
	double t_2 = ((y + t) - 2.0) * b;
	double t_3 = a * (1.0 - t);
	double tmp;
	if (b <= -110000.0) {
		tmp = t_2;
	} else if (b <= -1.02e-284) {
		tmp = t_1;
	} else if (b <= 1.95e-289) {
		tmp = t_3;
	} else if (b <= 1.75e-193) {
		tmp = t_1;
	} else if (b <= 2.5e-82) {
		tmp = t_3;
	} else if (b <= 900000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (y * z)
	t_2 = ((y + t) - 2.0) * b
	t_3 = a * (1.0 - t)
	tmp = 0
	if b <= -110000.0:
		tmp = t_2
	elif b <= -1.02e-284:
		tmp = t_1
	elif b <= 1.95e-289:
		tmp = t_3
	elif b <= 1.75e-193:
		tmp = t_1
	elif b <= 2.5e-82:
		tmp = t_3
	elif b <= 900000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(y * z))
	t_2 = Float64(Float64(Float64(y + t) - 2.0) * b)
	t_3 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (b <= -110000.0)
		tmp = t_2;
	elseif (b <= -1.02e-284)
		tmp = t_1;
	elseif (b <= 1.95e-289)
		tmp = t_3;
	elseif (b <= 1.75e-193)
		tmp = t_1;
	elseif (b <= 2.5e-82)
		tmp = t_3;
	elseif (b <= 900000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (y * z);
	t_2 = ((y + t) - 2.0) * b;
	t_3 = a * (1.0 - t);
	tmp = 0.0;
	if (b <= -110000.0)
		tmp = t_2;
	elseif (b <= -1.02e-284)
		tmp = t_1;
	elseif (b <= 1.95e-289)
		tmp = t_3;
	elseif (b <= 1.75e-193)
		tmp = t_1;
	elseif (b <= 2.5e-82)
		tmp = t_3;
	elseif (b <= 900000000.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[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -110000.0], t$95$2, If[LessEqual[b, -1.02e-284], t$95$1, If[LessEqual[b, 1.95e-289], t$95$3, If[LessEqual[b, 1.75e-193], t$95$1, If[LessEqual[b, 2.5e-82], t$95$3, If[LessEqual[b, 900000000.0], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -1.02 \cdot 10^{-284}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.95 \cdot 10^{-289}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 1.75 \cdot 10^{-193}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.5 \cdot 10^{-82}:\\
\;\;\;\;t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.1e5 or 9e8 < b

    1. Initial program 90.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. Taylor expanded in b around inf 70.7%

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

    if -1.1e5 < b < -1.02e-284 or 1.9499999999999999e-289 < b < 1.75000000000000002e-193 or 2.4999999999999999e-82 < b < 9e8

    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. Taylor expanded in b around 0 90.5%

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

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

    if -1.02e-284 < b < 1.9499999999999999e-289 or 1.75000000000000002e-193 < b < 2.4999999999999999e-82

    1. Initial program 97.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -110000:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -1.02 \cdot 10^{-284}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{-289}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{-193}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-82}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 900000000:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 8: 87.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -15000 \lor \neg \left(b \leq 1020000000\right):\\ \;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + t_1\\ \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 (or (<= b -15000.0) (not (<= b 1020000000.0)))
     (+ (+ x (* (- (+ y t) 2.0) b)) 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 ((b <= -15000.0) || !(b <= 1020000000.0)) {
		tmp = (x + (((y + t) - 2.0) * b)) + 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 ((b <= (-15000.0d0)) .or. (.not. (b <= 1020000000.0d0))) then
        tmp = (x + (((y + t) - 2.0d0) * b)) + 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 ((b <= -15000.0) || !(b <= 1020000000.0)) {
		tmp = (x + (((y + t) - 2.0) * b)) + 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 (b <= -15000.0) or not (b <= 1020000000.0):
		tmp = (x + (((y + t) - 2.0) * b)) + 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 ((b <= -15000.0) || !(b <= 1020000000.0))
		tmp = Float64(Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)) + 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 ((b <= -15000.0) || ~((b <= 1020000000.0)))
		tmp = (x + (((y + t) - 2.0) * b)) + 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[Or[LessEqual[b, -15000.0], N[Not[LessEqual[b, 1020000000.0]], $MachinePrecision]], N[(N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] + t$95$1), $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}\;b \leq -15000 \lor \neg \left(b \leq 1020000000\right):\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -15000 or 1.02e9 < b

    1. Initial program 90.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. Taylor expanded in z around 0 85.3%

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

    if -15000 < b < 1.02e9

    1. Initial program 99.2%

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

      \[\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 simplification88.8%

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

Alternative 9: 87.3% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq 1360000000:\\
\;\;\;\;x + \left(t_2 - \left(y + -1\right) \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.56e-9

    1. Initial program 91.0%

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

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

    if -1.56e-9 < b < 1.36e9

    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. Taylor expanded in b around 0 93.3%

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

    if 1.36e9 < b

    1. Initial program 90.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. Taylor expanded in z around 0 87.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.56 \cdot 10^{-9}:\\ \;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1360000000:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) - \left(y + -1\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 10: 37.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(t - 2\right)\\ \mathbf{if}\;b \leq -9.5 \cdot 10^{+119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1.15 \cdot 10^{+54}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -6.5 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -6.2 \cdot 10^{-167}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{+36}:\\ \;\;\;\;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 (* b (- t 2.0))))
   (if (<= b -9.5e+119)
     t_1
     (if (<= b -1.15e+54)
       (* y b)
       (if (<= b -6.5e-48)
         t_1
         (if (<= b -6.2e-167) x (if (<= b 1.05e+36) (* a (- 1.0 t)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (t - 2.0);
	double tmp;
	if (b <= -9.5e+119) {
		tmp = t_1;
	} else if (b <= -1.15e+54) {
		tmp = y * b;
	} else if (b <= -6.5e-48) {
		tmp = t_1;
	} else if (b <= -6.2e-167) {
		tmp = x;
	} else if (b <= 1.05e+36) {
		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 = b * (t - 2.0d0)
    if (b <= (-9.5d+119)) then
        tmp = t_1
    else if (b <= (-1.15d+54)) then
        tmp = y * b
    else if (b <= (-6.5d-48)) then
        tmp = t_1
    else if (b <= (-6.2d-167)) then
        tmp = x
    else if (b <= 1.05d+36) 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 = b * (t - 2.0);
	double tmp;
	if (b <= -9.5e+119) {
		tmp = t_1;
	} else if (b <= -1.15e+54) {
		tmp = y * b;
	} else if (b <= -6.5e-48) {
		tmp = t_1;
	} else if (b <= -6.2e-167) {
		tmp = x;
	} else if (b <= 1.05e+36) {
		tmp = a * (1.0 - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (t - 2.0)
	tmp = 0
	if b <= -9.5e+119:
		tmp = t_1
	elif b <= -1.15e+54:
		tmp = y * b
	elif b <= -6.5e-48:
		tmp = t_1
	elif b <= -6.2e-167:
		tmp = x
	elif b <= 1.05e+36:
		tmp = a * (1.0 - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(t - 2.0))
	tmp = 0.0
	if (b <= -9.5e+119)
		tmp = t_1;
	elseif (b <= -1.15e+54)
		tmp = Float64(y * b);
	elseif (b <= -6.5e-48)
		tmp = t_1;
	elseif (b <= -6.2e-167)
		tmp = x;
	elseif (b <= 1.05e+36)
		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 = b * (t - 2.0);
	tmp = 0.0;
	if (b <= -9.5e+119)
		tmp = t_1;
	elseif (b <= -1.15e+54)
		tmp = y * b;
	elseif (b <= -6.5e-48)
		tmp = t_1;
	elseif (b <= -6.2e-167)
		tmp = x;
	elseif (b <= 1.05e+36)
		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[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.5e+119], t$95$1, If[LessEqual[b, -1.15e+54], N[(y * b), $MachinePrecision], If[LessEqual[b, -6.5e-48], t$95$1, If[LessEqual[b, -6.2e-167], x, If[LessEqual[b, 1.05e+36], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -1.15 \cdot 10^{+54}:\\
\;\;\;\;y \cdot b\\

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

\mathbf{elif}\;b \leq -6.2 \cdot 10^{-167}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -9.4999999999999994e119 or -1.14999999999999997e54 < b < -6.5e-48 or 1.05000000000000002e36 < b

    1. Initial program 89.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. Taylor expanded in b around inf 73.7%

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

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

    if -9.4999999999999994e119 < b < -1.14999999999999997e54

    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. Taylor expanded in z around 0 71.6%

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

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

    if -6.5e-48 < b < -6.2e-167

    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. Taylor expanded in x around inf 40.7%

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

    if -6.2e-167 < b < 1.05000000000000002e36

    1. Initial program 99.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.5 \cdot 10^{+119}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq -1.15 \cdot 10^{+54}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -6.5 \cdot 10^{-48}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq -6.2 \cdot 10^{-167}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{+36}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]

Alternative 11: 49.9% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot z\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -1.1 \cdot 10^{+84}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-302}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-276}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 25000000:\\ \;\;\;\;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 (- x (* y z))) (t_2 (* t (- b a))))
   (if (<= t -1.1e+84)
     t_2
     (if (<= t -3.3e-164)
       t_1
       (if (<= t 9.5e-302)
         (* y (- b z))
         (if (<= t 4.6e-276)
           t_1
           (if (<= t 25000000.0) (* b (- y 2.0)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (y * z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -1.1e+84) {
		tmp = t_2;
	} else if (t <= -3.3e-164) {
		tmp = t_1;
	} else if (t <= 9.5e-302) {
		tmp = y * (b - z);
	} else if (t <= 4.6e-276) {
		tmp = t_1;
	} else if (t <= 25000000.0) {
		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 = x - (y * z)
    t_2 = t * (b - a)
    if (t <= (-1.1d+84)) then
        tmp = t_2
    else if (t <= (-3.3d-164)) then
        tmp = t_1
    else if (t <= 9.5d-302) then
        tmp = y * (b - z)
    else if (t <= 4.6d-276) then
        tmp = t_1
    else if (t <= 25000000.0d0) 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 = x - (y * z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -1.1e+84) {
		tmp = t_2;
	} else if (t <= -3.3e-164) {
		tmp = t_1;
	} else if (t <= 9.5e-302) {
		tmp = y * (b - z);
	} else if (t <= 4.6e-276) {
		tmp = t_1;
	} else if (t <= 25000000.0) {
		tmp = b * (y - 2.0);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (y * z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -1.1e+84:
		tmp = t_2
	elif t <= -3.3e-164:
		tmp = t_1
	elif t <= 9.5e-302:
		tmp = y * (b - z)
	elif t <= 4.6e-276:
		tmp = t_1
	elif t <= 25000000.0:
		tmp = b * (y - 2.0)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(y * z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -1.1e+84)
		tmp = t_2;
	elseif (t <= -3.3e-164)
		tmp = t_1;
	elseif (t <= 9.5e-302)
		tmp = Float64(y * Float64(b - z));
	elseif (t <= 4.6e-276)
		tmp = t_1;
	elseif (t <= 25000000.0)
		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 = x - (y * z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -1.1e+84)
		tmp = t_2;
	elseif (t <= -3.3e-164)
		tmp = t_1;
	elseif (t <= 9.5e-302)
		tmp = y * (b - z);
	elseif (t <= 4.6e-276)
		tmp = t_1;
	elseif (t <= 25000000.0)
		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[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+84], t$95$2, If[LessEqual[t, -3.3e-164], t$95$1, If[LessEqual[t, 9.5e-302], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e-276], t$95$1, If[LessEqual[t, 25000000.0], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.3 \cdot 10^{-164}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{-276}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.0999999999999999e84 or 2.5e7 < t

    1. Initial program 89.7%

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

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

    if -1.0999999999999999e84 < t < -3.3e-164 or 9.49999999999999991e-302 < t < 4.59999999999999963e-276

    1. Initial program 96.3%

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

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

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

    if -3.3e-164 < t < 9.49999999999999991e-302

    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. Taylor expanded in y around inf 43.5%

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

    if 4.59999999999999963e-276 < t < 2.5e7

    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. Taylor expanded in b around inf 47.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+84}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-164}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-302}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-276}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq 25000000:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 12: 26.1% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-165}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-253}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 4 \cdot 10^{-26}:\\
\;\;\;\;b \cdot -2\\

\mathbf{elif}\;t \leq 4.2 \cdot 10^{+38}:\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.19999999999999972e89 or 4.2e38 < t

    1. Initial program 89.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. Taylor expanded in b around inf 43.7%

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

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

    if -4.19999999999999972e89 < t < -3.5000000000000002e-165

    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. Taylor expanded in x around inf 34.9%

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

    if -3.5000000000000002e-165 < t < 6.19999999999999991e-253 or 4.0000000000000002e-26 < t < 4.2e38

    1. Initial program 98.0%

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

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

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

    if 6.19999999999999991e-253 < t < 4.0000000000000002e-26

    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. Taylor expanded in b around inf 43.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+89}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-165}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-253}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-26}:\\ \;\;\;\;b \cdot -2\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+38}:\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 13: 66.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+84} \lor \neg \left(t \leq 260000000\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.05000000000000009e84 or 2.6e8 < t

    1. Initial program 89.7%

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

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

    if -1.05000000000000009e84 < t < 2.6e8

    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. Taylor expanded in z around 0 77.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+84} \lor \neg \left(t \leq 260000000\right):\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \end{array} \]

Alternative 14: 65.3% accurate, 1.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.2e39 or 1.1e15 < y

    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. Taylor expanded in y around inf 60.7%

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

    if -1.2e39 < y < 5.99999999999999977e-38

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(b, t + \left(y + -2\right), \color{blue}{\mathsf{fma}\left(-1 \cdot y, z, z\right)}\right) \]
      19. neg-mul-177.5%

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

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

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

    if 5.99999999999999977e-38 < y < 1.1e15

    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. Taylor expanded in a around inf 64.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+39}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-38}:\\ \;\;\;\;x + \left(z - b \cdot \left(2 - t\right)\right)\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+15}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 15: 25.7% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;x \leq -5.2 \cdot 10^{-79}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;x \leq 0.00025:\\
\;\;\;\;t \cdot \left(-a\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.06e117 or 7.19999999999999987e162 < x

    1. Initial program 95.8%

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

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

    if -1.06e117 < x < -5.19999999999999987e-79

    1. Initial program 87.8%

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

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

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

    if -5.19999999999999987e-79 < x < 2.5000000000000001e-4

    1. Initial program 95.1%

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} \]
      2. *-commutative28.7%

        \[\leadsto \color{blue}{t \cdot \left(-1 \cdot a\right)} \]
      3. neg-mul-128.7%

        \[\leadsto t \cdot \color{blue}{\left(-a\right)} \]
    5. Simplified28.7%

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

    if 2.5000000000000001e-4 < x < 7.19999999999999987e162

    1. Initial program 96.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. Taylor expanded in y around inf 50.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.06 \cdot 10^{+117}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -5.2 \cdot 10^{-79}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;x \leq 0.00025:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{+162}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 31.1% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;x \leq -5.3 \cdot 10^{-50}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;x \leq 0.81:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -5.5000000000000001e113 or 7.9999999999999995e162 < x

    1. Initial program 95.8%

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

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

    if -5.5000000000000001e113 < x < -5.3000000000000001e-50

    1. Initial program 88.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. Taylor expanded in b around inf 61.9%

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

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

    if -5.3000000000000001e-50 < x < 0.81000000000000005

    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. Taylor expanded in a around inf 39.0%

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

    if 0.81000000000000005 < x < 7.9999999999999995e162

    1. Initial program 96.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. Taylor expanded in y around inf 50.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{+113}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -5.3 \cdot 10^{-50}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;x \leq 0.81:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+162}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 25.2% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;x \leq -5.5 \cdot 10^{-78}:\\
\;\;\;\;t \cdot b\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.3599999999999999e108 or 2e17 < x

    1. Initial program 96.0%

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

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

    if -1.3599999999999999e108 < x < -5.50000000000000017e-78

    1. Initial program 87.8%

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

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

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

    if -5.50000000000000017e-78 < x < 2e17

    1. Initial program 95.1%

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} \]
      2. *-commutative28.5%

        \[\leadsto \color{blue}{t \cdot \left(-1 \cdot a\right)} \]
      3. neg-mul-128.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.36 \cdot 10^{+108}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{-78}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+17}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 18: 19.2% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;x \leq -4.2 \cdot 10^{-178}:\\
\;\;\;\;a\\

\mathbf{elif}\;x \leq 6 \cdot 10^{-6}:\\
\;\;\;\;b \cdot -2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.4999999999999999e153 or 6.0000000000000002e-6 < x

    1. Initial program 95.7%

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

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

    if -3.4999999999999999e153 < x < -4.2e-178

    1. Initial program 90.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. Taylor expanded in a around inf 31.9%

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

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

    if -4.2e-178 < x < 6.0000000000000002e-6

    1. Initial program 96.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -4.2 \cdot 10^{-178}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-6}:\\ \;\;\;\;b \cdot -2\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 19: 25.8% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;t \leq 7.6 \cdot 10^{-246}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.49999999999999979e84 or 1.0000000000000001e-18 < t

    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. Taylor expanded in b around inf 44.0%

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

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

    if -9.49999999999999979e84 < t < 7.59999999999999951e-246

    1. Initial program 97.8%

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

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

    if 7.59999999999999951e-246 < t < 1.0000000000000001e-18

    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. Taylor expanded in b around inf 45.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+84}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-246}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 10^{-18}:\\ \;\;\;\;b \cdot -2\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 20: 47.0% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+84} \lor \neg \left(t \leq 5600000\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.05000000000000009e84 or 5.6e6 < t

    1. Initial program 89.7%

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

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

    if -1.05000000000000009e84 < t < 5.6e6

    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. Taylor expanded in b around inf 40.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+84} \lor \neg \left(t \leq 5600000\right):\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \end{array} \]

Alternative 21: 40.0% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{-10}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.7e-10

    1. Initial program 91.0%

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

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

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

    if -2.7e-10 < b < 7.0000000000000001e35

    1. Initial program 99.2%

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

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

    if 7.0000000000000001e35 < b

    1. Initial program 88.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. Taylor expanded in b around inf 79.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.7 \cdot 10^{-10}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+35}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]

Alternative 22: 20.4% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 2.76 \cdot 10^{-11}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.00000000000000018e153 or 2.76e-11 < x

    1. Initial program 95.8%

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

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

    if -5.00000000000000018e153 < x < 2.76e-11

    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. Taylor expanded in a around inf 34.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{+153}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.76 \cdot 10^{-11}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 23: 11.0% 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. Taylor expanded in a around inf 27.3%

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

    \[\leadsto \color{blue}{a} \]
  4. Final simplification9.8%

    \[\leadsto a \]

Reproduce

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