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

Percentage Accurate: 95.2% → 97.8%
Time: 15.2s
Alternatives: 26
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 26 alternatives:

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

Initial Program: 95.2% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_2 + 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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, 1 - y, x\right)} - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\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. Step-by-step derivation
      1. associate-+l-0.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+0.0%

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

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

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

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

Alternative 2: 97.6% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(y + \left(t + -2\right), b, \mathsf{fma}\left(z, 1 - y, x\right)\right)\right)
\end{array}
Derivation
  1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.3% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(t + \left(y - 2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Derivation
  1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 97.8% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_1 + 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. Step-by-step derivation
      1. associate-+l-0.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+0.0%

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

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

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

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

Alternative 5: 50.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq -2.2 \cdot 10^{-64}:\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{elif}\;b \leq -7 \cdot 10^{-85}:\\
\;\;\;\;z + x\\

\mathbf{elif}\;b \leq -3 \cdot 10^{-115}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq -7.2 \cdot 10^{-252}:\\
\;\;\;\;z - y \cdot z\\

\mathbf{elif}\;b \leq 4.8 \cdot 10^{-154}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+36}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if b < -1.3e74 or 2.29999999999999996e36 < b

    1. Initial program 93.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. Step-by-step derivation
      1. associate-+l-93.2%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+93.2%

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

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

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

    if -1.3e74 < b < -2.2e-64

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+95.9%

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

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

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

    if -2.2e-64 < b < -6.99999999999999956e-85

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.8%

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv64.8%

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity64.8%

        \[\leadsto x + \color{blue}{z} \]
    8. Simplified64.8%

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

    if -6.99999999999999956e-85 < b < -3.0000000000000002e-115 or -7.20000000000000046e-252 < b < 4.79999999999999974e-154 or 5.50000000000000005e-38 < b < 2.29999999999999996e36

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0000000000000002e-115 < b < -7.20000000000000046e-252

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(0 - -1\right)} - y\right) \]
      2. associate--r+53.1%

        \[\leadsto z \cdot \color{blue}{\left(0 - \left(-1 + y\right)\right)} \]
      3. +-commutative53.1%

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

        \[\leadsto z \cdot \color{blue}{\left(-\left(y + -1\right)\right)} \]
      5. distribute-rgt-neg-in53.1%

        \[\leadsto \color{blue}{-z \cdot \left(y + -1\right)} \]
      6. *-commutative53.1%

        \[\leadsto -\color{blue}{\left(y + -1\right) \cdot z} \]
      7. neg-sub053.1%

        \[\leadsto \color{blue}{0 - \left(y + -1\right) \cdot z} \]
      8. *-commutative53.1%

        \[\leadsto 0 - \color{blue}{z \cdot \left(y + -1\right)} \]
      9. distribute-rgt-out53.1%

        \[\leadsto 0 - \color{blue}{\left(y \cdot z + -1 \cdot z\right)} \]
      10. +-commutative53.1%

        \[\leadsto 0 - \color{blue}{\left(-1 \cdot z + y \cdot z\right)} \]
      11. associate--r+53.1%

        \[\leadsto \color{blue}{\left(0 - -1 \cdot z\right) - y \cdot z} \]
      12. neg-sub053.1%

        \[\leadsto \color{blue}{\left(--1 \cdot z\right)} - y \cdot z \]
      13. neg-mul-153.1%

        \[\leadsto \left(-\color{blue}{\left(-z\right)}\right) - y \cdot z \]
      14. remove-double-neg53.1%

        \[\leadsto \color{blue}{z} - y \cdot z \]
    6. Simplified53.1%

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

    if 4.79999999999999974e-154 < b < 5.50000000000000005e-38

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{y \cdot z} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification63.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.3 \cdot 10^{+74}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -2.2 \cdot 10^{-64}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq -7 \cdot 10^{-85}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;b \leq -3 \cdot 10^{-115}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -7.2 \cdot 10^{-252}:\\ \;\;\;\;z - y \cdot z\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{-154}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-38}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+36}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 6: 85.6% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq -1.85:\\
\;\;\;\;t_2 + t \cdot \left(b - a\right)\\

\mathbf{elif}\;b \leq -1.15 \cdot 10^{-51} \lor \neg \left(b \leq 3.9 \cdot 10^{+37}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.18e156 or -1.8500000000000001 < b < -1.15000000000000001e-51 or 3.8999999999999999e37 < b

    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. Step-by-step derivation
      1. associate-+l-94.5%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.5%

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

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

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

    if -1.18e156 < b < -1.8500000000000001

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+93.3%

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

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

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

    if -1.15000000000000001e-51 < b < 3.8999999999999999e37

    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. Step-by-step derivation
      1. associate-+l-99.2%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.18 \cdot 10^{+156}:\\ \;\;\;\;\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -1.85:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq -1.15 \cdot 10^{-51} \lor \neg \left(b \leq 3.9 \cdot 10^{+37}\right):\\ \;\;\;\;\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + \left(a - a \cdot t\right)\\ \end{array} \]

Alternative 7: 44.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(-z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -4.2 \cdot 10^{+25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-277}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-299}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.18 \cdot 10^{-257}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-127}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-97}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 1.92 \cdot 10^{+28}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+89}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- z))) (t_2 (* t (- b a))))
   (if (<= t -4.2e+25)
     t_2
     (if (<= t -2.5e-277)
       (+ z x)
       (if (<= t 1.1e-299)
         t_1
         (if (<= t 1.18e-257)
           (+ z x)
           (if (<= t 2.3e-127)
             t_1
             (if (<= t 2.4e-97)
               (+ z x)
               (if (<= t 1.92e+28)
                 (* a (- 1.0 t))
                 (if (<= t 1.25e+89) (+ z x) t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -4.2e+25) {
		tmp = t_2;
	} else if (t <= -2.5e-277) {
		tmp = z + x;
	} else if (t <= 1.1e-299) {
		tmp = t_1;
	} else if (t <= 1.18e-257) {
		tmp = z + x;
	} else if (t <= 2.3e-127) {
		tmp = t_1;
	} else if (t <= 2.4e-97) {
		tmp = z + x;
	} else if (t <= 1.92e+28) {
		tmp = a * (1.0 - t);
	} else if (t <= 1.25e+89) {
		tmp = z + x;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * -z
    t_2 = t * (b - a)
    if (t <= (-4.2d+25)) then
        tmp = t_2
    else if (t <= (-2.5d-277)) then
        tmp = z + x
    else if (t <= 1.1d-299) then
        tmp = t_1
    else if (t <= 1.18d-257) then
        tmp = z + x
    else if (t <= 2.3d-127) then
        tmp = t_1
    else if (t <= 2.4d-97) then
        tmp = z + x
    else if (t <= 1.92d+28) then
        tmp = a * (1.0d0 - t)
    else if (t <= 1.25d+89) then
        tmp = z + x
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -4.2e+25) {
		tmp = t_2;
	} else if (t <= -2.5e-277) {
		tmp = z + x;
	} else if (t <= 1.1e-299) {
		tmp = t_1;
	} else if (t <= 1.18e-257) {
		tmp = z + x;
	} else if (t <= 2.3e-127) {
		tmp = t_1;
	} else if (t <= 2.4e-97) {
		tmp = z + x;
	} else if (t <= 1.92e+28) {
		tmp = a * (1.0 - t);
	} else if (t <= 1.25e+89) {
		tmp = z + x;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * -z
	t_2 = t * (b - a)
	tmp = 0
	if t <= -4.2e+25:
		tmp = t_2
	elif t <= -2.5e-277:
		tmp = z + x
	elif t <= 1.1e-299:
		tmp = t_1
	elif t <= 1.18e-257:
		tmp = z + x
	elif t <= 2.3e-127:
		tmp = t_1
	elif t <= 2.4e-97:
		tmp = z + x
	elif t <= 1.92e+28:
		tmp = a * (1.0 - t)
	elif t <= 1.25e+89:
		tmp = z + x
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(-z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -4.2e+25)
		tmp = t_2;
	elseif (t <= -2.5e-277)
		tmp = Float64(z + x);
	elseif (t <= 1.1e-299)
		tmp = t_1;
	elseif (t <= 1.18e-257)
		tmp = Float64(z + x);
	elseif (t <= 2.3e-127)
		tmp = t_1;
	elseif (t <= 2.4e-97)
		tmp = Float64(z + x);
	elseif (t <= 1.92e+28)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (t <= 1.25e+89)
		tmp = Float64(z + x);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * -z;
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -4.2e+25)
		tmp = t_2;
	elseif (t <= -2.5e-277)
		tmp = z + x;
	elseif (t <= 1.1e-299)
		tmp = t_1;
	elseif (t <= 1.18e-257)
		tmp = z + x;
	elseif (t <= 2.3e-127)
		tmp = t_1;
	elseif (t <= 2.4e-97)
		tmp = z + x;
	elseif (t <= 1.92e+28)
		tmp = a * (1.0 - t);
	elseif (t <= 1.25e+89)
		tmp = z + x;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+25], t$95$2, If[LessEqual[t, -2.5e-277], N[(z + x), $MachinePrecision], If[LessEqual[t, 1.1e-299], t$95$1, If[LessEqual[t, 1.18e-257], N[(z + x), $MachinePrecision], If[LessEqual[t, 2.3e-127], t$95$1, If[LessEqual[t, 2.4e-97], N[(z + x), $MachinePrecision], If[LessEqual[t, 1.92e+28], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+89], N[(z + x), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-127}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.1999999999999998e25 or 1.24999999999999996e89 < t

    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. Step-by-step derivation
      1. associate-+l-94.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.1%

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

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

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

    if -4.1999999999999998e25 < t < -2.5e-277 or 1.1e-299 < t < 1.1799999999999999e-257 or 2.30000000000000019e-127 < t < 2.4e-97 or 1.91999999999999998e28 < t < 1.24999999999999996e89

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+98.8%

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv41.3%

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity41.3%

        \[\leadsto x + \color{blue}{z} \]
    8. Simplified41.3%

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

    if -2.5e-277 < t < 1.1e-299 or 1.1799999999999999e-257 < t < 2.30000000000000019e-127

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

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

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

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

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

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

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

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

    if 2.4e-97 < t < 1.91999999999999998e28

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+25}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-277}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-299}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 1.18 \cdot 10^{-257}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-127}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-97}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 1.92 \cdot 10^{+28}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+89}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 8: 63.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(a - a \cdot t\right)\\ t_2 := x + b \cdot \left(\left(t + y\right) - 2\right)\\ t_3 := x + z \cdot \left(1 - y\right)\\ \mathbf{if}\;b \leq -7.5 \cdot 10^{+74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2.85 \cdot 10^{-69}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq -4.4 \cdot 10^{-219}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-178}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-44}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 9 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (- a (* a t))))
        (t_2 (+ x (* b (- (+ t y) 2.0))))
        (t_3 (+ x (* z (- 1.0 y)))))
   (if (<= b -7.5e+74)
     t_2
     (if (<= b -2.85e-69)
       (+ x (* t (- b a)))
       (if (<= b -4.4e-219)
         t_3
         (if (<= b 1.7e-178)
           t_1
           (if (<= b 1.7e-44) t_3 (if (<= b 9e+32) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (a - (a * t));
	double t_2 = x + (b * ((t + y) - 2.0));
	double t_3 = x + (z * (1.0 - y));
	double tmp;
	if (b <= -7.5e+74) {
		tmp = t_2;
	} else if (b <= -2.85e-69) {
		tmp = x + (t * (b - a));
	} else if (b <= -4.4e-219) {
		tmp = t_3;
	} else if (b <= 1.7e-178) {
		tmp = t_1;
	} else if (b <= 1.7e-44) {
		tmp = t_3;
	} else if (b <= 9e+32) {
		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 + (a - (a * t))
    t_2 = x + (b * ((t + y) - 2.0d0))
    t_3 = x + (z * (1.0d0 - y))
    if (b <= (-7.5d+74)) then
        tmp = t_2
    else if (b <= (-2.85d-69)) then
        tmp = x + (t * (b - a))
    else if (b <= (-4.4d-219)) then
        tmp = t_3
    else if (b <= 1.7d-178) then
        tmp = t_1
    else if (b <= 1.7d-44) then
        tmp = t_3
    else if (b <= 9d+32) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (a - (a * t));
	double t_2 = x + (b * ((t + y) - 2.0));
	double t_3 = x + (z * (1.0 - y));
	double tmp;
	if (b <= -7.5e+74) {
		tmp = t_2;
	} else if (b <= -2.85e-69) {
		tmp = x + (t * (b - a));
	} else if (b <= -4.4e-219) {
		tmp = t_3;
	} else if (b <= 1.7e-178) {
		tmp = t_1;
	} else if (b <= 1.7e-44) {
		tmp = t_3;
	} else if (b <= 9e+32) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (a - (a * t))
	t_2 = x + (b * ((t + y) - 2.0))
	t_3 = x + (z * (1.0 - y))
	tmp = 0
	if b <= -7.5e+74:
		tmp = t_2
	elif b <= -2.85e-69:
		tmp = x + (t * (b - a))
	elif b <= -4.4e-219:
		tmp = t_3
	elif b <= 1.7e-178:
		tmp = t_1
	elif b <= 1.7e-44:
		tmp = t_3
	elif b <= 9e+32:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(a - Float64(a * t)))
	t_2 = Float64(x + Float64(b * Float64(Float64(t + y) - 2.0)))
	t_3 = Float64(x + Float64(z * Float64(1.0 - y)))
	tmp = 0.0
	if (b <= -7.5e+74)
		tmp = t_2;
	elseif (b <= -2.85e-69)
		tmp = Float64(x + Float64(t * Float64(b - a)));
	elseif (b <= -4.4e-219)
		tmp = t_3;
	elseif (b <= 1.7e-178)
		tmp = t_1;
	elseif (b <= 1.7e-44)
		tmp = t_3;
	elseif (b <= 9e+32)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (a - (a * t));
	t_2 = x + (b * ((t + y) - 2.0));
	t_3 = x + (z * (1.0 - y));
	tmp = 0.0;
	if (b <= -7.5e+74)
		tmp = t_2;
	elseif (b <= -2.85e-69)
		tmp = x + (t * (b - a));
	elseif (b <= -4.4e-219)
		tmp = t_3;
	elseif (b <= 1.7e-178)
		tmp = t_1;
	elseif (b <= 1.7e-44)
		tmp = t_3;
	elseif (b <= 9e+32)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.5e+74], t$95$2, If[LessEqual[b, -2.85e-69], N[(x + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.4e-219], t$95$3, If[LessEqual[b, 1.7e-178], t$95$1, If[LessEqual[b, 1.7e-44], t$95$3, If[LessEqual[b, 9e+32], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq -4.4 \cdot 10^{-219}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 1.7 \cdot 10^{-178}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.7 \cdot 10^{-44}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 9 \cdot 10^{+32}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -7.5e74 or 9.0000000000000007e32 < b

    1. Initial program 93.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. Step-by-step derivation
      1. associate-+l-93.2%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+93.2%

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

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

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

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

    if -7.5e74 < b < -2.85e-69

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+96.2%

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

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

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

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

    if -2.85e-69 < b < -4.3999999999999999e-219 or 1.69999999999999986e-178 < b < 1.70000000000000008e-44

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.3999999999999999e-219 < b < 1.69999999999999986e-178 or 1.70000000000000008e-44 < b < 9.0000000000000007e32

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \left(t - 1\right) \cdot a} \]
    6. Step-by-step derivation
      1. sub-neg75.0%

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

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

        \[\leadsto x - \color{blue}{a \cdot \left(t + -1\right)} \]
      4. distribute-lft-out75.0%

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

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

        \[\leadsto x - \left(a \cdot t + \color{blue}{\left(-a\right)}\right) \]
      7. unsub-neg75.0%

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

        \[\leadsto x - \left(\color{blue}{t \cdot a} - a\right) \]
    7. Simplified75.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.5 \cdot 10^{+74}:\\ \;\;\;\;x + b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -2.85 \cdot 10^{-69}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq -4.4 \cdot 10^{-219}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-178}:\\ \;\;\;\;x + \left(a - a \cdot t\right)\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-44}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{+32}:\\ \;\;\;\;x + \left(a - a \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 9: 78.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq -5.4 \cdot 10^{-243}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-87}:\\
\;\;\;\;t_2 + y \cdot b\\

\mathbf{elif}\;t \leq 0.0003:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.8e-38 or 2.99999999999999974e-4 < t

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.4%

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

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

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

    if -2.8e-38 < t < -5.40000000000000021e-243 or 4.7999999999999999e-87 < t < 2.99999999999999974e-4

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

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

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

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

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

    if -5.40000000000000021e-243 < t < 4.7999999999999999e-87

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{y \cdot \left(-b\right)} \]
    6. Simplified76.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{-38}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{-243}:\\ \;\;\;\;a + \left(x + b \cdot \left(y - 2\right)\right)\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-87}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + y \cdot b\\ \mathbf{elif}\;t \leq 0.0003:\\ \;\;\;\;a + \left(x + b \cdot \left(y - 2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 10: 83.9% accurate, 1.1× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -9.9999999999999998e155 or 5.79999999999999957e37 < b

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+93.7%

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

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

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

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

    if -9.9999999999999998e155 < b < -1.36000000000000003e-68

    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. Step-by-step derivation
      1. associate-+l-95.8%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+95.8%

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

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

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

    if -1.36000000000000003e-68 < b < 5.79999999999999957e37

    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. Step-by-step derivation
      1. associate-+l-99.2%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 47.9% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -3.4 \cdot 10^{-94}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-97}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.29999999999999996e23 or 1.24999999999999996e89 < t

    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. Step-by-step derivation
      1. associate-+l-94.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.1%

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

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

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

    if -1.29999999999999996e23 < t < -3.3999999999999998e-94 or -8.0000000000000003e-142 < t < 3.50000000000000019e-97

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3999999999999998e-94 < t < -8.0000000000000003e-142 or 5.5000000000000003e28 < t < 1.24999999999999996e89

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+95.9%

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv60.1%

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity60.1%

        \[\leadsto x + \color{blue}{z} \]
    8. Simplified60.1%

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

    if 3.50000000000000019e-97 < t < 5.5000000000000003e28

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+23}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-142}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-97}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+28}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+89}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 12: 47.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -1.22 \cdot 10^{-87}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 3.8 \cdot 10^{-97}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 6.6 \cdot 10^{+24}:\\
\;\;\;\;a - a \cdot t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.05e21 or 1.24999999999999996e89 < t

    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. Step-by-step derivation
      1. associate-+l-94.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.1%

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

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

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

    if -1.05e21 < t < -1.2199999999999999e-87 or -1.55e-142 < t < 3.8000000000000001e-97

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2199999999999999e-87 < t < -1.55e-142 or 6.5999999999999998e24 < t < 1.24999999999999996e89

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+95.9%

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv60.1%

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity60.1%

        \[\leadsto x + \color{blue}{z} \]
    8. Simplified60.1%

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

    if 3.8000000000000001e-97 < t < 6.5999999999999998e24

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
    8. Step-by-step derivation
      1. distribute-rgt-out--54.7%

        \[\leadsto \color{blue}{1 \cdot a - t \cdot a} \]
      2. *-lft-identity54.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+21}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.22 \cdot 10^{-87}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{-142}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-97}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+24}:\\ \;\;\;\;a - a \cdot t\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+89}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 13: 48.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-93}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-97}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 6.4 \cdot 10^{+22}:\\
\;\;\;\;a - a \cdot t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.9e25 or 1.24999999999999996e89 < t

    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. Step-by-step derivation
      1. associate-+l-94.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.1%

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

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

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

    if -1.9e25 < t < -1.8999999999999999e-93 or -7.9999999999999996e-143 < t < 4.2000000000000002e-97

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e-93 < t < -7.9999999999999996e-143

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv55.4%

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity55.4%

        \[\leadsto x + \color{blue}{z} \]
    8. Simplified55.4%

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

    if 4.2000000000000002e-97 < t < 6.4e22

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
    8. Step-by-step derivation
      1. distribute-rgt-out--57.3%

        \[\leadsto \color{blue}{1 \cdot a - t \cdot a} \]
      2. *-lft-identity57.3%

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

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

    if 6.4e22 < t < 1.24999999999999996e89

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+93.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+25}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-93}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-143}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-97}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{+22}:\\ \;\;\;\;a - a \cdot t\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+89}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 14: 34.8% accurate, 1.3× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.3 \cdot 10^{-216}:\\
\;\;\;\;a \cdot \left(-t\right)\\

\mathbf{elif}\;y \leq 21500000:\\
\;\;\;\;z + x\\

\mathbf{elif}\;y \leq 1.85 \cdot 10^{+102} \lor \neg \left(y \leq 1.45 \cdot 10^{+216}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.94999999999999992e51 or 2.15e7 < y < 1.85000000000000011e102 or 1.45e216 < y

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+93.1%

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

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

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

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

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

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

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

    if -1.94999999999999992e51 < y < -3.5000000000000001e-62 or -1.2999999999999999e-216 < y < 2.15e7

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv44.3%

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity44.3%

        \[\leadsto x + \color{blue}{z} \]
    8. Simplified44.3%

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

    if -3.5000000000000001e-62 < y < -1.2999999999999999e-216

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} \]
      2. mul-1-neg39.9%

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

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

    if 1.85000000000000011e102 < y < 1.45e216

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+90.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+51}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-62}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-216}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq 21500000:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+102} \lor \neg \left(y \leq 1.45 \cdot 10^{+216}\right):\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 15: 60.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \left(b - a\right)\\ t_2 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -9 \cdot 10^{+60}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-287}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-25}:\\ \;\;\;\;x + \left(a - a \cdot t\right)\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+88}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* t (- b a)))) (t_2 (* y (- b z))))
   (if (<= y -9e+60)
     t_2
     (if (<= y -4.8e-287)
       t_1
       (if (<= y 5.2e-25) (+ x (- a (* a t))) (if (<= y 1.75e+88) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (t * (b - a));
	double t_2 = y * (b - z);
	double tmp;
	if (y <= -9e+60) {
		tmp = t_2;
	} else if (y <= -4.8e-287) {
		tmp = t_1;
	} else if (y <= 5.2e-25) {
		tmp = x + (a - (a * t));
	} else if (y <= 1.75e+88) {
		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 + (t * (b - a))
    t_2 = y * (b - z)
    if (y <= (-9d+60)) then
        tmp = t_2
    else if (y <= (-4.8d-287)) then
        tmp = t_1
    else if (y <= 5.2d-25) then
        tmp = x + (a - (a * t))
    else if (y <= 1.75d+88) 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 + (t * (b - a));
	double t_2 = y * (b - z);
	double tmp;
	if (y <= -9e+60) {
		tmp = t_2;
	} else if (y <= -4.8e-287) {
		tmp = t_1;
	} else if (y <= 5.2e-25) {
		tmp = x + (a - (a * t));
	} else if (y <= 1.75e+88) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (t * (b - a))
	t_2 = y * (b - z)
	tmp = 0
	if y <= -9e+60:
		tmp = t_2
	elif y <= -4.8e-287:
		tmp = t_1
	elif y <= 5.2e-25:
		tmp = x + (a - (a * t))
	elif y <= 1.75e+88:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(t * Float64(b - a)))
	t_2 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -9e+60)
		tmp = t_2;
	elseif (y <= -4.8e-287)
		tmp = t_1;
	elseif (y <= 5.2e-25)
		tmp = Float64(x + Float64(a - Float64(a * t)));
	elseif (y <= 1.75e+88)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (t * (b - a));
	t_2 = y * (b - z);
	tmp = 0.0;
	if (y <= -9e+60)
		tmp = t_2;
	elseif (y <= -4.8e-287)
		tmp = t_1;
	elseif (y <= 5.2e-25)
		tmp = x + (a - (a * t));
	elseif (y <= 1.75e+88)
		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[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+60], t$95$2, If[LessEqual[y, -4.8e-287], t$95$1, If[LessEqual[y, 5.2e-25], N[(x + N[(a - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+88], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4.8 \cdot 10^{-287}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.75 \cdot 10^{+88}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.00000000000000026e60 or 1.7499999999999999e88 < y

    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. Step-by-step derivation
      1. associate-+l-89.7%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+89.7%

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

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

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

    if -9.00000000000000026e60 < y < -4.79999999999999999e-287 or 5.2e-25 < y < 1.7499999999999999e88

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999999e-287 < y < 5.2e-25

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \left(t - 1\right) \cdot a} \]
    6. Step-by-step derivation
      1. sub-neg63.7%

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

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

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

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

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

        \[\leadsto x - \left(a \cdot t + \color{blue}{\left(-a\right)}\right) \]
      7. unsub-neg63.7%

        \[\leadsto x - \color{blue}{\left(a \cdot t - a\right)} \]
      8. *-commutative63.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{+60}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-287}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-25}:\\ \;\;\;\;x + \left(a - a \cdot t\right)\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+88}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 16: 74.2% accurate, 1.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.5e21 or 0.10000000000000001 < t

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.2%

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

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

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

      \[\leadsto \color{blue}{\left(x - -1 \cdot z\right)} - t \cdot \left(a - b\right) \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv84.1%

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

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

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

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

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

    if -2.5e21 < t < 1.34999999999999996e-105

    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. associate-+l-100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(t + \color{blue}{-1}\right) \cdot a \]
      3. +-commutative70.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(-1 + t\right)} \cdot a \]
      4. *-commutative70.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{a \cdot \left(-1 + t\right)} \]
      5. +-commutative70.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - a \cdot \color{blue}{\left(t + -1\right)} \]
      6. distribute-lft-in70.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(a \cdot t + a \cdot -1\right)} \]
      7. *-commutative70.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(a \cdot t + \color{blue}{-1 \cdot a}\right) \]
      8. mul-1-neg70.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(a \cdot t + \color{blue}{\left(-a\right)}\right) \]
      9. unsub-neg70.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(a \cdot t - a\right)} \]
      10. *-commutative70.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{t \cdot a} - a\right) \]
    6. Simplified70.5%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(t \cdot a - a\right)} \]
    7. Taylor expanded in t around 0 70.5%

      \[\leadsto \color{blue}{\left(a + x\right) - z \cdot \left(y - 1\right)} \]

    if 1.34999999999999996e-105 < t < 0.10000000000000001

    1. Initial program 99.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.9%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative99.9%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative99.9%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg99.9%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval99.9%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in z around 0 94.7%

      \[\leadsto \color{blue}{\left(\left(\left(y + t\right) - 2\right) \cdot b + x\right) - \left(t - 1\right) \cdot a} \]
    5. Taylor expanded in t around 0 91.5%

      \[\leadsto \color{blue}{\left(\left(y - 2\right) \cdot b + x\right) - -1 \cdot a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+21}:\\ \;\;\;\;\left(z + x\right) - t \cdot \left(a - b\right)\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-105}:\\ \;\;\;\;\left(a + x\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 0.1:\\ \;\;\;\;a + \left(x + b \cdot \left(y - 2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + x\right) - t \cdot \left(a - b\right)\\ \end{array} \]

Alternative 17: 72.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z + x\right) - t \cdot \left(a - b\right)\\ \mathbf{if}\;t \leq -2.3 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-87}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + y \cdot b\\ \mathbf{elif}\;t \leq 0.00045:\\ \;\;\;\;a + \left(x + b \cdot \left(y - 2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (+ z x) (* t (- a b)))))
   (if (<= t -2.3e+21)
     t_1
     (if (<= t 3.8e-87)
       (+ (+ x (* z (- 1.0 y))) (* y b))
       (if (<= t 0.00045) (+ a (+ x (* b (- y 2.0)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + x) - (t * (a - b));
	double tmp;
	if (t <= -2.3e+21) {
		tmp = t_1;
	} else if (t <= 3.8e-87) {
		tmp = (x + (z * (1.0 - y))) + (y * b);
	} else if (t <= 0.00045) {
		tmp = a + (x + (b * (y - 2.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z + x) - (t * (a - b))
    if (t <= (-2.3d+21)) then
        tmp = t_1
    else if (t <= 3.8d-87) then
        tmp = (x + (z * (1.0d0 - y))) + (y * b)
    else if (t <= 0.00045d0) then
        tmp = a + (x + (b * (y - 2.0d0)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + x) - (t * (a - b));
	double tmp;
	if (t <= -2.3e+21) {
		tmp = t_1;
	} else if (t <= 3.8e-87) {
		tmp = (x + (z * (1.0 - y))) + (y * b);
	} else if (t <= 0.00045) {
		tmp = a + (x + (b * (y - 2.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + x) - (t * (a - b))
	tmp = 0
	if t <= -2.3e+21:
		tmp = t_1
	elif t <= 3.8e-87:
		tmp = (x + (z * (1.0 - y))) + (y * b)
	elif t <= 0.00045:
		tmp = a + (x + (b * (y - 2.0)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + x) - Float64(t * Float64(a - b)))
	tmp = 0.0
	if (t <= -2.3e+21)
		tmp = t_1;
	elseif (t <= 3.8e-87)
		tmp = Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(y * b));
	elseif (t <= 0.00045)
		tmp = Float64(a + Float64(x + Float64(b * Float64(y - 2.0))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + x) - (t * (a - b));
	tmp = 0.0;
	if (t <= -2.3e+21)
		tmp = t_1;
	elseif (t <= 3.8e-87)
		tmp = (x + (z * (1.0 - y))) + (y * b);
	elseif (t <= 0.00045)
		tmp = a + (x + (b * (y - 2.0)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + x), $MachinePrecision] - N[(t * N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e+21], t$95$1, If[LessEqual[t, 3.8e-87], N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00045], N[(a + N[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z + x\right) - t \cdot \left(a - b\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 3.8 \cdot 10^{-87}:\\
\;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + y \cdot b\\

\mathbf{elif}\;t \leq 0.00045:\\
\;\;\;\;a + \left(x + b \cdot \left(y - 2\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.3e21 or 4.4999999999999999e-4 < t

    1. Initial program 94.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-94.2%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative94.2%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative94.2%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg94.2%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval94.2%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg94.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg94.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg94.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval94.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 94.9%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{t \cdot \left(a - b\right)} \]
    5. Taylor expanded in y around 0 84.1%

      \[\leadsto \color{blue}{\left(x - -1 \cdot z\right)} - t \cdot \left(a - b\right) \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv84.1%

        \[\leadsto \color{blue}{\left(x + \left(--1\right) \cdot z\right)} - t \cdot \left(a - b\right) \]
      2. metadata-eval84.1%

        \[\leadsto \left(x + \color{blue}{1} \cdot z\right) - t \cdot \left(a - b\right) \]
      3. *-lft-identity84.1%

        \[\leadsto \left(x + \color{blue}{z}\right) - t \cdot \left(a - b\right) \]
      4. +-commutative84.1%

        \[\leadsto \color{blue}{\left(z + x\right)} - t \cdot \left(a - b\right) \]
    7. Simplified84.1%

      \[\leadsto \color{blue}{\left(z + x\right)} - t \cdot \left(a - b\right) \]

    if -2.3e21 < t < 3.8e-87

    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. associate-+l-100.0%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg100.0%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in y around inf 71.7%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{-1 \cdot \left(y \cdot b\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg71.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(-y \cdot b\right)} \]
      2. distribute-rgt-neg-in71.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{y \cdot \left(-b\right)} \]
    6. Simplified71.7%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{y \cdot \left(-b\right)} \]

    if 3.8e-87 < t < 4.4999999999999999e-4

    1. Initial program 99.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.9%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative99.9%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative99.9%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg99.9%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval99.9%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in z around 0 99.9%

      \[\leadsto \color{blue}{\left(\left(\left(y + t\right) - 2\right) \cdot b + x\right) - \left(t - 1\right) \cdot a} \]
    5. Taylor expanded in t around 0 95.9%

      \[\leadsto \color{blue}{\left(\left(y - 2\right) \cdot b + x\right) - -1 \cdot a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{+21}:\\ \;\;\;\;\left(z + x\right) - t \cdot \left(a - b\right)\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-87}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + y \cdot b\\ \mathbf{elif}\;t \leq 0.00045:\\ \;\;\;\;a + \left(x + b \cdot \left(y - 2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + x\right) - t \cdot \left(a - b\right)\\ \end{array} \]

Alternative 18: 40.0% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;a \leq -8.6 \cdot 10^{+34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-206}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-128}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{-56}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))))
   (if (<= a -8.6e+34)
     t_1
     (if (<= a 7e-206)
       (+ z x)
       (if (<= a 1.2e-128) (* y (- z)) (if (<= a 2.15e-56) (+ z x) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double tmp;
	if (a <= -8.6e+34) {
		tmp = t_1;
	} else if (a <= 7e-206) {
		tmp = z + x;
	} else if (a <= 1.2e-128) {
		tmp = y * -z;
	} else if (a <= 2.15e-56) {
		tmp = z + x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    if (a <= (-8.6d+34)) then
        tmp = t_1
    else if (a <= 7d-206) then
        tmp = z + x
    else if (a <= 1.2d-128) then
        tmp = y * -z
    else if (a <= 2.15d-56) then
        tmp = z + x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double tmp;
	if (a <= -8.6e+34) {
		tmp = t_1;
	} else if (a <= 7e-206) {
		tmp = z + x;
	} else if (a <= 1.2e-128) {
		tmp = y * -z;
	} else if (a <= 2.15e-56) {
		tmp = z + x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	tmp = 0
	if a <= -8.6e+34:
		tmp = t_1
	elif a <= 7e-206:
		tmp = z + x
	elif a <= 1.2e-128:
		tmp = y * -z
	elif a <= 2.15e-56:
		tmp = z + x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (a <= -8.6e+34)
		tmp = t_1;
	elseif (a <= 7e-206)
		tmp = Float64(z + x);
	elseif (a <= 1.2e-128)
		tmp = Float64(y * Float64(-z));
	elseif (a <= 2.15e-56)
		tmp = Float64(z + x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	tmp = 0.0;
	if (a <= -8.6e+34)
		tmp = t_1;
	elseif (a <= 7e-206)
		tmp = z + x;
	elseif (a <= 1.2e-128)
		tmp = y * -z;
	elseif (a <= 2.15e-56)
		tmp = z + x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.6e+34], t$95$1, If[LessEqual[a, 7e-206], N[(z + x), $MachinePrecision], If[LessEqual[a, 1.2e-128], N[(y * (-z)), $MachinePrecision], If[LessEqual[a, 2.15e-56], N[(z + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -8.6 \cdot 10^{+34}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 7 \cdot 10^{-206}:\\
\;\;\;\;z + x\\

\mathbf{elif}\;a \leq 1.2 \cdot 10^{-128}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;a \leq 2.15 \cdot 10^{-56}:\\
\;\;\;\;z + x\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.59999999999999988e34 or 2.1500000000000001e-56 < a

    1. Initial program 96.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.2%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative96.2%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative96.2%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg96.2%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval96.2%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg96.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg96.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg96.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval96.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+96.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified96.2%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in a around inf 56.3%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]

    if -8.59999999999999988e34 < a < 6.99999999999999979e-206 or 1.1999999999999999e-128 < a < 2.1500000000000001e-56

    1. Initial program 97.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-97.1%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative97.1%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative97.1%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg97.1%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval97.1%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg97.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg97.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg97.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval97.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+97.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified97.1%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 79.4%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{t \cdot \left(a - b\right)} \]
    5. Taylor expanded in t around 0 55.5%

      \[\leadsto \color{blue}{x - z \cdot \left(y - 1\right)} \]
    6. Taylor expanded in y around 0 36.6%

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv36.6%

        \[\leadsto \color{blue}{x + \left(--1\right) \cdot z} \]
      2. metadata-eval36.6%

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity36.6%

        \[\leadsto x + \color{blue}{z} \]
    8. Simplified36.6%

      \[\leadsto \color{blue}{x + z} \]

    if 6.99999999999999979e-206 < a < 1.1999999999999999e-128

    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. associate-+l-100.0%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg100.0%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in y around inf 53.8%

      \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
    5. Taylor expanded in b around 0 43.6%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg43.6%

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-rgt-neg-in43.6%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]
    7. Simplified43.6%

      \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification47.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{+34}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-206}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-128}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{-56}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 19: 71.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+82} \lor \neg \left(t \leq 6.5 \cdot 10^{+31}\right):\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + x\right) + z \cdot \left(1 - y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -6e+82) (not (<= t 6.5e+31)))
   (+ x (* t (- b a)))
   (+ (+ a x) (* z (- 1.0 y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -6e+82) || !(t <= 6.5e+31)) {
		tmp = x + (t * (b - a));
	} else {
		tmp = (a + x) + (z * (1.0 - y));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((t <= (-6d+82)) .or. (.not. (t <= 6.5d+31))) then
        tmp = x + (t * (b - a))
    else
        tmp = (a + x) + (z * (1.0d0 - y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -6e+82) || !(t <= 6.5e+31)) {
		tmp = x + (t * (b - a));
	} else {
		tmp = (a + x) + (z * (1.0 - y));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -6e+82) or not (t <= 6.5e+31):
		tmp = x + (t * (b - a))
	else:
		tmp = (a + x) + (z * (1.0 - y))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -6e+82) || !(t <= 6.5e+31))
		tmp = Float64(x + Float64(t * Float64(b - a)));
	else
		tmp = Float64(Float64(a + x) + Float64(z * Float64(1.0 - y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((t <= -6e+82) || ~((t <= 6.5e+31)))
		tmp = x + (t * (b - a));
	else
		tmp = (a + x) + (z * (1.0 - y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6e+82], N[Not[LessEqual[t, 6.5e+31]], $MachinePrecision]], N[(x + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + x), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+82} \lor \neg \left(t \leq 6.5 \cdot 10^{+31}\right):\\
\;\;\;\;x + t \cdot \left(b - a\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a + x\right) + z \cdot \left(1 - y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.99999999999999978e82 or 6.5000000000000004e31 < t

    1. Initial program 94.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-94.8%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative94.8%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative94.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg94.8%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval94.8%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg94.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg94.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg94.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval94.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified94.8%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 94.3%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{t \cdot \left(a - b\right)} \]
    5. Taylor expanded in z around 0 82.0%

      \[\leadsto \color{blue}{x - t \cdot \left(a - b\right)} \]

    if -5.99999999999999978e82 < t < 6.5000000000000004e31

    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. Step-by-step derivation
      1. associate-+l-98.5%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative98.5%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative98.5%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg98.5%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval98.5%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg98.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg98.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg98.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval98.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+98.5%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified98.5%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in a around inf 72.0%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(t - 1\right) \cdot a} \]
    5. Step-by-step derivation
      1. sub-neg72.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(t + \left(-1\right)\right)} \cdot a \]
      2. metadata-eval72.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(t + \color{blue}{-1}\right) \cdot a \]
      3. +-commutative72.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(-1 + t\right)} \cdot a \]
      4. *-commutative72.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{a \cdot \left(-1 + t\right)} \]
      5. +-commutative72.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - a \cdot \color{blue}{\left(t + -1\right)} \]
      6. distribute-lft-in72.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(a \cdot t + a \cdot -1\right)} \]
      7. *-commutative72.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(a \cdot t + \color{blue}{-1 \cdot a}\right) \]
      8. mul-1-neg72.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(a \cdot t + \color{blue}{\left(-a\right)}\right) \]
      9. unsub-neg72.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(a \cdot t - a\right)} \]
      10. *-commutative72.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{t \cdot a} - a\right) \]
    6. Simplified72.0%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(t \cdot a - a\right)} \]
    7. Taylor expanded in t around 0 68.2%

      \[\leadsto \color{blue}{\left(a + x\right) - z \cdot \left(y - 1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+82} \lor \neg \left(t \leq 6.5 \cdot 10^{+31}\right):\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + x\right) + z \cdot \left(1 - y\right)\\ \end{array} \]

Alternative 20: 74.5% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+21} \lor \neg \left(t \leq 4.8 \cdot 10^{+31}\right):\\ \;\;\;\;\left(z + x\right) - t \cdot \left(a - b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + x\right) + z \cdot \left(1 - y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -3e+21) (not (<= t 4.8e+31)))
   (- (+ z x) (* t (- a b)))
   (+ (+ a x) (* z (- 1.0 y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -3e+21) || !(t <= 4.8e+31)) {
		tmp = (z + x) - (t * (a - b));
	} else {
		tmp = (a + x) + (z * (1.0 - y));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((t <= (-3d+21)) .or. (.not. (t <= 4.8d+31))) then
        tmp = (z + x) - (t * (a - b))
    else
        tmp = (a + x) + (z * (1.0d0 - y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -3e+21) || !(t <= 4.8e+31)) {
		tmp = (z + x) - (t * (a - b));
	} else {
		tmp = (a + x) + (z * (1.0 - y));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -3e+21) or not (t <= 4.8e+31):
		tmp = (z + x) - (t * (a - b))
	else:
		tmp = (a + x) + (z * (1.0 - y))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -3e+21) || !(t <= 4.8e+31))
		tmp = Float64(Float64(z + x) - Float64(t * Float64(a - b)));
	else
		tmp = Float64(Float64(a + x) + Float64(z * Float64(1.0 - y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((t <= -3e+21) || ~((t <= 4.8e+31)))
		tmp = (z + x) - (t * (a - b));
	else
		tmp = (a + x) + (z * (1.0 - y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3e+21], N[Not[LessEqual[t, 4.8e+31]], $MachinePrecision]], N[(N[(z + x), $MachinePrecision] - N[(t * N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + x), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+21} \lor \neg \left(t \leq 4.8 \cdot 10^{+31}\right):\\
\;\;\;\;\left(z + x\right) - t \cdot \left(a - b\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a + x\right) + z \cdot \left(1 - y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3e21 or 4.79999999999999965e31 < t

    1. Initial program 94.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-94.7%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative94.7%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative94.7%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg94.7%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval94.7%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg94.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg94.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg94.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval94.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified94.7%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 95.0%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{t \cdot \left(a - b\right)} \]
    5. Taylor expanded in y around 0 85.2%

      \[\leadsto \color{blue}{\left(x - -1 \cdot z\right)} - t \cdot \left(a - b\right) \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv85.2%

        \[\leadsto \color{blue}{\left(x + \left(--1\right) \cdot z\right)} - t \cdot \left(a - b\right) \]
      2. metadata-eval85.2%

        \[\leadsto \left(x + \color{blue}{1} \cdot z\right) - t \cdot \left(a - b\right) \]
      3. *-lft-identity85.2%

        \[\leadsto \left(x + \color{blue}{z}\right) - t \cdot \left(a - b\right) \]
      4. +-commutative85.2%

        \[\leadsto \color{blue}{\left(z + x\right)} - t \cdot \left(a - b\right) \]
    7. Simplified85.2%

      \[\leadsto \color{blue}{\left(z + x\right)} - t \cdot \left(a - b\right) \]

    if -3e21 < t < 4.79999999999999965e31

    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. Step-by-step derivation
      1. associate-+l-99.2%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative99.2%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative99.2%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg99.2%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval99.2%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg99.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg99.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg99.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval99.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in a around inf 71.0%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(t - 1\right) \cdot a} \]
    5. Step-by-step derivation
      1. sub-neg71.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(t + \left(-1\right)\right)} \cdot a \]
      2. metadata-eval71.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(t + \color{blue}{-1}\right) \cdot a \]
      3. +-commutative71.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(-1 + t\right)} \cdot a \]
      4. *-commutative71.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{a \cdot \left(-1 + t\right)} \]
      5. +-commutative71.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - a \cdot \color{blue}{\left(t + -1\right)} \]
      6. distribute-lft-in71.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(a \cdot t + a \cdot -1\right)} \]
      7. *-commutative71.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(a \cdot t + \color{blue}{-1 \cdot a}\right) \]
      8. mul-1-neg71.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(a \cdot t + \color{blue}{\left(-a\right)}\right) \]
      9. unsub-neg71.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(a \cdot t - a\right)} \]
      10. *-commutative71.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{t \cdot a} - a\right) \]
    6. Simplified71.0%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(t \cdot a - a\right)} \]
    7. Taylor expanded in t around 0 69.0%

      \[\leadsto \color{blue}{\left(a + x\right) - z \cdot \left(y - 1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+21} \lor \neg \left(t \leq 4.8 \cdot 10^{+31}\right):\\ \;\;\;\;\left(z + x\right) - t \cdot \left(a - b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + x\right) + z \cdot \left(1 - y\right)\\ \end{array} \]

Alternative 21: 36.7% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(-z\right)\\ \mathbf{if}\;y \leq -4.8 \cdot 10^{+48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+18}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+102} \lor \neg \left(y \leq 1.7 \cdot 10^{+216}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- z))))
   (if (<= y -4.8e+48)
     t_1
     (if (<= y 1.5e+18)
       (+ z x)
       (if (or (<= y 2.15e+102) (not (<= y 1.7e+216))) t_1 (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double tmp;
	if (y <= -4.8e+48) {
		tmp = t_1;
	} else if (y <= 1.5e+18) {
		tmp = z + x;
	} else if ((y <= 2.15e+102) || !(y <= 1.7e+216)) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * -z
    if (y <= (-4.8d+48)) then
        tmp = t_1
    else if (y <= 1.5d+18) then
        tmp = z + x
    else if ((y <= 2.15d+102) .or. (.not. (y <= 1.7d+216))) then
        tmp = t_1
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double tmp;
	if (y <= -4.8e+48) {
		tmp = t_1;
	} else if (y <= 1.5e+18) {
		tmp = z + x;
	} else if ((y <= 2.15e+102) || !(y <= 1.7e+216)) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * -z
	tmp = 0
	if y <= -4.8e+48:
		tmp = t_1
	elif y <= 1.5e+18:
		tmp = z + x
	elif (y <= 2.15e+102) or not (y <= 1.7e+216):
		tmp = t_1
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(-z))
	tmp = 0.0
	if (y <= -4.8e+48)
		tmp = t_1;
	elseif (y <= 1.5e+18)
		tmp = Float64(z + x);
	elseif ((y <= 2.15e+102) || !(y <= 1.7e+216))
		tmp = t_1;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * -z;
	tmp = 0.0;
	if (y <= -4.8e+48)
		tmp = t_1;
	elseif (y <= 1.5e+18)
		tmp = z + x;
	elseif ((y <= 2.15e+102) || ~((y <= 1.7e+216)))
		tmp = t_1;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, If[LessEqual[y, -4.8e+48], t$95$1, If[LessEqual[y, 1.5e+18], N[(z + x), $MachinePrecision], If[Or[LessEqual[y, 2.15e+102], N[Not[LessEqual[y, 1.7e+216]], $MachinePrecision]], t$95$1, N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+48}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.5 \cdot 10^{+18}:\\
\;\;\;\;z + x\\

\mathbf{elif}\;y \leq 2.15 \cdot 10^{+102} \lor \neg \left(y \leq 1.7 \cdot 10^{+216}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;y \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.8000000000000002e48 or 1.5e18 < y < 2.15e102 or 1.70000000000000013e216 < y

    1. Initial program 93.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-93.1%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative93.1%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative93.1%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg93.1%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval93.1%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg93.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg93.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg93.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval93.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+93.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified93.1%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in y around inf 64.5%

      \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
    5. Taylor expanded in b around 0 40.3%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg40.3%

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-rgt-neg-in40.3%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]
    7. Simplified40.3%

      \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]

    if -4.8000000000000002e48 < y < 1.5e18

    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. associate-+l-100.0%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg100.0%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 78.0%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{t \cdot \left(a - b\right)} \]
    5. Taylor expanded in t around 0 38.7%

      \[\leadsto \color{blue}{x - z \cdot \left(y - 1\right)} \]
    6. Taylor expanded in y around 0 36.4%

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv36.4%

        \[\leadsto \color{blue}{x + \left(--1\right) \cdot z} \]
      2. metadata-eval36.4%

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity36.4%

        \[\leadsto x + \color{blue}{z} \]
    8. Simplified36.4%

      \[\leadsto \color{blue}{x + z} \]

    if 2.15e102 < y < 1.70000000000000013e216

    1. Initial program 90.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-90.0%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative90.0%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative90.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg90.0%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval90.0%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg90.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg90.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg90.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval90.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+90.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified90.0%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in z around 0 66.1%

      \[\leadsto \color{blue}{\left(\left(\left(y + t\right) - 2\right) \cdot b + x\right) - \left(t - 1\right) \cdot a} \]
    5. Taylor expanded in y around inf 51.6%

      \[\leadsto \color{blue}{y \cdot b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification38.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+48}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+18}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+102} \lor \neg \left(y \leq 1.7 \cdot 10^{+216}\right):\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 22: 61.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+60} \lor \neg \left(y \leq 3.4 \cdot 10^{+90}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= y -4e+60) (not (<= y 3.4e+90)))
   (* y (- b z))
   (+ x (* t (- b a)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -4e+60) || !(y <= 3.4e+90)) {
		tmp = y * (b - z);
	} else {
		tmp = x + (t * (b - a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((y <= (-4d+60)) .or. (.not. (y <= 3.4d+90))) then
        tmp = y * (b - z)
    else
        tmp = x + (t * (b - a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -4e+60) || !(y <= 3.4e+90)) {
		tmp = y * (b - z);
	} else {
		tmp = x + (t * (b - a));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -4e+60) or not (y <= 3.4e+90):
		tmp = y * (b - z)
	else:
		tmp = x + (t * (b - a))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((y <= -4e+60) || !(y <= 3.4e+90))
		tmp = Float64(y * Float64(b - z));
	else
		tmp = Float64(x + Float64(t * Float64(b - a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((y <= -4e+60) || ~((y <= 3.4e+90)))
		tmp = y * (b - z);
	else
		tmp = x + (t * (b - a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4e+60], N[Not[LessEqual[y, 3.4e+90]], $MachinePrecision]], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+60} \lor \neg \left(y \leq 3.4 \cdot 10^{+90}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

\mathbf{else}:\\
\;\;\;\;x + t \cdot \left(b - a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.9999999999999998e60 or 3.40000000000000018e90 < y

    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. Step-by-step derivation
      1. associate-+l-89.7%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative89.7%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative89.7%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg89.7%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval89.7%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg89.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg89.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg89.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval89.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+89.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in y around inf 76.7%

      \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]

    if -3.9999999999999998e60 < y < 3.40000000000000018e90

    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. associate-+l-100.0%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg100.0%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 79.0%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{t \cdot \left(a - b\right)} \]
    5. Taylor expanded in z around 0 61.2%

      \[\leadsto \color{blue}{x - t \cdot \left(a - b\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+60} \lor \neg \left(y \leq 3.4 \cdot 10^{+90}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 23: 26.2% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+56}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+62}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.35e+56) (* y b) (if (<= y 3.2e+62) x (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.35e+56) {
		tmp = y * b;
	} else if (y <= 3.2e+62) {
		tmp = x;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (y <= (-1.35d+56)) then
        tmp = y * b
    else if (y <= 3.2d+62) then
        tmp = x
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.35e+56) {
		tmp = y * b;
	} else if (y <= 3.2e+62) {
		tmp = x;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.35e+56:
		tmp = y * b
	elif y <= 3.2e+62:
		tmp = x
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.35e+56)
		tmp = Float64(y * b);
	elseif (y <= 3.2e+62)
		tmp = x;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -1.35e+56)
		tmp = y * b;
	elseif (y <= 3.2e+62)
		tmp = x;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.35e+56], N[(y * b), $MachinePrecision], If[LessEqual[y, 3.2e+62], x, N[(y * b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+56}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+62}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.35000000000000005e56 or 3.19999999999999984e62 < y

    1. Initial program 90.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-90.7%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative90.7%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative90.7%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg90.7%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval90.7%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg90.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg90.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg90.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval90.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+90.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified90.7%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in z around 0 57.2%

      \[\leadsto \color{blue}{\left(\left(\left(y + t\right) - 2\right) \cdot b + x\right) - \left(t - 1\right) \cdot a} \]
    5. Taylor expanded in y around inf 36.1%

      \[\leadsto \color{blue}{y \cdot b} \]

    if -1.35000000000000005e56 < y < 3.19999999999999984e62

    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. associate-+l-100.0%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg100.0%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in x around inf 22.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification26.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+56}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+62}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 24: 35.2% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -9.4 \cdot 10^{+55}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+62}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -9.4e+55) (* y b) (if (<= y 1.75e+62) (+ z x) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -9.4e+55) {
		tmp = y * b;
	} else if (y <= 1.75e+62) {
		tmp = z + x;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (y <= (-9.4d+55)) then
        tmp = y * b
    else if (y <= 1.75d+62) then
        tmp = z + x
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -9.4e+55) {
		tmp = y * b;
	} else if (y <= 1.75e+62) {
		tmp = z + x;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -9.4e+55:
		tmp = y * b
	elif y <= 1.75e+62:
		tmp = z + x
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -9.4e+55)
		tmp = Float64(y * b);
	elseif (y <= 1.75e+62)
		tmp = Float64(z + x);
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -9.4e+55)
		tmp = y * b;
	elseif (y <= 1.75e+62)
		tmp = z + x;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9.4e+55], N[(y * b), $MachinePrecision], If[LessEqual[y, 1.75e+62], N[(z + x), $MachinePrecision], N[(y * b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.4 \cdot 10^{+55}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq 1.75 \cdot 10^{+62}:\\
\;\;\;\;z + x\\

\mathbf{else}:\\
\;\;\;\;y \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.4000000000000001e55 or 1.74999999999999992e62 < y

    1. Initial program 90.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. Step-by-step derivation
      1. associate-+l-90.8%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative90.8%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative90.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg90.8%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval90.8%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg90.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg90.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg90.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval90.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+90.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified90.8%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in z around 0 56.6%

      \[\leadsto \color{blue}{\left(\left(\left(y + t\right) - 2\right) \cdot b + x\right) - \left(t - 1\right) \cdot a} \]
    5. Taylor expanded in y around inf 35.7%

      \[\leadsto \color{blue}{y \cdot b} \]

    if -9.4000000000000001e55 < y < 1.74999999999999992e62

    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. associate-+l-100.0%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg100.0%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 79.4%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{t \cdot \left(a - b\right)} \]
    5. Taylor expanded in t around 0 40.1%

      \[\leadsto \color{blue}{x - z \cdot \left(y - 1\right)} \]
    6. Taylor expanded in y around 0 33.9%

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv33.9%

        \[\leadsto \color{blue}{x + \left(--1\right) \cdot z} \]
      2. metadata-eval33.9%

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity33.9%

        \[\leadsto x + \color{blue}{z} \]
    8. Simplified33.9%

      \[\leadsto \color{blue}{x + z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.4 \cdot 10^{+55}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+62}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 25: 21.6% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.9 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+52}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -5.9e+29) x (if (<= x 9.5e+52) a x)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -5.9e+29) {
		tmp = x;
	} else if (x <= 9.5e+52) {
		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 <= (-5.9d+29)) then
        tmp = x
    else if (x <= 9.5d+52) 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 <= -5.9e+29) {
		tmp = x;
	} else if (x <= 9.5e+52) {
		tmp = a;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -5.9e+29:
		tmp = x
	elif x <= 9.5e+52:
		tmp = a
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -5.9e+29)
		tmp = x;
	elseif (x <= 9.5e+52)
		tmp = a;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -5.9e+29)
		tmp = x;
	elseif (x <= 9.5e+52)
		tmp = a;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -5.9e+29], x, If[LessEqual[x, 9.5e+52], a, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.9 \cdot 10^{+29}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+52}:\\
\;\;\;\;a\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.8999999999999999e29 or 9.49999999999999994e52 < x

    1. Initial program 94.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-94.6%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative94.6%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative94.6%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg94.6%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval94.6%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg94.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg94.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg94.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval94.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified94.6%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in x around inf 31.5%

      \[\leadsto \color{blue}{x} \]

    if -5.8999999999999999e29 < x < 9.49999999999999994e52

    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. Step-by-step derivation
      1. associate-+l-98.6%

        \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
      2. *-commutative98.6%

        \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      3. *-commutative98.6%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg98.6%

        \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      5. metadata-eval98.6%

        \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      6. remove-double-neg98.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg98.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg98.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval98.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+98.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified98.6%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in a around inf 42.6%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
    5. Taylor expanded in t around 0 17.5%

      \[\leadsto \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification23.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.9 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+52}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 26: 11.8% accurate, 21.0× speedup?

\[\begin{array}{l} \\ a \end{array} \]
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
	return a;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return a;
}
def code(x, y, z, t, a, b):
	return a
function code(x, y, z, t, a, b)
	return a
end
function tmp = code(x, y, z, t, a, b)
	tmp = a;
end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}

\\
a
\end{array}
Derivation
  1. Initial program 96.9%

    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
  2. Step-by-step derivation
    1. associate-+l-96.9%

      \[\leadsto \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right)} \]
    2. *-commutative96.9%

      \[\leadsto \left(x - \color{blue}{z \cdot \left(y - 1\right)}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    3. *-commutative96.9%

      \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    4. sub-neg96.9%

      \[\leadsto \left(x - \color{blue}{\left(y + \left(-1\right)\right)} \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    5. metadata-eval96.9%

      \[\leadsto \left(x - \left(y + \color{blue}{-1}\right) \cdot z\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    6. remove-double-neg96.9%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    7. remove-double-neg96.9%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    8. sub-neg96.9%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    9. metadata-eval96.9%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    10. associate--l+96.9%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
  3. Simplified96.9%

    \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
  4. Taylor expanded in a around inf 32.3%

    \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
  5. Taylor expanded in t around 0 11.8%

    \[\leadsto \color{blue}{a} \]
  6. Final simplification11.8%

    \[\leadsto a \]

Reproduce

?
herbie shell --seed 2023199 
(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)))