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

Percentage Accurate: 95.4% → 97.9%
Time: 14.1s
Alternatives: 25
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 25 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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + 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 42.1%

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

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

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

Alternative 2: 97.7% 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 92.6%

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

      \[\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-def94.9%

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

      \[\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+94.9%

      \[\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-neg94.9%

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

      \[\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-neg96.9%

      \[\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-neg96.9%

      \[\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-eval96.9%

      \[\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-in96.9%

      \[\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-in96.9%

      \[\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-neg96.9%

      \[\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-neg96.9%

      \[\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-eval96.9%

      \[\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. Simplified96.9%

    \[\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 simplification96.9%

    \[\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 3: 67.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \left(b - a\right)\\ t_2 := \left(x + a\right) + z \cdot \left(1 - y\right)\\ t_3 := b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{if}\;b \leq -1.95 \cdot 10^{+102}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -6.8 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3.8 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -5.6 \cdot 10^{-47}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-114}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5.1 \cdot 10^{+103}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* t (- b a))))
        (t_2 (+ (+ x a) (* z (- 1.0 y))))
        (t_3 (* b (- (+ t y) 2.0))))
   (if (<= b -1.95e+102)
     t_3
     (if (<= b -6.8e+22)
       t_1
       (if (<= b -3.8e-11)
         (* y (- b z))
         (if (<= b -5.6e-47)
           (- a (* t a))
           (if (<= b 3.7e-155)
             t_2
             (if (<= b 1.5e-114) t_1 (if (<= b 5.1e+103) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (t * (b - a));
	double t_2 = (x + a) + (z * (1.0 - y));
	double t_3 = b * ((t + y) - 2.0);
	double tmp;
	if (b <= -1.95e+102) {
		tmp = t_3;
	} else if (b <= -6.8e+22) {
		tmp = t_1;
	} else if (b <= -3.8e-11) {
		tmp = y * (b - z);
	} else if (b <= -5.6e-47) {
		tmp = a - (t * a);
	} else if (b <= 3.7e-155) {
		tmp = t_2;
	} else if (b <= 1.5e-114) {
		tmp = t_1;
	} else if (b <= 5.1e+103) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (t * (b - a))
    t_2 = (x + a) + (z * (1.0d0 - y))
    t_3 = b * ((t + y) - 2.0d0)
    if (b <= (-1.95d+102)) then
        tmp = t_3
    else if (b <= (-6.8d+22)) then
        tmp = t_1
    else if (b <= (-3.8d-11)) then
        tmp = y * (b - z)
    else if (b <= (-5.6d-47)) then
        tmp = a - (t * a)
    else if (b <= 3.7d-155) then
        tmp = t_2
    else if (b <= 1.5d-114) then
        tmp = t_1
    else if (b <= 5.1d+103) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (t * (b - a));
	double t_2 = (x + a) + (z * (1.0 - y));
	double t_3 = b * ((t + y) - 2.0);
	double tmp;
	if (b <= -1.95e+102) {
		tmp = t_3;
	} else if (b <= -6.8e+22) {
		tmp = t_1;
	} else if (b <= -3.8e-11) {
		tmp = y * (b - z);
	} else if (b <= -5.6e-47) {
		tmp = a - (t * a);
	} else if (b <= 3.7e-155) {
		tmp = t_2;
	} else if (b <= 1.5e-114) {
		tmp = t_1;
	} else if (b <= 5.1e+103) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (t * (b - a))
	t_2 = (x + a) + (z * (1.0 - y))
	t_3 = b * ((t + y) - 2.0)
	tmp = 0
	if b <= -1.95e+102:
		tmp = t_3
	elif b <= -6.8e+22:
		tmp = t_1
	elif b <= -3.8e-11:
		tmp = y * (b - z)
	elif b <= -5.6e-47:
		tmp = a - (t * a)
	elif b <= 3.7e-155:
		tmp = t_2
	elif b <= 1.5e-114:
		tmp = t_1
	elif b <= 5.1e+103:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(t * Float64(b - a)))
	t_2 = Float64(Float64(x + a) + Float64(z * Float64(1.0 - y)))
	t_3 = Float64(b * Float64(Float64(t + y) - 2.0))
	tmp = 0.0
	if (b <= -1.95e+102)
		tmp = t_3;
	elseif (b <= -6.8e+22)
		tmp = t_1;
	elseif (b <= -3.8e-11)
		tmp = Float64(y * Float64(b - z));
	elseif (b <= -5.6e-47)
		tmp = Float64(a - Float64(t * a));
	elseif (b <= 3.7e-155)
		tmp = t_2;
	elseif (b <= 1.5e-114)
		tmp = t_1;
	elseif (b <= 5.1e+103)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (t * (b - a));
	t_2 = (x + a) + (z * (1.0 - y));
	t_3 = b * ((t + y) - 2.0);
	tmp = 0.0;
	if (b <= -1.95e+102)
		tmp = t_3;
	elseif (b <= -6.8e+22)
		tmp = t_1;
	elseif (b <= -3.8e-11)
		tmp = y * (b - z);
	elseif (b <= -5.6e-47)
		tmp = a - (t * a);
	elseif (b <= 3.7e-155)
		tmp = t_2;
	elseif (b <= 1.5e-114)
		tmp = t_1;
	elseif (b <= 5.1e+103)
		tmp = t_2;
	else
		tmp = t_3;
	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[(N[(x + a), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.95e+102], t$95$3, If[LessEqual[b, -6.8e+22], t$95$1, If[LessEqual[b, -3.8e-11], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.6e-47], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.7e-155], t$95$2, If[LessEqual[b, 1.5e-114], t$95$1, If[LessEqual[b, 5.1e+103], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;b \leq -5.6 \cdot 10^{-47}:\\
\;\;\;\;a - t \cdot a\\

\mathbf{elif}\;b \leq 3.7 \cdot 10^{-155}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 1.5 \cdot 10^{-114}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 5.1 \cdot 10^{+103}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.9499999999999999e102 or 5.1000000000000002e103 < b

    1. Initial program 87.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 b around inf 89.6%

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

    if -1.9499999999999999e102 < b < -6.8e22 or 3.7e-155 < b < 1.50000000000000008e-114

    1. Initial program 85.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-85.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. *-commutative85.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. *-commutative85.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-neg85.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-eval85.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-neg85.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-neg85.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-neg85.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-eval85.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+85.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. Simplified85.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 78.8%

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

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

    if -6.8e22 < b < -3.7999999999999998e-11

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

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

    if -3.7999999999999998e-11 < b < -5.59999999999999986e-47

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

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

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

        \[\leadsto a \cdot \left(1 + \color{blue}{-1 \cdot t}\right) \]
      3. distribute-rgt-in89.0%

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

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

        \[\leadsto a + \color{blue}{\left(t \cdot -1\right)} \cdot a \]
      6. associate-*r*89.0%

        \[\leadsto a + \color{blue}{t \cdot \left(-1 \cdot a\right)} \]
      7. mul-1-neg89.0%

        \[\leadsto a + t \cdot \color{blue}{\left(-a\right)} \]
      8. distribute-rgt-neg-out89.0%

        \[\leadsto a + \color{blue}{\left(-t \cdot a\right)} \]
      9. *-commutative89.0%

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

        \[\leadsto \color{blue}{a - a \cdot t} \]
      11. *-commutative89.0%

        \[\leadsto a - \color{blue}{t \cdot a} \]
    6. Simplified89.0%

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

    if -5.59999999999999986e-47 < b < 3.7e-155 or 1.50000000000000008e-114 < b < 5.1000000000000002e103

    1. Initial program 95.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-95.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. *-commutative95.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. *-commutative95.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-neg95.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-eval95.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-neg95.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-neg95.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-neg95.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-eval95.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+95.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. Simplified95.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 0 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.95 \cdot 10^{+102}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -6.8 \cdot 10^{+22}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq -3.8 \cdot 10^{-11}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -5.6 \cdot 10^{-47}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-155}:\\ \;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-114}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 5.1 \cdot 10^{+103}:\\ \;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 4: 54.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z + \left(x + a\right)\\ t_2 := t \cdot \left(b - a\right)\\ t_3 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.7 \cdot 10^{+67}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -1.62 \cdot 10^{-182}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-308}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 62000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+49}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+77}:\\ \;\;\;\;x + t \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ z (+ x a))) (t_2 (* t (- b a))) (t_3 (* y (- b z))))
   (if (<= y -1.7e+67)
     t_3
     (if (<= y -1.62e-182)
       t_1
       (if (<= y -4.7e-308)
         t_2
         (if (<= y 1.12e-126)
           t_1
           (if (<= y 2.7e-74)
             t_2
             (if (<= y 62000000.0)
               t_1
               (if (<= y 5.4e+49)
                 (- a (* t a))
                 (if (<= y 1.9e+77) (+ x (* t b)) t_3))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (x + a);
	double t_2 = t * (b - a);
	double t_3 = y * (b - z);
	double tmp;
	if (y <= -1.7e+67) {
		tmp = t_3;
	} else if (y <= -1.62e-182) {
		tmp = t_1;
	} else if (y <= -4.7e-308) {
		tmp = t_2;
	} else if (y <= 1.12e-126) {
		tmp = t_1;
	} else if (y <= 2.7e-74) {
		tmp = t_2;
	} else if (y <= 62000000.0) {
		tmp = t_1;
	} else if (y <= 5.4e+49) {
		tmp = a - (t * a);
	} else if (y <= 1.9e+77) {
		tmp = x + (t * b);
	} 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 = z + (x + a)
    t_2 = t * (b - a)
    t_3 = y * (b - z)
    if (y <= (-1.7d+67)) then
        tmp = t_3
    else if (y <= (-1.62d-182)) then
        tmp = t_1
    else if (y <= (-4.7d-308)) then
        tmp = t_2
    else if (y <= 1.12d-126) then
        tmp = t_1
    else if (y <= 2.7d-74) then
        tmp = t_2
    else if (y <= 62000000.0d0) then
        tmp = t_1
    else if (y <= 5.4d+49) then
        tmp = a - (t * a)
    else if (y <= 1.9d+77) then
        tmp = x + (t * b)
    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 = z + (x + a);
	double t_2 = t * (b - a);
	double t_3 = y * (b - z);
	double tmp;
	if (y <= -1.7e+67) {
		tmp = t_3;
	} else if (y <= -1.62e-182) {
		tmp = t_1;
	} else if (y <= -4.7e-308) {
		tmp = t_2;
	} else if (y <= 1.12e-126) {
		tmp = t_1;
	} else if (y <= 2.7e-74) {
		tmp = t_2;
	} else if (y <= 62000000.0) {
		tmp = t_1;
	} else if (y <= 5.4e+49) {
		tmp = a - (t * a);
	} else if (y <= 1.9e+77) {
		tmp = x + (t * b);
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z + (x + a)
	t_2 = t * (b - a)
	t_3 = y * (b - z)
	tmp = 0
	if y <= -1.7e+67:
		tmp = t_3
	elif y <= -1.62e-182:
		tmp = t_1
	elif y <= -4.7e-308:
		tmp = t_2
	elif y <= 1.12e-126:
		tmp = t_1
	elif y <= 2.7e-74:
		tmp = t_2
	elif y <= 62000000.0:
		tmp = t_1
	elif y <= 5.4e+49:
		tmp = a - (t * a)
	elif y <= 1.9e+77:
		tmp = x + (t * b)
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z + Float64(x + a))
	t_2 = Float64(t * Float64(b - a))
	t_3 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -1.7e+67)
		tmp = t_3;
	elseif (y <= -1.62e-182)
		tmp = t_1;
	elseif (y <= -4.7e-308)
		tmp = t_2;
	elseif (y <= 1.12e-126)
		tmp = t_1;
	elseif (y <= 2.7e-74)
		tmp = t_2;
	elseif (y <= 62000000.0)
		tmp = t_1;
	elseif (y <= 5.4e+49)
		tmp = Float64(a - Float64(t * a));
	elseif (y <= 1.9e+77)
		tmp = Float64(x + Float64(t * b));
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z + (x + a);
	t_2 = t * (b - a);
	t_3 = y * (b - z);
	tmp = 0.0;
	if (y <= -1.7e+67)
		tmp = t_3;
	elseif (y <= -1.62e-182)
		tmp = t_1;
	elseif (y <= -4.7e-308)
		tmp = t_2;
	elseif (y <= 1.12e-126)
		tmp = t_1;
	elseif (y <= 2.7e-74)
		tmp = t_2;
	elseif (y <= 62000000.0)
		tmp = t_1;
	elseif (y <= 5.4e+49)
		tmp = a - (t * a);
	elseif (y <= 1.9e+77)
		tmp = x + (t * b);
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+67], t$95$3, If[LessEqual[y, -1.62e-182], t$95$1, If[LessEqual[y, -4.7e-308], t$95$2, If[LessEqual[y, 1.12e-126], t$95$1, If[LessEqual[y, 2.7e-74], t$95$2, If[LessEqual[y, 62000000.0], t$95$1, If[LessEqual[y, 5.4e+49], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+77], N[(x + N[(t * b), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.62 \cdot 10^{-182}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4.7 \cdot 10^{-308}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 1.12 \cdot 10^{-126}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-74}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 62000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 5.4 \cdot 10^{+49}:\\
\;\;\;\;a - t \cdot a\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+77}:\\
\;\;\;\;x + t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.7000000000000001e67 or 1.9000000000000001e77 < y

    1. Initial program 85.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-85.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. *-commutative85.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. *-commutative85.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-neg85.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-eval85.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-neg85.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-neg85.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-neg85.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-eval85.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+85.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. Simplified85.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 y around inf 69.5%

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

    if -1.7000000000000001e67 < y < -1.62000000000000013e-182 or -4.7000000000000005e-308 < y < 1.12e-126 or 2.70000000000000018e-74 < y < 6.2e7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(a + x\right) - \color{blue}{-1 \cdot z} \]
    10. Step-by-step derivation
      1. mul-1-neg65.6%

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

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

    if -1.62000000000000013e-182 < y < -4.7000000000000005e-308 or 1.12e-126 < y < 2.70000000000000018e-74

    1. Initial program 97.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-97.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. *-commutative97.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. *-commutative97.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-neg97.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-eval97.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-neg97.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-neg97.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-neg97.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-eval97.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+97.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. Simplified97.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 63.8%

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

    if 6.2e7 < y < 5.4000000000000002e49

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

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

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

        \[\leadsto a \cdot \left(1 + \color{blue}{-1 \cdot t}\right) \]
      3. distribute-rgt-in56.6%

        \[\leadsto \color{blue}{1 \cdot a + \left(-1 \cdot t\right) \cdot a} \]
      4. *-lft-identity56.6%

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

        \[\leadsto a + \color{blue}{\left(t \cdot -1\right)} \cdot a \]
      6. associate-*r*56.6%

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

        \[\leadsto a + t \cdot \color{blue}{\left(-a\right)} \]
      8. distribute-rgt-neg-out56.6%

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

        \[\leadsto a + \left(-\color{blue}{a \cdot t}\right) \]
      10. unsub-neg56.6%

        \[\leadsto \color{blue}{a - a \cdot t} \]
      11. *-commutative56.6%

        \[\leadsto a - \color{blue}{t \cdot a} \]
    6. Simplified56.6%

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

    if 5.4000000000000002e49 < y < 1.9000000000000001e77

    1. Initial program 85.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-85.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. *-commutative85.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. *-commutative85.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-neg85.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-eval85.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-neg85.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-neg85.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-neg85.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-eval85.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+85.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. Simplified85.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 t around inf 85.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 85.8%

      \[\leadsto \color{blue}{x - t \cdot \left(a - b\right)} \]
    6. Taylor expanded in a around 0 71.6%

      \[\leadsto \color{blue}{x - -1 \cdot \left(t \cdot b\right)} \]
    7. Step-by-step derivation
      1. associate-*r*71.6%

        \[\leadsto x - \color{blue}{\left(-1 \cdot t\right) \cdot b} \]
      2. neg-mul-171.6%

        \[\leadsto x - \color{blue}{\left(-t\right)} \cdot b \]
    8. Simplified71.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+67}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.62 \cdot 10^{-182}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-308}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-126}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-74}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 62000000:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+49}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+77}:\\ \;\;\;\;x + t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 5: 53.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z + \left(x + a\right)\\ t_2 := t \cdot \left(b - a\right)\\ t_3 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.7 \cdot 10^{+67}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-182}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-308}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-126}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{-51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+25}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ z (+ x a))) (t_2 (* t (- b a))) (t_3 (* y (- b z))))
   (if (<= y -1.7e+67)
     t_3
     (if (<= y -1.45e-182)
       t_1
       (if (<= y 7.6e-308)
         t_2
         (if (<= y 1.12e-126)
           t_1
           (if (<= y 1.05e-72)
             t_2
             (if (<= y 2.65e-51)
               t_1
               (if (<= y 6e+25) (* b (- (+ t y) 2.0)) t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (x + a);
	double t_2 = t * (b - a);
	double t_3 = y * (b - z);
	double tmp;
	if (y <= -1.7e+67) {
		tmp = t_3;
	} else if (y <= -1.45e-182) {
		tmp = t_1;
	} else if (y <= 7.6e-308) {
		tmp = t_2;
	} else if (y <= 1.12e-126) {
		tmp = t_1;
	} else if (y <= 1.05e-72) {
		tmp = t_2;
	} else if (y <= 2.65e-51) {
		tmp = t_1;
	} else if (y <= 6e+25) {
		tmp = b * ((t + y) - 2.0);
	} 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 = z + (x + a)
    t_2 = t * (b - a)
    t_3 = y * (b - z)
    if (y <= (-1.7d+67)) then
        tmp = t_3
    else if (y <= (-1.45d-182)) then
        tmp = t_1
    else if (y <= 7.6d-308) then
        tmp = t_2
    else if (y <= 1.12d-126) then
        tmp = t_1
    else if (y <= 1.05d-72) then
        tmp = t_2
    else if (y <= 2.65d-51) then
        tmp = t_1
    else if (y <= 6d+25) then
        tmp = b * ((t + y) - 2.0d0)
    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 = z + (x + a);
	double t_2 = t * (b - a);
	double t_3 = y * (b - z);
	double tmp;
	if (y <= -1.7e+67) {
		tmp = t_3;
	} else if (y <= -1.45e-182) {
		tmp = t_1;
	} else if (y <= 7.6e-308) {
		tmp = t_2;
	} else if (y <= 1.12e-126) {
		tmp = t_1;
	} else if (y <= 1.05e-72) {
		tmp = t_2;
	} else if (y <= 2.65e-51) {
		tmp = t_1;
	} else if (y <= 6e+25) {
		tmp = b * ((t + y) - 2.0);
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z + (x + a)
	t_2 = t * (b - a)
	t_3 = y * (b - z)
	tmp = 0
	if y <= -1.7e+67:
		tmp = t_3
	elif y <= -1.45e-182:
		tmp = t_1
	elif y <= 7.6e-308:
		tmp = t_2
	elif y <= 1.12e-126:
		tmp = t_1
	elif y <= 1.05e-72:
		tmp = t_2
	elif y <= 2.65e-51:
		tmp = t_1
	elif y <= 6e+25:
		tmp = b * ((t + y) - 2.0)
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z + Float64(x + a))
	t_2 = Float64(t * Float64(b - a))
	t_3 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -1.7e+67)
		tmp = t_3;
	elseif (y <= -1.45e-182)
		tmp = t_1;
	elseif (y <= 7.6e-308)
		tmp = t_2;
	elseif (y <= 1.12e-126)
		tmp = t_1;
	elseif (y <= 1.05e-72)
		tmp = t_2;
	elseif (y <= 2.65e-51)
		tmp = t_1;
	elseif (y <= 6e+25)
		tmp = Float64(b * Float64(Float64(t + y) - 2.0));
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z + (x + a);
	t_2 = t * (b - a);
	t_3 = y * (b - z);
	tmp = 0.0;
	if (y <= -1.7e+67)
		tmp = t_3;
	elseif (y <= -1.45e-182)
		tmp = t_1;
	elseif (y <= 7.6e-308)
		tmp = t_2;
	elseif (y <= 1.12e-126)
		tmp = t_1;
	elseif (y <= 1.05e-72)
		tmp = t_2;
	elseif (y <= 2.65e-51)
		tmp = t_1;
	elseif (y <= 6e+25)
		tmp = b * ((t + y) - 2.0);
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+67], t$95$3, If[LessEqual[y, -1.45e-182], t$95$1, If[LessEqual[y, 7.6e-308], t$95$2, If[LessEqual[y, 1.12e-126], t$95$1, If[LessEqual[y, 1.05e-72], t$95$2, If[LessEqual[y, 2.65e-51], t$95$1, If[LessEqual[y, 6e+25], N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.45 \cdot 10^{-182}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 7.6 \cdot 10^{-308}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 1.12 \cdot 10^{-126}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-72}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 2.65 \cdot 10^{-51}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.7000000000000001e67 or 6.00000000000000011e25 < y

    1. Initial program 86.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-86.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. *-commutative86.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. *-commutative86.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-neg86.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-eval86.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-neg86.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-neg86.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-neg86.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-eval86.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+86.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. Simplified86.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 y around inf 66.5%

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

    if -1.7000000000000001e67 < y < -1.44999999999999993e-182 or 7.59999999999999951e-308 < y < 1.12e-126 or 1.05e-72 < y < 2.64999999999999987e-51

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(a + x\right) - \color{blue}{-1 \cdot z} \]
    10. Step-by-step derivation
      1. mul-1-neg68.4%

        \[\leadsto \left(a + x\right) - \color{blue}{\left(-z\right)} \]
    11. Simplified68.4%

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

    if -1.44999999999999993e-182 < y < 7.59999999999999951e-308 or 1.12e-126 < y < 1.05e-72

    1. Initial program 97.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-97.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. *-commutative97.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. *-commutative97.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-neg97.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-eval97.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-neg97.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-neg97.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-neg97.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-eval97.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+97.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. Simplified97.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 63.8%

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

    if 2.64999999999999987e-51 < y < 6.00000000000000011e25

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+67}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-182}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-308}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-126}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-72}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{-51}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+25}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 6: 60.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \left(b - a\right)\\ t_2 := x + z \cdot \left(1 - y\right)\\ t_3 := b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{if}\;b \leq -9.2 \cdot 10^{+100}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -9 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -2.3 \cdot 10^{-14}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-54}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{-156}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 6.7 \cdot 10^{-115}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+113}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* t (- b a))))
        (t_2 (+ x (* z (- 1.0 y))))
        (t_3 (* b (- (+ t y) 2.0))))
   (if (<= b -9.2e+100)
     t_3
     (if (<= b -9e+22)
       t_1
       (if (<= b -2.3e-14)
         (* y (- b z))
         (if (<= b -2.25e-54)
           (- a (* t a))
           (if (<= b 2.35e-156)
             t_2
             (if (<= b 6.7e-115) t_1 (if (<= b 2.4e+113) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (t * (b - a));
	double t_2 = x + (z * (1.0 - y));
	double t_3 = b * ((t + y) - 2.0);
	double tmp;
	if (b <= -9.2e+100) {
		tmp = t_3;
	} else if (b <= -9e+22) {
		tmp = t_1;
	} else if (b <= -2.3e-14) {
		tmp = y * (b - z);
	} else if (b <= -2.25e-54) {
		tmp = a - (t * a);
	} else if (b <= 2.35e-156) {
		tmp = t_2;
	} else if (b <= 6.7e-115) {
		tmp = t_1;
	} else if (b <= 2.4e+113) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (t * (b - a))
    t_2 = x + (z * (1.0d0 - y))
    t_3 = b * ((t + y) - 2.0d0)
    if (b <= (-9.2d+100)) then
        tmp = t_3
    else if (b <= (-9d+22)) then
        tmp = t_1
    else if (b <= (-2.3d-14)) then
        tmp = y * (b - z)
    else if (b <= (-2.25d-54)) then
        tmp = a - (t * a)
    else if (b <= 2.35d-156) then
        tmp = t_2
    else if (b <= 6.7d-115) then
        tmp = t_1
    else if (b <= 2.4d+113) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (t * (b - a));
	double t_2 = x + (z * (1.0 - y));
	double t_3 = b * ((t + y) - 2.0);
	double tmp;
	if (b <= -9.2e+100) {
		tmp = t_3;
	} else if (b <= -9e+22) {
		tmp = t_1;
	} else if (b <= -2.3e-14) {
		tmp = y * (b - z);
	} else if (b <= -2.25e-54) {
		tmp = a - (t * a);
	} else if (b <= 2.35e-156) {
		tmp = t_2;
	} else if (b <= 6.7e-115) {
		tmp = t_1;
	} else if (b <= 2.4e+113) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (t * (b - a))
	t_2 = x + (z * (1.0 - y))
	t_3 = b * ((t + y) - 2.0)
	tmp = 0
	if b <= -9.2e+100:
		tmp = t_3
	elif b <= -9e+22:
		tmp = t_1
	elif b <= -2.3e-14:
		tmp = y * (b - z)
	elif b <= -2.25e-54:
		tmp = a - (t * a)
	elif b <= 2.35e-156:
		tmp = t_2
	elif b <= 6.7e-115:
		tmp = t_1
	elif b <= 2.4e+113:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(t * Float64(b - a)))
	t_2 = Float64(x + Float64(z * Float64(1.0 - y)))
	t_3 = Float64(b * Float64(Float64(t + y) - 2.0))
	tmp = 0.0
	if (b <= -9.2e+100)
		tmp = t_3;
	elseif (b <= -9e+22)
		tmp = t_1;
	elseif (b <= -2.3e-14)
		tmp = Float64(y * Float64(b - z));
	elseif (b <= -2.25e-54)
		tmp = Float64(a - Float64(t * a));
	elseif (b <= 2.35e-156)
		tmp = t_2;
	elseif (b <= 6.7e-115)
		tmp = t_1;
	elseif (b <= 2.4e+113)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (t * (b - a));
	t_2 = x + (z * (1.0 - y));
	t_3 = b * ((t + y) - 2.0);
	tmp = 0.0;
	if (b <= -9.2e+100)
		tmp = t_3;
	elseif (b <= -9e+22)
		tmp = t_1;
	elseif (b <= -2.3e-14)
		tmp = y * (b - z);
	elseif (b <= -2.25e-54)
		tmp = a - (t * a);
	elseif (b <= 2.35e-156)
		tmp = t_2;
	elseif (b <= 6.7e-115)
		tmp = t_1;
	elseif (b <= 2.4e+113)
		tmp = t_2;
	else
		tmp = t_3;
	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[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.2e+100], t$95$3, If[LessEqual[b, -9e+22], t$95$1, If[LessEqual[b, -2.3e-14], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.25e-54], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.35e-156], t$95$2, If[LessEqual[b, 6.7e-115], t$95$1, If[LessEqual[b, 2.4e+113], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;b \leq -2.25 \cdot 10^{-54}:\\
\;\;\;\;a - t \cdot a\\

\mathbf{elif}\;b \leq 2.35 \cdot 10^{-156}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 6.7 \cdot 10^{-115}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.4 \cdot 10^{+113}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -9.1999999999999996e100 or 2.39999999999999983e113 < b

    1. Initial program 87.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 b around inf 89.6%

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

    if -9.1999999999999996e100 < b < -8.9999999999999996e22 or 2.35000000000000023e-156 < b < 6.7000000000000002e-115

    1. Initial program 85.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-85.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. *-commutative85.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. *-commutative85.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-neg85.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-eval85.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-neg85.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-neg85.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-neg85.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-eval85.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+85.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. Simplified85.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 78.8%

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

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

    if -8.9999999999999996e22 < b < -2.29999999999999998e-14

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

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

    if -2.29999999999999998e-14 < b < -2.2499999999999999e-54

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

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

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

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

        \[\leadsto \color{blue}{1 \cdot a + \left(-1 \cdot t\right) \cdot a} \]
      4. *-lft-identity90.1%

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

        \[\leadsto a + \color{blue}{\left(t \cdot -1\right)} \cdot a \]
      6. associate-*r*90.1%

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

        \[\leadsto a + t \cdot \color{blue}{\left(-a\right)} \]
      8. distribute-rgt-neg-out90.1%

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

        \[\leadsto a + \left(-\color{blue}{a \cdot t}\right) \]
      10. unsub-neg90.1%

        \[\leadsto \color{blue}{a - a \cdot t} \]
      11. *-commutative90.1%

        \[\leadsto a - \color{blue}{t \cdot a} \]
    6. Simplified90.1%

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

    if -2.2499999999999999e-54 < b < 2.35000000000000023e-156 or 6.7000000000000002e-115 < b < 2.39999999999999983e113

    1. Initial program 95.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-95.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. *-commutative95.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. *-commutative95.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-neg95.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-eval95.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-neg95.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-neg95.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-neg95.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-eval95.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+95.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. Simplified95.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 t around inf 80.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 69.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.2 \cdot 10^{+100}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -9 \cdot 10^{+22}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq -2.3 \cdot 10^{-14}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-54}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{-156}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 6.7 \cdot 10^{-115}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+113}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 7: 81.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\ t_2 := z \cdot \left(1 - y\right)\\ \mathbf{if}\;b \leq -9.2 \cdot 10^{+108}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{+26}:\\ \;\;\;\;\left(x + z\right) + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq -8 \cdot 10^{-11}:\\ \;\;\;\;x + \left(t_2 + b \cdot \left(y - 2\right)\right)\\ \mathbf{elif}\;b \leq 8 \cdot 10^{+104}:\\ \;\;\;\;\left(x + t_2\right) + \left(a - t \cdot a\right)\\ \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 (* z (- 1.0 y))))
   (if (<= b -9.2e+108)
     t_1
     (if (<= b -4.5e+26)
       (+ (+ x z) (* t (- b a)))
       (if (<= b -8e-11)
         (+ x (+ t_2 (* b (- y 2.0))))
         (if (<= b 8e+104) (+ (+ x t_2) (- a (* t a))) 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 = z * (1.0 - y);
	double tmp;
	if (b <= -9.2e+108) {
		tmp = t_1;
	} else if (b <= -4.5e+26) {
		tmp = (x + z) + (t * (b - a));
	} else if (b <= -8e-11) {
		tmp = x + (t_2 + (b * (y - 2.0)));
	} else if (b <= 8e+104) {
		tmp = (x + t_2) + (a - (t * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = b * ((t + y) - 2.0d0)
    t_2 = z * (1.0d0 - y)
    if (b <= (-9.2d+108)) then
        tmp = t_1
    else if (b <= (-4.5d+26)) then
        tmp = (x + z) + (t * (b - a))
    else if (b <= (-8d-11)) then
        tmp = x + (t_2 + (b * (y - 2.0d0)))
    else if (b <= 8d+104) then
        tmp = (x + t_2) + (a - (t * a))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * ((t + y) - 2.0);
	double t_2 = z * (1.0 - y);
	double tmp;
	if (b <= -9.2e+108) {
		tmp = t_1;
	} else if (b <= -4.5e+26) {
		tmp = (x + z) + (t * (b - a));
	} else if (b <= -8e-11) {
		tmp = x + (t_2 + (b * (y - 2.0)));
	} else if (b <= 8e+104) {
		tmp = (x + t_2) + (a - (t * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * ((t + y) - 2.0)
	t_2 = z * (1.0 - y)
	tmp = 0
	if b <= -9.2e+108:
		tmp = t_1
	elif b <= -4.5e+26:
		tmp = (x + z) + (t * (b - a))
	elif b <= -8e-11:
		tmp = x + (t_2 + (b * (y - 2.0)))
	elif b <= 8e+104:
		tmp = (x + t_2) + (a - (t * a))
	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(z * Float64(1.0 - y))
	tmp = 0.0
	if (b <= -9.2e+108)
		tmp = t_1;
	elseif (b <= -4.5e+26)
		tmp = Float64(Float64(x + z) + Float64(t * Float64(b - a)));
	elseif (b <= -8e-11)
		tmp = Float64(x + Float64(t_2 + Float64(b * Float64(y - 2.0))));
	elseif (b <= 8e+104)
		tmp = Float64(Float64(x + t_2) + Float64(a - Float64(t * a)));
	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 = z * (1.0 - y);
	tmp = 0.0;
	if (b <= -9.2e+108)
		tmp = t_1;
	elseif (b <= -4.5e+26)
		tmp = (x + z) + (t * (b - a));
	elseif (b <= -8e-11)
		tmp = x + (t_2 + (b * (y - 2.0)));
	elseif (b <= 8e+104)
		tmp = (x + t_2) + (a - (t * a));
	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[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.2e+108], t$95$1, If[LessEqual[b, -4.5e+26], N[(N[(x + z), $MachinePrecision] + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -8e-11], N[(x + N[(t$95$2 + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8e+104], N[(N[(x + t$95$2), $MachinePrecision] + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq -8 \cdot 10^{-11}:\\
\;\;\;\;x + \left(t_2 + b \cdot \left(y - 2\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -9.1999999999999996e108 or 8e104 < b

    1. Initial program 87.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-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 b around inf 90.6%

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

    if -9.1999999999999996e108 < b < -4.49999999999999978e26

    1. Initial program 82.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-82.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. *-commutative82.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. *-commutative82.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-neg82.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-eval82.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-neg82.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-neg82.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-neg82.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-eval82.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+82.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. Simplified82.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 t around inf 74.5%

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

      \[\leadsto \left(x - \color{blue}{-1 \cdot z}\right) - t \cdot \left(a - b\right) \]
    6. Step-by-step derivation
      1. mul-1-neg78.9%

        \[\leadsto \left(x - \color{blue}{\left(-z\right)}\right) - t \cdot \left(a - b\right) \]
    7. Simplified78.9%

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

    if -4.49999999999999978e26 < b < -7.99999999999999952e-11

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.99999999999999952e-11 < b < 8e104

    1. Initial program 96.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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. *-commutative96.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-neg96.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-eval96.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-neg96.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-neg96.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-neg96.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-eval96.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+96.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. Simplified96.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 a around inf 91.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-neg91.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.2 \cdot 10^{+108}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{+26}:\\ \;\;\;\;\left(x + z\right) + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq -8 \cdot 10^{-11}:\\ \;\;\;\;x + \left(z \cdot \left(1 - y\right) + b \cdot \left(y - 2\right)\right)\\ \mathbf{elif}\;b \leq 8 \cdot 10^{+104}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + \left(a - t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 8: 73.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq -8 \cdot 10^{-148}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+63}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3e36 or 1.39999999999999993e63 < t

    1. Initial program 87.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-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 89.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 84.1%

      \[\leadsto \left(x - \color{blue}{-1 \cdot z}\right) - t \cdot \left(a - b\right) \]
    6. Step-by-step derivation
      1. mul-1-neg84.1%

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

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

    if -3e36 < t < -7.99999999999999949e-148 or 4.00000000000000031e-43 < t < 1.39999999999999993e63

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

      \[\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-neg86.9%

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

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

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

    if -7.99999999999999949e-148 < t < 4.00000000000000031e-43

    1. Initial program 95.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-95.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. *-commutative95.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. *-commutative95.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-neg95.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-eval95.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-neg95.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-neg95.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-neg95.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-eval95.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+95.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. Simplified95.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 t around 0 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+36}:\\ \;\;\;\;\left(x + z\right) + t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-148}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + y \cdot b\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-43}:\\ \;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+63}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + y \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x + z\right) + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 9: 87.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := x + z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -2.8 \cdot 10^{-11} \lor \neg \left(b \leq 1.35 \cdot 10^{+33}\right):\\
\;\;\;\;b \cdot \left(\left(t + y\right) - 2\right) + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.8e-11 or 1.34999999999999996e33 < b

    1. Initial program 88.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-88.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. *-commutative88.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. *-commutative88.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-neg88.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-eval88.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-neg88.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-neg88.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-neg88.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-eval88.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+88.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. Simplified88.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 b around inf 84.0%

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

    if -2.8e-11 < b < 1.34999999999999996e33

    1. Initial program 96.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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. *-commutative96.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-neg96.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-eval96.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-neg96.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-neg96.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-neg96.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-eval96.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+96.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. Simplified96.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 a around inf 94.1%

      \[\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-neg94.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 92.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := x + z \cdot \left(1 - y\right)\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{+27} \lor \neg \left(t \leq 1.4 \cdot 10^{+50}\right):\\
\;\;\;\;t_1 + t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0500000000000001e27 or 1.3999999999999999e50 < t

    1. Initial program 87.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-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 t around inf 89.2%

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

    if -2.0500000000000001e27 < t < 1.3999999999999999e50

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 78.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+60} \lor \neg \left(t \leq 1.4 \cdot 10^{+64}\right):\\
\;\;\;\;\left(x + z\right) + t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.49999999999999988e60 or 1.40000000000000012e64 < t

    1. Initial program 86.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-86.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. *-commutative86.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. *-commutative86.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-neg86.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-eval86.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-neg86.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-neg86.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-neg86.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-eval86.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+86.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. Simplified86.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 88.8%

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

      \[\leadsto \left(x - \color{blue}{-1 \cdot z}\right) - t \cdot \left(a - b\right) \]
    6. Step-by-step derivation
      1. mul-1-neg86.2%

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

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

    if -9.49999999999999988e60 < t < 1.40000000000000012e64

    1. Initial program 96.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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. *-commutative96.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-neg96.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-eval96.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-neg96.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-neg96.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-neg96.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-eval96.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+96.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. Simplified96.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 t around 0 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 83.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+34} \lor \neg \left(t \leq 1.45 \cdot 10^{+50}\right):\\
\;\;\;\;\left(x + t_1\right) + t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.4500000000000001e34 or 1.45e50 < t

    1. Initial program 87.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-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 t around inf 89.2%

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

    if -1.4500000000000001e34 < t < 1.45e50

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 27.5% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+67}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-60}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-296}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-126}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+85}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+142}:\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.8e+67)
   (* y b)
   (if (<= y -5.2e-60)
     x
     (if (<= y 3.3e-296)
       (* t b)
       (if (<= y 1.9e-126)
         x
         (if (<= y 1.4e+85)
           (* t b)
           (if (<= y 2.5e+142) (* y b) (* y (- z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.8e+67) {
		tmp = y * b;
	} else if (y <= -5.2e-60) {
		tmp = x;
	} else if (y <= 3.3e-296) {
		tmp = t * b;
	} else if (y <= 1.9e-126) {
		tmp = x;
	} else if (y <= 1.4e+85) {
		tmp = t * b;
	} else if (y <= 2.5e+142) {
		tmp = y * b;
	} else {
		tmp = y * -z;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (y <= (-1.8d+67)) then
        tmp = y * b
    else if (y <= (-5.2d-60)) then
        tmp = x
    else if (y <= 3.3d-296) then
        tmp = t * b
    else if (y <= 1.9d-126) then
        tmp = x
    else if (y <= 1.4d+85) then
        tmp = t * b
    else if (y <= 2.5d+142) then
        tmp = y * b
    else
        tmp = y * -z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.8e+67) {
		tmp = y * b;
	} else if (y <= -5.2e-60) {
		tmp = x;
	} else if (y <= 3.3e-296) {
		tmp = t * b;
	} else if (y <= 1.9e-126) {
		tmp = x;
	} else if (y <= 1.4e+85) {
		tmp = t * b;
	} else if (y <= 2.5e+142) {
		tmp = y * b;
	} else {
		tmp = y * -z;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.8e+67:
		tmp = y * b
	elif y <= -5.2e-60:
		tmp = x
	elif y <= 3.3e-296:
		tmp = t * b
	elif y <= 1.9e-126:
		tmp = x
	elif y <= 1.4e+85:
		tmp = t * b
	elif y <= 2.5e+142:
		tmp = y * b
	else:
		tmp = y * -z
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.8e+67)
		tmp = Float64(y * b);
	elseif (y <= -5.2e-60)
		tmp = x;
	elseif (y <= 3.3e-296)
		tmp = Float64(t * b);
	elseif (y <= 1.9e-126)
		tmp = x;
	elseif (y <= 1.4e+85)
		tmp = Float64(t * b);
	elseif (y <= 2.5e+142)
		tmp = Float64(y * b);
	else
		tmp = Float64(y * Float64(-z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -1.8e+67)
		tmp = y * b;
	elseif (y <= -5.2e-60)
		tmp = x;
	elseif (y <= 3.3e-296)
		tmp = t * b;
	elseif (y <= 1.9e-126)
		tmp = x;
	elseif (y <= 1.4e+85)
		tmp = t * b;
	elseif (y <= 2.5e+142)
		tmp = y * b;
	else
		tmp = y * -z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.8e+67], N[(y * b), $MachinePrecision], If[LessEqual[y, -5.2e-60], x, If[LessEqual[y, 3.3e-296], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.9e-126], x, If[LessEqual[y, 1.4e+85], N[(t * b), $MachinePrecision], If[LessEqual[y, 2.5e+142], N[(y * b), $MachinePrecision], N[(y * (-z)), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-60}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 3.3 \cdot 10^{-296}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{-126}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{+85}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+142}:\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.7999999999999999e67 or 1.4e85 < y < 2.5000000000000001e142

    1. Initial program 87.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-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 y around inf 70.1%

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

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

    if -1.7999999999999999e67 < y < -5.1999999999999995e-60 or 3.3e-296 < y < 1.8999999999999999e-126

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

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

    if -5.1999999999999995e-60 < y < 3.3e-296 or 1.8999999999999999e-126 < y < 1.4e85

    1. Initial program 96.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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. *-commutative96.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-neg96.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-eval96.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-neg96.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-neg96.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-neg96.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-eval96.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+96.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. Simplified96.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 51.8%

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

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

    if 2.5000000000000001e142 < y

    1. Initial program 82.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-82.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. *-commutative82.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. *-commutative82.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-neg82.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-eval82.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-neg82.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-neg82.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-neg82.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-eval82.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+82.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. Simplified82.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 y around inf 67.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+67}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-60}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-296}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-126}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+85}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+142}:\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \end{array} \]

Alternative 14: 27.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -t \cdot a\\ \mathbf{if}\;y \leq -1.8 \cdot 10^{+67}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-62}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -2.55 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-127}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+142}:\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- (* t a))))
   (if (<= y -1.8e+67)
     (* y b)
     (if (<= y -1.7e-62)
       x
       (if (<= y -2.55e-306)
         t_1
         (if (<= y 9e-127)
           x
           (if (<= y 1.95e+49)
             t_1
             (if (<= y 5e+142) (* y b) (* y (- z))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = -(t * a);
	double tmp;
	if (y <= -1.8e+67) {
		tmp = y * b;
	} else if (y <= -1.7e-62) {
		tmp = x;
	} else if (y <= -2.55e-306) {
		tmp = t_1;
	} else if (y <= 9e-127) {
		tmp = x;
	} else if (y <= 1.95e+49) {
		tmp = t_1;
	} else if (y <= 5e+142) {
		tmp = y * b;
	} else {
		tmp = y * -z;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = -(t * a)
    if (y <= (-1.8d+67)) then
        tmp = y * b
    else if (y <= (-1.7d-62)) then
        tmp = x
    else if (y <= (-2.55d-306)) then
        tmp = t_1
    else if (y <= 9d-127) then
        tmp = x
    else if (y <= 1.95d+49) then
        tmp = t_1
    else if (y <= 5d+142) then
        tmp = y * b
    else
        tmp = y * -z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = -(t * a);
	double tmp;
	if (y <= -1.8e+67) {
		tmp = y * b;
	} else if (y <= -1.7e-62) {
		tmp = x;
	} else if (y <= -2.55e-306) {
		tmp = t_1;
	} else if (y <= 9e-127) {
		tmp = x;
	} else if (y <= 1.95e+49) {
		tmp = t_1;
	} else if (y <= 5e+142) {
		tmp = y * b;
	} else {
		tmp = y * -z;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = -(t * a)
	tmp = 0
	if y <= -1.8e+67:
		tmp = y * b
	elif y <= -1.7e-62:
		tmp = x
	elif y <= -2.55e-306:
		tmp = t_1
	elif y <= 9e-127:
		tmp = x
	elif y <= 1.95e+49:
		tmp = t_1
	elif y <= 5e+142:
		tmp = y * b
	else:
		tmp = y * -z
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(-Float64(t * a))
	tmp = 0.0
	if (y <= -1.8e+67)
		tmp = Float64(y * b);
	elseif (y <= -1.7e-62)
		tmp = x;
	elseif (y <= -2.55e-306)
		tmp = t_1;
	elseif (y <= 9e-127)
		tmp = x;
	elseif (y <= 1.95e+49)
		tmp = t_1;
	elseif (y <= 5e+142)
		tmp = Float64(y * b);
	else
		tmp = Float64(y * Float64(-z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = -(t * a);
	tmp = 0.0;
	if (y <= -1.8e+67)
		tmp = y * b;
	elseif (y <= -1.7e-62)
		tmp = x;
	elseif (y <= -2.55e-306)
		tmp = t_1;
	elseif (y <= 9e-127)
		tmp = x;
	elseif (y <= 1.95e+49)
		tmp = t_1;
	elseif (y <= 5e+142)
		tmp = y * b;
	else
		tmp = y * -z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = (-N[(t * a), $MachinePrecision])}, If[LessEqual[y, -1.8e+67], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.7e-62], x, If[LessEqual[y, -2.55e-306], t$95$1, If[LessEqual[y, 9e-127], x, If[LessEqual[y, 1.95e+49], t$95$1, If[LessEqual[y, 5e+142], N[(y * b), $MachinePrecision], N[(y * (-z)), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -t \cdot a\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+67}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-62}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -2.55 \cdot 10^{-306}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 9 \cdot 10^{-127}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.95 \cdot 10^{+49}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 5 \cdot 10^{+142}:\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.7999999999999999e67 or 1.95e49 < y < 5.0000000000000001e142

    1. Initial program 87.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-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 y around inf 67.2%

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

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

    if -1.7999999999999999e67 < y < -1.69999999999999994e-62 or -2.54999999999999986e-306 < y < 8.9999999999999998e-127

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

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

    if -1.69999999999999994e-62 < y < -2.54999999999999986e-306 or 8.9999999999999998e-127 < y < 1.95e49

    1. Initial program 97.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-97.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. *-commutative97.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. *-commutative97.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-neg97.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-eval97.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-neg97.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-neg97.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-neg97.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-eval97.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+97.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. Simplified97.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 t around inf 50.7%

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

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

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

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

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

    if 5.0000000000000001e142 < y

    1. Initial program 82.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-82.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. *-commutative82.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. *-commutative82.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-neg82.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-eval82.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-neg82.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-neg82.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-neg82.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-eval82.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+82.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. Simplified82.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 y around inf 67.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+67}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-62}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -2.55 \cdot 10^{-306}:\\ \;\;\;\;-t \cdot a\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-127}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{+49}:\\ \;\;\;\;-t \cdot a\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+142}:\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \end{array} \]

Alternative 15: 40.6% accurate, 1.4× 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.9 \cdot 10^{+26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-190}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 3.25 \cdot 10^{-292}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-123}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+63}:\\ \;\;\;\;t_1\\ \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.9e+26)
     t_2
     (if (<= t -2.6e-190)
       (* y b)
       (if (<= t 3.25e-292)
         t_1
         (if (<= t 2.5e-123) x (if (<= t 1.12e+63) t_1 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.9e+26) {
		tmp = t_2;
	} else if (t <= -2.6e-190) {
		tmp = y * b;
	} else if (t <= 3.25e-292) {
		tmp = t_1;
	} else if (t <= 2.5e-123) {
		tmp = x;
	} else if (t <= 1.12e+63) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * -z
    t_2 = t * (b - a)
    if (t <= (-4.9d+26)) then
        tmp = t_2
    else if (t <= (-2.6d-190)) then
        tmp = y * b
    else if (t <= 3.25d-292) then
        tmp = t_1
    else if (t <= 2.5d-123) then
        tmp = x
    else if (t <= 1.12d+63) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -4.9e+26) {
		tmp = t_2;
	} else if (t <= -2.6e-190) {
		tmp = y * b;
	} else if (t <= 3.25e-292) {
		tmp = t_1;
	} else if (t <= 2.5e-123) {
		tmp = x;
	} else if (t <= 1.12e+63) {
		tmp = t_1;
	} 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.9e+26:
		tmp = t_2
	elif t <= -2.6e-190:
		tmp = y * b
	elif t <= 3.25e-292:
		tmp = t_1
	elif t <= 2.5e-123:
		tmp = x
	elif t <= 1.12e+63:
		tmp = t_1
	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.9e+26)
		tmp = t_2;
	elseif (t <= -2.6e-190)
		tmp = Float64(y * b);
	elseif (t <= 3.25e-292)
		tmp = t_1;
	elseif (t <= 2.5e-123)
		tmp = x;
	elseif (t <= 1.12e+63)
		tmp = t_1;
	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.9e+26)
		tmp = t_2;
	elseif (t <= -2.6e-190)
		tmp = y * b;
	elseif (t <= 3.25e-292)
		tmp = t_1;
	elseif (t <= 2.5e-123)
		tmp = x;
	elseif (t <= 1.12e+63)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.9e+26], t$95$2, If[LessEqual[t, -2.6e-190], N[(y * b), $MachinePrecision], If[LessEqual[t, 3.25e-292], t$95$1, If[LessEqual[t, 2.5e-123], x, If[LessEqual[t, 1.12e+63], t$95$1, 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.9 \cdot 10^{+26}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 3.25 \cdot 10^{-292}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{-123}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.12 \cdot 10^{+63}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.89999999999999974e26 or 1.12000000000000006e63 < t

    1. Initial program 87.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-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 66.9%

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

    if -4.89999999999999974e26 < t < -2.5999999999999998e-190

    1. Initial program 97.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-97.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. *-commutative97.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. *-commutative97.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-neg97.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-eval97.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-neg97.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-neg97.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-neg97.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-eval97.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+97.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. Simplified97.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 40.4%

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

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

    if -2.5999999999999998e-190 < t < 3.2499999999999998e-292 or 2.50000000000000015e-123 < t < 1.12000000000000006e63

    1. Initial program 96.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-96.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. *-commutative96.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. *-commutative96.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-neg96.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-eval96.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-neg96.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-neg96.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-neg96.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-eval96.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+96.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. Simplified96.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 y around inf 57.2%

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

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

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

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

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

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

    if 3.2499999999999998e-292 < t < 2.50000000000000015e-123

    1. Initial program 96.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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. *-commutative96.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-neg96.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-eval96.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-neg96.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-neg96.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-neg96.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-eval96.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+96.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. Simplified96.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 x around inf 30.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.9 \cdot 10^{+26}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-190}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 3.25 \cdot 10^{-292}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-123}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+63}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 16: 50.6% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq -2.8 \cdot 10^{-62}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-297}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-89}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.65 \cdot 10^{+79}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.75e67 or 2.64999999999999989e79 < y

    1. Initial program 85.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-85.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. *-commutative85.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. *-commutative85.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-neg85.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-eval85.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-neg85.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-neg85.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-neg85.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-eval85.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+85.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. Simplified85.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 y around inf 69.5%

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

    if -1.75e67 < y < -2.80000000000000002e-62 or -4.20000000000000027e-297 < y < 4.80000000000000032e-89

    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.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 70.3%

      \[\leadsto \color{blue}{x - t \cdot \left(a - b\right)} \]
    6. Taylor expanded in a around 0 59.9%

      \[\leadsto \color{blue}{x - -1 \cdot \left(t \cdot b\right)} \]
    7. Step-by-step derivation
      1. associate-*r*59.9%

        \[\leadsto x - \color{blue}{\left(-1 \cdot t\right) \cdot b} \]
      2. neg-mul-159.9%

        \[\leadsto x - \color{blue}{\left(-t\right)} \cdot b \]
    8. Simplified59.9%

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

    if -2.80000000000000002e-62 < y < -4.20000000000000027e-297 or 4.80000000000000032e-89 < y < 2.64999999999999989e79

    1. Initial program 95.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-95.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. *-commutative95.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. *-commutative95.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-neg95.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-eval95.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-neg95.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-neg95.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-neg95.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-eval95.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+95.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. Simplified95.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 t around inf 49.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+67}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-62}:\\ \;\;\;\;x + t \cdot b\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-297}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-89}:\\ \;\;\;\;x + t \cdot b\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{+79}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 17: 60.1% 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 -6 \cdot 10^{+92}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-258}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-138}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{+79}:\\ \;\;\;\;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 -6e+92)
     t_2
     (if (<= y 1.05e-258)
       t_1
       (if (<= y 6e-138) (+ z (+ x a)) (if (<= y 4.1e+79) 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 <= -6e+92) {
		tmp = t_2;
	} else if (y <= 1.05e-258) {
		tmp = t_1;
	} else if (y <= 6e-138) {
		tmp = z + (x + a);
	} else if (y <= 4.1e+79) {
		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 <= (-6d+92)) then
        tmp = t_2
    else if (y <= 1.05d-258) then
        tmp = t_1
    else if (y <= 6d-138) then
        tmp = z + (x + a)
    else if (y <= 4.1d+79) 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 <= -6e+92) {
		tmp = t_2;
	} else if (y <= 1.05e-258) {
		tmp = t_1;
	} else if (y <= 6e-138) {
		tmp = z + (x + a);
	} else if (y <= 4.1e+79) {
		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 <= -6e+92:
		tmp = t_2
	elif y <= 1.05e-258:
		tmp = t_1
	elif y <= 6e-138:
		tmp = z + (x + a)
	elif y <= 4.1e+79:
		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 <= -6e+92)
		tmp = t_2;
	elseif (y <= 1.05e-258)
		tmp = t_1;
	elseif (y <= 6e-138)
		tmp = Float64(z + Float64(x + a));
	elseif (y <= 4.1e+79)
		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 <= -6e+92)
		tmp = t_2;
	elseif (y <= 1.05e-258)
		tmp = t_1;
	elseif (y <= 6e-138)
		tmp = z + (x + a);
	elseif (y <= 4.1e+79)
		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, -6e+92], t$95$2, If[LessEqual[y, 1.05e-258], t$95$1, If[LessEqual[y, 6e-138], N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e+79], 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 -6 \cdot 10^{+92}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-258}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 4.1 \cdot 10^{+79}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.00000000000000026e92 or 4.1e79 < y

    1. Initial program 86.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-86.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. *-commutative86.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. *-commutative86.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-neg86.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-eval86.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-neg86.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-neg86.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-neg86.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-eval86.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+86.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. Simplified86.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 y around inf 71.8%

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

    if -6.00000000000000026e92 < y < 1.05e-258 or 6.0000000000000001e-138 < y < 4.1e79

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

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

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

    if 1.05e-258 < y < 6.0000000000000001e-138

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(a + x\right) - \color{blue}{-1 \cdot z} \]
    10. Step-by-step derivation
      1. mul-1-neg91.1%

        \[\leadsto \left(a + x\right) - \color{blue}{\left(-z\right)} \]
    11. Simplified91.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+92}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-258}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-138}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{+79}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 18: 24.5% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;b \leq -2.25 \cdot 10^{-169}:\\
\;\;\;\;a\\

\mathbf{elif}\;b \leq -1.65 \cdot 10^{-248}:\\
\;\;\;\;x\\

\mathbf{elif}\;b \leq -1.7 \cdot 10^{-292}:\\
\;\;\;\;z\\

\mathbf{elif}\;b \leq 4.8 \cdot 10^{+103}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.25e23 or 4.7999999999999997e103 < b

    1. Initial program 85.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-85.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. *-commutative85.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. *-commutative85.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-neg85.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-eval85.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-neg85.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-neg85.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-neg85.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-eval85.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+85.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. Simplified85.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 50.1%

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

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

    if -1.25e23 < b < -2.2499999999999999e-169

    1. Initial program 94.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-94.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. *-commutative94.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. *-commutative94.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-neg94.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-eval94.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-neg94.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-neg94.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-neg94.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-eval94.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+94.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. Simplified94.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 0 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2499999999999999e-169 < b < -1.6500000000000001e-248 or -1.70000000000000009e-292 < b < 4.7999999999999997e103

    1. Initial program 97.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-97.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. *-commutative97.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. *-commutative97.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-neg97.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-eval97.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-neg97.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-neg97.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-neg97.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-eval97.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+97.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. Simplified97.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 x around inf 30.7%

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

    if -1.6500000000000001e-248 < b < -1.70000000000000009e-292

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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 59.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.25 \cdot 10^{+23}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-169}:\\ \;\;\;\;a\\ \mathbf{elif}\;b \leq -1.65 \cdot 10^{-248}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq -1.7 \cdot 10^{-292}:\\ \;\;\;\;z\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 19: 26.3% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+67}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-60}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-301}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{-127}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+90}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.7e+67)
   (* y b)
   (if (<= y -3.2e-60)
     x
     (if (<= y 1.08e-301)
       (* t b)
       (if (<= y 1.72e-127) x (if (<= y 9.5e+90) (* t b) (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.7e+67) {
		tmp = y * b;
	} else if (y <= -3.2e-60) {
		tmp = x;
	} else if (y <= 1.08e-301) {
		tmp = t * b;
	} else if (y <= 1.72e-127) {
		tmp = x;
	} else if (y <= 9.5e+90) {
		tmp = t * b;
	} 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.7d+67)) then
        tmp = y * b
    else if (y <= (-3.2d-60)) then
        tmp = x
    else if (y <= 1.08d-301) then
        tmp = t * b
    else if (y <= 1.72d-127) then
        tmp = x
    else if (y <= 9.5d+90) then
        tmp = t * b
    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.7e+67) {
		tmp = y * b;
	} else if (y <= -3.2e-60) {
		tmp = x;
	} else if (y <= 1.08e-301) {
		tmp = t * b;
	} else if (y <= 1.72e-127) {
		tmp = x;
	} else if (y <= 9.5e+90) {
		tmp = t * b;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.7e+67:
		tmp = y * b
	elif y <= -3.2e-60:
		tmp = x
	elif y <= 1.08e-301:
		tmp = t * b
	elif y <= 1.72e-127:
		tmp = x
	elif y <= 9.5e+90:
		tmp = t * b
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.7e+67)
		tmp = Float64(y * b);
	elseif (y <= -3.2e-60)
		tmp = x;
	elseif (y <= 1.08e-301)
		tmp = Float64(t * b);
	elseif (y <= 1.72e-127)
		tmp = x;
	elseif (y <= 9.5e+90)
		tmp = Float64(t * b);
	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.7e+67)
		tmp = y * b;
	elseif (y <= -3.2e-60)
		tmp = x;
	elseif (y <= 1.08e-301)
		tmp = t * b;
	elseif (y <= 1.72e-127)
		tmp = x;
	elseif (y <= 9.5e+90)
		tmp = t * b;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e+67], N[(y * b), $MachinePrecision], If[LessEqual[y, -3.2e-60], x, If[LessEqual[y, 1.08e-301], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.72e-127], x, If[LessEqual[y, 9.5e+90], N[(t * b), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -3.2 \cdot 10^{-60}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.08 \cdot 10^{-301}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 1.72 \cdot 10^{-127}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+90}:\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.7000000000000001e67 or 9.4999999999999994e90 < y

    1. Initial program 85.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-85.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. *-commutative85.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. *-commutative85.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-neg85.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-eval85.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-neg85.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-neg85.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-neg85.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-eval85.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+85.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. Simplified85.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 69.2%

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

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

    if -1.7000000000000001e67 < y < -3.2000000000000001e-60 or 1.08000000000000002e-301 < y < 1.71999999999999998e-127

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

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

    if -3.2000000000000001e-60 < y < 1.08000000000000002e-301 or 1.71999999999999998e-127 < y < 9.4999999999999994e90

    1. Initial program 96.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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. *-commutative96.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-neg96.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-eval96.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-neg96.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-neg96.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-neg96.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-eval96.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+96.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. Simplified96.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 51.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+67}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-60}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-301}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.72 \cdot 10^{-127}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+90}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 20: 46.6% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;t \leq -2.9 \cdot 10^{-40}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -5.8 \cdot 10^{-120}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+63}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.1999999999999999e61 or 1.6999999999999999e63 < t

    1. Initial program 86.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-86.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. *-commutative86.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. *-commutative86.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-neg86.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-eval86.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-neg86.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-neg86.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-neg86.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-eval86.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+86.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. Simplified86.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 70.7%

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

    if -1.1999999999999999e61 < t < -2.8999999999999999e-40 or -5.8e-120 < t < 1.6999999999999999e63

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

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

    if -2.8999999999999999e-40 < t < -5.8e-120

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{+61}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{-40}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-120}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+63}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 21: 72.7% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+56} \lor \neg \left(t \leq 1.05 \cdot 10^{+63}\right):\\
\;\;\;\;\left(x + z\right) + t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.5000000000000001e56 or 1.0500000000000001e63 < t

    1. Initial program 87.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-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 89.1%

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

      \[\leadsto \left(x - \color{blue}{-1 \cdot z}\right) - t \cdot \left(a - b\right) \]
    6. Step-by-step derivation
      1. mul-1-neg85.6%

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

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

    if -6.5000000000000001e56 < t < 1.0500000000000001e63

    1. Initial program 96.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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. *-commutative96.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-neg96.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-eval96.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-neg96.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-neg96.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-neg96.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-eval96.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+96.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. Simplified96.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 t around 0 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 22: 50.7% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+46} \lor \neg \left(t \leq 1.45 \cdot 10^{+63}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.4999999999999998e46 or 1.45e63 < t

    1. Initial program 87.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-87.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. *-commutative87.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. *-commutative87.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-neg87.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-eval87.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-neg87.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-neg87.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-neg87.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-eval87.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+87.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. Simplified87.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 t around inf 69.4%

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

    if -5.4999999999999998e46 < t < 1.45e63

    1. Initial program 96.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-96.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. *-commutative96.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. *-commutative96.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-neg96.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-eval96.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-neg96.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-neg96.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-neg96.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-eval96.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+96.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. Simplified96.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 y around inf 46.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+46} \lor \neg \left(t \leq 1.45 \cdot 10^{+63}\right):\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 23: 20.5% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 7.2 \cdot 10^{+55}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.5e-72 or 7.19999999999999975e55 < x

    1. Initial program 91.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-91.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. *-commutative91.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. *-commutative91.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-neg91.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-eval91.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-neg91.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-neg91.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-neg91.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-eval91.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+91.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. Simplified91.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 x around inf 35.4%

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

    if -3.5e-72 < x < 7.19999999999999975e55

    1. Initial program 93.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-93.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. *-commutative93.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. *-commutative93.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-neg93.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-eval93.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-neg93.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-neg93.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-neg93.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-eval93.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+93.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. Simplified93.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 0 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{-72}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{+55}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 24: 20.7% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 5.5 \cdot 10^{-18}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.8e-6 or 5.5e-18 < x

    1. Initial program 90.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-90.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. *-commutative90.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. *-commutative90.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-neg90.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-eval90.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-neg90.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-neg90.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-neg90.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-eval90.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+90.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. Simplified90.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 x around inf 35.4%

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

    if -3.8e-6 < x < 5.5e-18

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-18}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 25: 11.2% 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 92.6%

    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
  2. Step-by-step derivation
    1. associate-+l-92.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. *-commutative92.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. *-commutative92.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-neg92.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-eval92.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-neg92.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-neg92.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-neg92.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-eval92.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+92.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. Simplified92.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 t around 0 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto a \]

Reproduce

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