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

Percentage Accurate: 95.2% → 98.0%
Time: 14.8s
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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 98.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.7% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.5% 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 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 27.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(-t\right)\\ \mathbf{if}\;t \leq -4.45 \cdot 10^{+229}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1.06 \cdot 10^{+178}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{+139}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-127}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-157}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-47}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+65}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+181} \lor \neg \left(t \leq 6.5 \cdot 10^{+301}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- t))))
   (if (<= t -4.45e+229)
     (* t b)
     (if (<= t -1.06e+178)
       t_1
       (if (<= t -5.8e+139)
         (* t b)
         (if (<= t -3.8e-127)
           (* y b)
           (if (<= t 7.2e-157)
             x
             (if (<= t 2.2e-47)
               (* z (- y))
               (if (<= t 1.65e-14)
                 x
                 (if (<= t 2.6e+65)
                   (* y b)
                   (if (or (<= t 7.8e+181) (not (<= t 6.5e+301)))
                     t_1
                     (* t b))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * -t;
	double tmp;
	if (t <= -4.45e+229) {
		tmp = t * b;
	} else if (t <= -1.06e+178) {
		tmp = t_1;
	} else if (t <= -5.8e+139) {
		tmp = t * b;
	} else if (t <= -3.8e-127) {
		tmp = y * b;
	} else if (t <= 7.2e-157) {
		tmp = x;
	} else if (t <= 2.2e-47) {
		tmp = z * -y;
	} else if (t <= 1.65e-14) {
		tmp = x;
	} else if (t <= 2.6e+65) {
		tmp = y * b;
	} else if ((t <= 7.8e+181) || !(t <= 6.5e+301)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = a * -t
    if (t <= (-4.45d+229)) then
        tmp = t * b
    else if (t <= (-1.06d+178)) then
        tmp = t_1
    else if (t <= (-5.8d+139)) then
        tmp = t * b
    else if (t <= (-3.8d-127)) then
        tmp = y * b
    else if (t <= 7.2d-157) then
        tmp = x
    else if (t <= 2.2d-47) then
        tmp = z * -y
    else if (t <= 1.65d-14) then
        tmp = x
    else if (t <= 2.6d+65) then
        tmp = y * b
    else if ((t <= 7.8d+181) .or. (.not. (t <= 6.5d+301))) then
        tmp = t_1
    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 t_1 = a * -t;
	double tmp;
	if (t <= -4.45e+229) {
		tmp = t * b;
	} else if (t <= -1.06e+178) {
		tmp = t_1;
	} else if (t <= -5.8e+139) {
		tmp = t * b;
	} else if (t <= -3.8e-127) {
		tmp = y * b;
	} else if (t <= 7.2e-157) {
		tmp = x;
	} else if (t <= 2.2e-47) {
		tmp = z * -y;
	} else if (t <= 1.65e-14) {
		tmp = x;
	} else if (t <= 2.6e+65) {
		tmp = y * b;
	} else if ((t <= 7.8e+181) || !(t <= 6.5e+301)) {
		tmp = t_1;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * -t
	tmp = 0
	if t <= -4.45e+229:
		tmp = t * b
	elif t <= -1.06e+178:
		tmp = t_1
	elif t <= -5.8e+139:
		tmp = t * b
	elif t <= -3.8e-127:
		tmp = y * b
	elif t <= 7.2e-157:
		tmp = x
	elif t <= 2.2e-47:
		tmp = z * -y
	elif t <= 1.65e-14:
		tmp = x
	elif t <= 2.6e+65:
		tmp = y * b
	elif (t <= 7.8e+181) or not (t <= 6.5e+301):
		tmp = t_1
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(-t))
	tmp = 0.0
	if (t <= -4.45e+229)
		tmp = Float64(t * b);
	elseif (t <= -1.06e+178)
		tmp = t_1;
	elseif (t <= -5.8e+139)
		tmp = Float64(t * b);
	elseif (t <= -3.8e-127)
		tmp = Float64(y * b);
	elseif (t <= 7.2e-157)
		tmp = x;
	elseif (t <= 2.2e-47)
		tmp = Float64(z * Float64(-y));
	elseif (t <= 1.65e-14)
		tmp = x;
	elseif (t <= 2.6e+65)
		tmp = Float64(y * b);
	elseif ((t <= 7.8e+181) || !(t <= 6.5e+301))
		tmp = t_1;
	else
		tmp = Float64(t * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * -t;
	tmp = 0.0;
	if (t <= -4.45e+229)
		tmp = t * b;
	elseif (t <= -1.06e+178)
		tmp = t_1;
	elseif (t <= -5.8e+139)
		tmp = t * b;
	elseif (t <= -3.8e-127)
		tmp = y * b;
	elseif (t <= 7.2e-157)
		tmp = x;
	elseif (t <= 2.2e-47)
		tmp = z * -y;
	elseif (t <= 1.65e-14)
		tmp = x;
	elseif (t <= 2.6e+65)
		tmp = y * b;
	elseif ((t <= 7.8e+181) || ~((t <= 6.5e+301)))
		tmp = t_1;
	else
		tmp = t * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * (-t)), $MachinePrecision]}, If[LessEqual[t, -4.45e+229], N[(t * b), $MachinePrecision], If[LessEqual[t, -1.06e+178], t$95$1, If[LessEqual[t, -5.8e+139], N[(t * b), $MachinePrecision], If[LessEqual[t, -3.8e-127], N[(y * b), $MachinePrecision], If[LessEqual[t, 7.2e-157], x, If[LessEqual[t, 2.2e-47], N[(z * (-y)), $MachinePrecision], If[LessEqual[t, 1.65e-14], x, If[LessEqual[t, 2.6e+65], N[(y * b), $MachinePrecision], If[Or[LessEqual[t, 7.8e+181], N[Not[LessEqual[t, 6.5e+301]], $MachinePrecision]], t$95$1, N[(t * b), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.06 \cdot 10^{+178}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -5.8 \cdot 10^{+139}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq -3.8 \cdot 10^{-127}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 7.2 \cdot 10^{-157}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-47}:\\
\;\;\;\;z \cdot \left(-y\right)\\

\mathbf{elif}\;t \leq 1.65 \cdot 10^{-14}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{+65}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 7.8 \cdot 10^{+181} \lor \neg \left(t \leq 6.5 \cdot 10^{+301}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.45000000000000015e229 or -1.05999999999999994e178 < t < -5.7999999999999998e139 or 7.8e181 < t < 6.4999999999999999e301

    1. Initial program 88.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-88.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. *-commutative88.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. *-commutative88.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-neg88.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-eval88.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-neg88.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-neg88.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-neg88.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-eval88.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+88.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. Simplified88.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 b around inf 73.1%

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

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

    if -4.45000000000000015e229 < t < -1.05999999999999994e178 or 2.60000000000000003e65 < t < 7.8e181 or 6.4999999999999999e301 < t

    1. Initial program 91.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-91.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. *-commutative91.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. *-commutative91.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-neg91.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-eval91.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-neg91.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-neg91.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-neg91.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-eval91.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+91.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. Simplified91.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 a around inf 57.9%

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

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

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

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

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

    if -5.7999999999999998e139 < t < -3.80000000000000003e-127 or 1.6499999999999999e-14 < t < 2.60000000000000003e65

    1. Initial program 92.9%

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

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

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

    if -3.80000000000000003e-127 < t < 7.2e-157 or 2.20000000000000019e-47 < t < 1.6499999999999999e-14

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-157 < t < 2.20000000000000019e-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 t around inf 65.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 inf 49.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.45 \cdot 10^{+229}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1.06 \cdot 10^{+178}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{+139}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-127}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-157}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-47}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+65}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+181} \lor \neg \left(t \leq 6.5 \cdot 10^{+301}\right):\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 5: 34.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;a \leq -1.76 \cdot 10^{+124}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{+68}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq -2.46 \cdot 10^{-29}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-105}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-200}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-262}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-254}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+57}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))))
   (if (<= a -1.76e+124)
     t_1
     (if (<= a -7.8e+68)
       (* y b)
       (if (<= a -2.46e-29)
         t_1
         (if (<= a -2.45e-105)
           (* t b)
           (if (<= a -4.7e-200)
             x
             (if (<= a -3.9e-262)
               (* y (- z))
               (if (<= a 6.5e-254)
                 (* y b)
                 (if (<= a 3.5e-141)
                   x
                   (if (<= a 2.35e+57) (* t b) t_1)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double tmp;
	if (a <= -1.76e+124) {
		tmp = t_1;
	} else if (a <= -7.8e+68) {
		tmp = y * b;
	} else if (a <= -2.46e-29) {
		tmp = t_1;
	} else if (a <= -2.45e-105) {
		tmp = t * b;
	} else if (a <= -4.7e-200) {
		tmp = x;
	} else if (a <= -3.9e-262) {
		tmp = y * -z;
	} else if (a <= 6.5e-254) {
		tmp = y * b;
	} else if (a <= 3.5e-141) {
		tmp = x;
	} else if (a <= 2.35e+57) {
		tmp = t * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    if (a <= (-1.76d+124)) then
        tmp = t_1
    else if (a <= (-7.8d+68)) then
        tmp = y * b
    else if (a <= (-2.46d-29)) then
        tmp = t_1
    else if (a <= (-2.45d-105)) then
        tmp = t * b
    else if (a <= (-4.7d-200)) then
        tmp = x
    else if (a <= (-3.9d-262)) then
        tmp = y * -z
    else if (a <= 6.5d-254) then
        tmp = y * b
    else if (a <= 3.5d-141) then
        tmp = x
    else if (a <= 2.35d+57) then
        tmp = t * b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double tmp;
	if (a <= -1.76e+124) {
		tmp = t_1;
	} else if (a <= -7.8e+68) {
		tmp = y * b;
	} else if (a <= -2.46e-29) {
		tmp = t_1;
	} else if (a <= -2.45e-105) {
		tmp = t * b;
	} else if (a <= -4.7e-200) {
		tmp = x;
	} else if (a <= -3.9e-262) {
		tmp = y * -z;
	} else if (a <= 6.5e-254) {
		tmp = y * b;
	} else if (a <= 3.5e-141) {
		tmp = x;
	} else if (a <= 2.35e+57) {
		tmp = t * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	tmp = 0
	if a <= -1.76e+124:
		tmp = t_1
	elif a <= -7.8e+68:
		tmp = y * b
	elif a <= -2.46e-29:
		tmp = t_1
	elif a <= -2.45e-105:
		tmp = t * b
	elif a <= -4.7e-200:
		tmp = x
	elif a <= -3.9e-262:
		tmp = y * -z
	elif a <= 6.5e-254:
		tmp = y * b
	elif a <= 3.5e-141:
		tmp = x
	elif a <= 2.35e+57:
		tmp = t * b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (a <= -1.76e+124)
		tmp = t_1;
	elseif (a <= -7.8e+68)
		tmp = Float64(y * b);
	elseif (a <= -2.46e-29)
		tmp = t_1;
	elseif (a <= -2.45e-105)
		tmp = Float64(t * b);
	elseif (a <= -4.7e-200)
		tmp = x;
	elseif (a <= -3.9e-262)
		tmp = Float64(y * Float64(-z));
	elseif (a <= 6.5e-254)
		tmp = Float64(y * b);
	elseif (a <= 3.5e-141)
		tmp = x;
	elseif (a <= 2.35e+57)
		tmp = Float64(t * b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	tmp = 0.0;
	if (a <= -1.76e+124)
		tmp = t_1;
	elseif (a <= -7.8e+68)
		tmp = y * b;
	elseif (a <= -2.46e-29)
		tmp = t_1;
	elseif (a <= -2.45e-105)
		tmp = t * b;
	elseif (a <= -4.7e-200)
		tmp = x;
	elseif (a <= -3.9e-262)
		tmp = y * -z;
	elseif (a <= 6.5e-254)
		tmp = y * b;
	elseif (a <= 3.5e-141)
		tmp = x;
	elseif (a <= 2.35e+57)
		tmp = t * b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.76e+124], t$95$1, If[LessEqual[a, -7.8e+68], N[(y * b), $MachinePrecision], If[LessEqual[a, -2.46e-29], t$95$1, If[LessEqual[a, -2.45e-105], N[(t * b), $MachinePrecision], If[LessEqual[a, -4.7e-200], x, If[LessEqual[a, -3.9e-262], N[(y * (-z)), $MachinePrecision], If[LessEqual[a, 6.5e-254], N[(y * b), $MachinePrecision], If[LessEqual[a, 3.5e-141], x, If[LessEqual[a, 2.35e+57], N[(t * b), $MachinePrecision], t$95$1]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -7.8 \cdot 10^{+68}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;a \leq -2.46 \cdot 10^{-29}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.45 \cdot 10^{-105}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;a \leq -4.7 \cdot 10^{-200}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 6.5 \cdot 10^{-254}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{-141}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.35 \cdot 10^{+57}:\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.75999999999999994e124 or -7.80000000000000037e68 < a < -2.45999999999999992e-29 or 2.3500000000000001e57 < a

    1. Initial program 89.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-89.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. *-commutative89.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. *-commutative89.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-neg89.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-eval89.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-neg89.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-neg89.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-neg89.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-eval89.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+89.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. Simplified89.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 a around inf 56.2%

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

    if -1.75999999999999994e124 < a < -7.80000000000000037e68 or -3.89999999999999984e-262 < a < 6.5e-254

    1. Initial program 97.7%

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

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

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

    if -2.45999999999999992e-29 < a < -2.45e-105 or 3.5000000000000003e-141 < a < 2.3500000000000001e57

    1. Initial program 98.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-98.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. *-commutative98.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. *-commutative98.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-neg98.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-eval98.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-neg98.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-neg98.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-neg98.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-eval98.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+98.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. Simplified98.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 b around inf 56.6%

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

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

    if -2.45e-105 < a < -4.7000000000000001e-200 or 6.5e-254 < a < 3.5000000000000003e-141

    1. Initial program 95.0%

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

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

    if -4.7000000000000001e-200 < a < -3.89999999999999984e-262

    1. Initial program 92.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.76 \cdot 10^{+124}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{+68}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq -2.46 \cdot 10^{-29}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-105}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-200}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-262}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-254}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+57}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 6: 83.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := x + z \cdot \left(1 - y\right)\\ t_3 := t_2 + t_1\\ t_4 := x - b \cdot \left(2 - \left(t + y\right)\right)\\ \mathbf{if}\;b \leq -3.4 \cdot 10^{+61}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \leq -1.95 \cdot 10^{-54}:\\ \;\;\;\;t_2 + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-72}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-5}:\\ \;\;\;\;\left(z + \left(x + b \cdot \left(t - 2\right)\right)\right) + t_1\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{+79}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t)))
        (t_2 (+ x (* z (- 1.0 y))))
        (t_3 (+ t_2 t_1))
        (t_4 (- x (* b (- 2.0 (+ t y))))))
   (if (<= b -3.4e+61)
     t_4
     (if (<= b -1.95e-54)
       (+ t_2 (* t (- b a)))
       (if (<= b 2.5e-72)
         t_3
         (if (<= b 1.5e-5)
           (+ (+ z (+ x (* b (- t 2.0)))) t_1)
           (if (<= b 4.8e+79) t_3 t_4)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = x + (z * (1.0 - y));
	double t_3 = t_2 + t_1;
	double t_4 = x - (b * (2.0 - (t + y)));
	double tmp;
	if (b <= -3.4e+61) {
		tmp = t_4;
	} else if (b <= -1.95e-54) {
		tmp = t_2 + (t * (b - a));
	} else if (b <= 2.5e-72) {
		tmp = t_3;
	} else if (b <= 1.5e-5) {
		tmp = (z + (x + (b * (t - 2.0)))) + t_1;
	} else if (b <= 4.8e+79) {
		tmp = t_3;
	} else {
		tmp = t_4;
	}
	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) :: t_4
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    t_2 = x + (z * (1.0d0 - y))
    t_3 = t_2 + t_1
    t_4 = x - (b * (2.0d0 - (t + y)))
    if (b <= (-3.4d+61)) then
        tmp = t_4
    else if (b <= (-1.95d-54)) then
        tmp = t_2 + (t * (b - a))
    else if (b <= 2.5d-72) then
        tmp = t_3
    else if (b <= 1.5d-5) then
        tmp = (z + (x + (b * (t - 2.0d0)))) + t_1
    else if (b <= 4.8d+79) then
        tmp = t_3
    else
        tmp = t_4
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = x + (z * (1.0 - y));
	double t_3 = t_2 + t_1;
	double t_4 = x - (b * (2.0 - (t + y)));
	double tmp;
	if (b <= -3.4e+61) {
		tmp = t_4;
	} else if (b <= -1.95e-54) {
		tmp = t_2 + (t * (b - a));
	} else if (b <= 2.5e-72) {
		tmp = t_3;
	} else if (b <= 1.5e-5) {
		tmp = (z + (x + (b * (t - 2.0)))) + t_1;
	} else if (b <= 4.8e+79) {
		tmp = t_3;
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = x + (z * (1.0 - y))
	t_3 = t_2 + t_1
	t_4 = x - (b * (2.0 - (t + y)))
	tmp = 0
	if b <= -3.4e+61:
		tmp = t_4
	elif b <= -1.95e-54:
		tmp = t_2 + (t * (b - a))
	elif b <= 2.5e-72:
		tmp = t_3
	elif b <= 1.5e-5:
		tmp = (z + (x + (b * (t - 2.0)))) + t_1
	elif b <= 4.8e+79:
		tmp = t_3
	else:
		tmp = t_4
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	t_2 = Float64(x + Float64(z * Float64(1.0 - y)))
	t_3 = Float64(t_2 + t_1)
	t_4 = Float64(x - Float64(b * Float64(2.0 - Float64(t + y))))
	tmp = 0.0
	if (b <= -3.4e+61)
		tmp = t_4;
	elseif (b <= -1.95e-54)
		tmp = Float64(t_2 + Float64(t * Float64(b - a)));
	elseif (b <= 2.5e-72)
		tmp = t_3;
	elseif (b <= 1.5e-5)
		tmp = Float64(Float64(z + Float64(x + Float64(b * Float64(t - 2.0)))) + t_1);
	elseif (b <= 4.8e+79)
		tmp = t_3;
	else
		tmp = t_4;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = x + (z * (1.0 - y));
	t_3 = t_2 + t_1;
	t_4 = x - (b * (2.0 - (t + y)));
	tmp = 0.0;
	if (b <= -3.4e+61)
		tmp = t_4;
	elseif (b <= -1.95e-54)
		tmp = t_2 + (t * (b - a));
	elseif (b <= 2.5e-72)
		tmp = t_3;
	elseif (b <= 1.5e-5)
		tmp = (z + (x + (b * (t - 2.0)))) + t_1;
	elseif (b <= 4.8e+79)
		tmp = t_3;
	else
		tmp = t_4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x - N[(b * N[(2.0 - N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.4e+61], t$95$4, If[LessEqual[b, -1.95e-54], N[(t$95$2 + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.5e-72], t$95$3, If[LessEqual[b, 1.5e-5], N[(N[(z + N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 4.8e+79], t$95$3, t$95$4]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;b \leq 4.8 \cdot 10^{+79}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.40000000000000026e61 or 4.79999999999999971e79 < b

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

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

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

    if -3.40000000000000026e61 < b < -1.95e-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 t around inf 80.2%

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

    if -1.95e-54 < b < 2.4999999999999998e-72 or 1.50000000000000004e-5 < b < 4.79999999999999971e79

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

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

    if 2.4999999999999998e-72 < b < 1.50000000000000004e-5

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{+61}:\\ \;\;\;\;x - b \cdot \left(2 - \left(t + y\right)\right)\\ \mathbf{elif}\;b \leq -1.95 \cdot 10^{-54}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-72}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-5}:\\ \;\;\;\;\left(z + \left(x + b \cdot \left(t - 2\right)\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{+79}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x - b \cdot \left(2 - \left(t + y\right)\right)\\ \end{array} \]

Alternative 7: 27.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(-t\right)\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{+229}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{+178}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{+139}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-124}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 10^{+65}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+65}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+179} \lor \neg \left(t \leq 1.25 \cdot 10^{+302}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- t))))
   (if (<= t -2.9e+229)
     (* t b)
     (if (<= t -3.9e+178)
       t_1
       (if (<= t -5.4e+139)
         (* t b)
         (if (<= t -1.7e-124)
           (* y b)
           (if (<= t 8.8e+14)
             x
             (if (<= t 1e+65)
               (* y b)
               (if (<= t 3.8e+65)
                 x
                 (if (or (<= t 2.25e+179) (not (<= t 1.25e+302)))
                   t_1
                   (* t b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * -t;
	double tmp;
	if (t <= -2.9e+229) {
		tmp = t * b;
	} else if (t <= -3.9e+178) {
		tmp = t_1;
	} else if (t <= -5.4e+139) {
		tmp = t * b;
	} else if (t <= -1.7e-124) {
		tmp = y * b;
	} else if (t <= 8.8e+14) {
		tmp = x;
	} else if (t <= 1e+65) {
		tmp = y * b;
	} else if (t <= 3.8e+65) {
		tmp = x;
	} else if ((t <= 2.25e+179) || !(t <= 1.25e+302)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = a * -t
    if (t <= (-2.9d+229)) then
        tmp = t * b
    else if (t <= (-3.9d+178)) then
        tmp = t_1
    else if (t <= (-5.4d+139)) then
        tmp = t * b
    else if (t <= (-1.7d-124)) then
        tmp = y * b
    else if (t <= 8.8d+14) then
        tmp = x
    else if (t <= 1d+65) then
        tmp = y * b
    else if (t <= 3.8d+65) then
        tmp = x
    else if ((t <= 2.25d+179) .or. (.not. (t <= 1.25d+302))) then
        tmp = t_1
    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 t_1 = a * -t;
	double tmp;
	if (t <= -2.9e+229) {
		tmp = t * b;
	} else if (t <= -3.9e+178) {
		tmp = t_1;
	} else if (t <= -5.4e+139) {
		tmp = t * b;
	} else if (t <= -1.7e-124) {
		tmp = y * b;
	} else if (t <= 8.8e+14) {
		tmp = x;
	} else if (t <= 1e+65) {
		tmp = y * b;
	} else if (t <= 3.8e+65) {
		tmp = x;
	} else if ((t <= 2.25e+179) || !(t <= 1.25e+302)) {
		tmp = t_1;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * -t
	tmp = 0
	if t <= -2.9e+229:
		tmp = t * b
	elif t <= -3.9e+178:
		tmp = t_1
	elif t <= -5.4e+139:
		tmp = t * b
	elif t <= -1.7e-124:
		tmp = y * b
	elif t <= 8.8e+14:
		tmp = x
	elif t <= 1e+65:
		tmp = y * b
	elif t <= 3.8e+65:
		tmp = x
	elif (t <= 2.25e+179) or not (t <= 1.25e+302):
		tmp = t_1
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(-t))
	tmp = 0.0
	if (t <= -2.9e+229)
		tmp = Float64(t * b);
	elseif (t <= -3.9e+178)
		tmp = t_1;
	elseif (t <= -5.4e+139)
		tmp = Float64(t * b);
	elseif (t <= -1.7e-124)
		tmp = Float64(y * b);
	elseif (t <= 8.8e+14)
		tmp = x;
	elseif (t <= 1e+65)
		tmp = Float64(y * b);
	elseif (t <= 3.8e+65)
		tmp = x;
	elseif ((t <= 2.25e+179) || !(t <= 1.25e+302))
		tmp = t_1;
	else
		tmp = Float64(t * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * -t;
	tmp = 0.0;
	if (t <= -2.9e+229)
		tmp = t * b;
	elseif (t <= -3.9e+178)
		tmp = t_1;
	elseif (t <= -5.4e+139)
		tmp = t * b;
	elseif (t <= -1.7e-124)
		tmp = y * b;
	elseif (t <= 8.8e+14)
		tmp = x;
	elseif (t <= 1e+65)
		tmp = y * b;
	elseif (t <= 3.8e+65)
		tmp = x;
	elseif ((t <= 2.25e+179) || ~((t <= 1.25e+302)))
		tmp = t_1;
	else
		tmp = t * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * (-t)), $MachinePrecision]}, If[LessEqual[t, -2.9e+229], N[(t * b), $MachinePrecision], If[LessEqual[t, -3.9e+178], t$95$1, If[LessEqual[t, -5.4e+139], N[(t * b), $MachinePrecision], If[LessEqual[t, -1.7e-124], N[(y * b), $MachinePrecision], If[LessEqual[t, 8.8e+14], x, If[LessEqual[t, 1e+65], N[(y * b), $MachinePrecision], If[LessEqual[t, 3.8e+65], x, If[Or[LessEqual[t, 2.25e+179], N[Not[LessEqual[t, 1.25e+302]], $MachinePrecision]], t$95$1, N[(t * b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.9 \cdot 10^{+178}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -5.4 \cdot 10^{+139}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-124}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 8.8 \cdot 10^{+14}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+65}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+179} \lor \neg \left(t \leq 1.25 \cdot 10^{+302}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.89999999999999981e229 or -3.8999999999999997e178 < t < -5.3999999999999995e139 or 2.2500000000000001e179 < t < 1.25e302

    1. Initial program 88.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-88.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. *-commutative88.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. *-commutative88.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-neg88.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-eval88.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-neg88.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-neg88.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-neg88.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-eval88.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+88.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. Simplified88.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 b around inf 73.1%

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

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

    if -2.89999999999999981e229 < t < -3.8999999999999997e178 or 3.80000000000000011e65 < t < 2.2500000000000001e179 or 1.25e302 < t

    1. Initial program 91.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-91.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. *-commutative91.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. *-commutative91.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-neg91.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-eval91.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-neg91.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-neg91.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-neg91.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-eval91.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+91.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. Simplified91.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 a around inf 57.9%

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

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

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

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

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

    if -5.3999999999999995e139 < t < -1.7e-124 or 8.8e14 < t < 9.9999999999999999e64

    1. Initial program 91.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-91.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. *-commutative91.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. *-commutative91.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-neg91.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-eval91.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-neg91.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-neg91.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-neg91.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-eval91.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+91.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. Simplified91.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 b around inf 43.8%

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

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

    if -1.7e-124 < t < 8.8e14 or 9.9999999999999999e64 < t < 3.80000000000000011e65

    1. Initial program 98.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-98.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. *-commutative98.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. *-commutative98.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-neg98.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-eval98.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-neg98.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-neg98.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-neg98.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-eval98.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+98.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. Simplified98.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+229}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{+178}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{+139}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-124}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 10^{+65}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+65}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+179} \lor \neg \left(t \leq 1.25 \cdot 10^{+302}\right):\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 8: 64.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - b \cdot \left(2 - \left(t + y\right)\right)\\ t_2 := z \cdot \left(1 - y\right)\\ \mathbf{if}\;b \leq -37000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -4.8 \cdot 10^{-70}:\\ \;\;\;\;x - t \cdot \left(a - b\right)\\ \mathbf{elif}\;b \leq -4.4 \cdot 10^{-299}:\\ \;\;\;\;x + t_2\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{-48} \lor \neg \left(b \leq 16500000\right) \land b \leq 5.5 \cdot 10^{+76}:\\ \;\;\;\;t_2 - a \cdot t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* b (- 2.0 (+ t y))))) (t_2 (* z (- 1.0 y))))
   (if (<= b -37000.0)
     t_1
     (if (<= b -4.8e-70)
       (- x (* t (- a b)))
       (if (<= b -4.4e-299)
         (+ x t_2)
         (if (or (<= b 1.35e-48) (and (not (<= b 16500000.0)) (<= b 5.5e+76)))
           (- t_2 (* a t))
           t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (b * (2.0 - (t + y)));
	double t_2 = z * (1.0 - y);
	double tmp;
	if (b <= -37000.0) {
		tmp = t_1;
	} else if (b <= -4.8e-70) {
		tmp = x - (t * (a - b));
	} else if (b <= -4.4e-299) {
		tmp = x + t_2;
	} else if ((b <= 1.35e-48) || (!(b <= 16500000.0) && (b <= 5.5e+76))) {
		tmp = t_2 - (a * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (b * (2.0d0 - (t + y)))
    t_2 = z * (1.0d0 - y)
    if (b <= (-37000.0d0)) then
        tmp = t_1
    else if (b <= (-4.8d-70)) then
        tmp = x - (t * (a - b))
    else if (b <= (-4.4d-299)) then
        tmp = x + t_2
    else if ((b <= 1.35d-48) .or. (.not. (b <= 16500000.0d0)) .and. (b <= 5.5d+76)) then
        tmp = t_2 - (a * t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (b * (2.0 - (t + y)));
	double t_2 = z * (1.0 - y);
	double tmp;
	if (b <= -37000.0) {
		tmp = t_1;
	} else if (b <= -4.8e-70) {
		tmp = x - (t * (a - b));
	} else if (b <= -4.4e-299) {
		tmp = x + t_2;
	} else if ((b <= 1.35e-48) || (!(b <= 16500000.0) && (b <= 5.5e+76))) {
		tmp = t_2 - (a * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (b * (2.0 - (t + y)))
	t_2 = z * (1.0 - y)
	tmp = 0
	if b <= -37000.0:
		tmp = t_1
	elif b <= -4.8e-70:
		tmp = x - (t * (a - b))
	elif b <= -4.4e-299:
		tmp = x + t_2
	elif (b <= 1.35e-48) or (not (b <= 16500000.0) and (b <= 5.5e+76)):
		tmp = t_2 - (a * t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(b * Float64(2.0 - Float64(t + y))))
	t_2 = Float64(z * Float64(1.0 - y))
	tmp = 0.0
	if (b <= -37000.0)
		tmp = t_1;
	elseif (b <= -4.8e-70)
		tmp = Float64(x - Float64(t * Float64(a - b)));
	elseif (b <= -4.4e-299)
		tmp = Float64(x + t_2);
	elseif ((b <= 1.35e-48) || (!(b <= 16500000.0) && (b <= 5.5e+76)))
		tmp = Float64(t_2 - Float64(a * t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (b * (2.0 - (t + y)));
	t_2 = z * (1.0 - y);
	tmp = 0.0;
	if (b <= -37000.0)
		tmp = t_1;
	elseif (b <= -4.8e-70)
		tmp = x - (t * (a - b));
	elseif (b <= -4.4e-299)
		tmp = x + t_2;
	elseif ((b <= 1.35e-48) || (~((b <= 16500000.0)) && (b <= 5.5e+76)))
		tmp = t_2 - (a * t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(b * N[(2.0 - N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -37000.0], t$95$1, If[LessEqual[b, -4.8e-70], N[(x - N[(t * N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.4e-299], N[(x + t$95$2), $MachinePrecision], If[Or[LessEqual[b, 1.35e-48], And[N[Not[LessEqual[b, 16500000.0]], $MachinePrecision], LessEqual[b, 5.5e+76]]], N[(t$95$2 - N[(a * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq -4.4 \cdot 10^{-299}:\\
\;\;\;\;x + t_2\\

\mathbf{elif}\;b \leq 1.35 \cdot 10^{-48} \lor \neg \left(b \leq 16500000\right) \land b \leq 5.5 \cdot 10^{+76}:\\
\;\;\;\;t_2 - a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -37000 or 1.35000000000000006e-48 < b < 1.65e7 or 5.5000000000000001e76 < b

    1. Initial program 89.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-89.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. *-commutative89.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. *-commutative89.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-neg89.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-eval89.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-neg89.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-neg89.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-neg89.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-eval89.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+89.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. Simplified89.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 0 85.2%

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

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

    if -37000 < b < -4.8000000000000002e-70

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8000000000000002e-70 < b < -4.3999999999999999e-299

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

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

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

    if -4.3999999999999999e-299 < b < 1.35000000000000006e-48 or 1.65e7 < b < 5.5000000000000001e76

    1. Initial program 98.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-98.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. *-commutative98.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. *-commutative98.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-neg98.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-eval98.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-neg98.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-neg98.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-neg98.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-eval98.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+98.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. Simplified98.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 90.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(y - 1\right) + a \cdot t\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg76.8%

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

        \[\leadsto -\color{blue}{\mathsf{fma}\left(z, y - 1, a \cdot t\right)} \]
      3. sub-neg78.6%

        \[\leadsto -\mathsf{fma}\left(z, \color{blue}{y + \left(-1\right)}, a \cdot t\right) \]
      4. metadata-eval78.6%

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right) - t \cdot a \]
      13. associate--r+76.8%

        \[\leadsto z \cdot \color{blue}{\left(\left(0 - -1\right) - y\right)} - t \cdot a \]
      14. metadata-eval76.8%

        \[\leadsto z \cdot \left(\color{blue}{1} - y\right) - t \cdot a \]
    8. Simplified76.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -37000:\\ \;\;\;\;x - b \cdot \left(2 - \left(t + y\right)\right)\\ \mathbf{elif}\;b \leq -4.8 \cdot 10^{-70}:\\ \;\;\;\;x - t \cdot \left(a - b\right)\\ \mathbf{elif}\;b \leq -4.4 \cdot 10^{-299}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{-48} \lor \neg \left(b \leq 16500000\right) \land b \leq 5.5 \cdot 10^{+76}:\\ \;\;\;\;z \cdot \left(1 - y\right) - a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x - b \cdot \left(2 - \left(t + y\right)\right)\\ \end{array} \]

Alternative 9: 64.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - b \cdot \left(2 - \left(t + y\right)\right)\\ \mathbf{if}\;b \leq -34000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-69}:\\ \;\;\;\;x - t \cdot \left(a - b\right)\\ \mathbf{elif}\;b \leq 1.08 \cdot 10^{-48} \lor \neg \left(b \leq 17000000\right) \land b \leq 4.4 \cdot 10^{+71}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* b (- 2.0 (+ t y))))))
   (if (<= b -34000.0)
     t_1
     (if (<= b -2.5e-69)
       (- x (* t (- a b)))
       (if (or (<= b 1.08e-48) (and (not (<= b 17000000.0)) (<= b 4.4e+71)))
         (+ x (* z (- 1.0 y)))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (b * (2.0 - (t + y)));
	double tmp;
	if (b <= -34000.0) {
		tmp = t_1;
	} else if (b <= -2.5e-69) {
		tmp = x - (t * (a - b));
	} else if ((b <= 1.08e-48) || (!(b <= 17000000.0) && (b <= 4.4e+71))) {
		tmp = x + (z * (1.0 - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (b * (2.0d0 - (t + y)))
    if (b <= (-34000.0d0)) then
        tmp = t_1
    else if (b <= (-2.5d-69)) then
        tmp = x - (t * (a - b))
    else if ((b <= 1.08d-48) .or. (.not. (b <= 17000000.0d0)) .and. (b <= 4.4d+71)) then
        tmp = x + (z * (1.0d0 - y))
    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 = x - (b * (2.0 - (t + y)));
	double tmp;
	if (b <= -34000.0) {
		tmp = t_1;
	} else if (b <= -2.5e-69) {
		tmp = x - (t * (a - b));
	} else if ((b <= 1.08e-48) || (!(b <= 17000000.0) && (b <= 4.4e+71))) {
		tmp = x + (z * (1.0 - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (b * (2.0 - (t + y)))
	tmp = 0
	if b <= -34000.0:
		tmp = t_1
	elif b <= -2.5e-69:
		tmp = x - (t * (a - b))
	elif (b <= 1.08e-48) or (not (b <= 17000000.0) and (b <= 4.4e+71)):
		tmp = x + (z * (1.0 - y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(b * Float64(2.0 - Float64(t + y))))
	tmp = 0.0
	if (b <= -34000.0)
		tmp = t_1;
	elseif (b <= -2.5e-69)
		tmp = Float64(x - Float64(t * Float64(a - b)));
	elseif ((b <= 1.08e-48) || (!(b <= 17000000.0) && (b <= 4.4e+71)))
		tmp = Float64(x + Float64(z * Float64(1.0 - y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (b * (2.0 - (t + y)));
	tmp = 0.0;
	if (b <= -34000.0)
		tmp = t_1;
	elseif (b <= -2.5e-69)
		tmp = x - (t * (a - b));
	elseif ((b <= 1.08e-48) || (~((b <= 17000000.0)) && (b <= 4.4e+71)))
		tmp = x + (z * (1.0 - y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(b * N[(2.0 - N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -34000.0], t$95$1, If[LessEqual[b, -2.5e-69], N[(x - N[(t * N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 1.08e-48], And[N[Not[LessEqual[b, 17000000.0]], $MachinePrecision], LessEqual[b, 4.4e+71]]], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq 1.08 \cdot 10^{-48} \lor \neg \left(b \leq 17000000\right) \land b \leq 4.4 \cdot 10^{+71}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -34000 or 1.08e-48 < b < 1.7e7 or 4.39999999999999989e71 < b

    1. Initial program 89.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-89.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. *-commutative89.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. *-commutative89.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-neg89.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-eval89.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-neg89.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-neg89.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-neg89.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-eval89.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+89.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. Simplified89.2%

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

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

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

    if -34000 < b < -2.50000000000000017e-69

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.50000000000000017e-69 < b < 1.08e-48 or 1.7e7 < b < 4.39999999999999989e71

    1. Initial program 99.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.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. *-commutative99.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. *-commutative99.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-neg99.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-eval99.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-neg99.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-neg99.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-neg99.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-eval99.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+99.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. Simplified99.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 90.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -34000:\\ \;\;\;\;x - b \cdot \left(2 - \left(t + y\right)\right)\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-69}:\\ \;\;\;\;x - t \cdot \left(a - b\right)\\ \mathbf{elif}\;b \leq 1.08 \cdot 10^{-48} \lor \neg \left(b \leq 17000000\right) \land b \leq 4.4 \cdot 10^{+71}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;x - b \cdot \left(2 - \left(t + y\right)\right)\\ \end{array} \]

Alternative 10: 70.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(1 - y\right)\\ t_2 := t \cdot \left(a - b\right)\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{+229}:\\ \;\;\;\;x - t_2\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{+181}:\\ \;\;\;\;t_1 - a \cdot t\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{+139} \lor \neg \left(t \leq 2.6 \cdot 10^{+63}\right):\\ \;\;\;\;\left(z + x\right) - t_2\\ \mathbf{else}:\\ \;\;\;\;\left(x + y \cdot b\right) + t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- 1.0 y))) (t_2 (* t (- a b))))
   (if (<= t -2.9e+229)
     (- x t_2)
     (if (<= t -6.2e+181)
       (- t_1 (* a t))
       (if (or (<= t -5.4e+139) (not (<= t 2.6e+63)))
         (- (+ z x) t_2)
         (+ (+ x (* y b)) t_1))))))
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 * (a - b);
	double tmp;
	if (t <= -2.9e+229) {
		tmp = x - t_2;
	} else if (t <= -6.2e+181) {
		tmp = t_1 - (a * t);
	} else if ((t <= -5.4e+139) || !(t <= 2.6e+63)) {
		tmp = (z + x) - t_2;
	} else {
		tmp = (x + (y * b)) + 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 = z * (1.0d0 - y)
    t_2 = t * (a - b)
    if (t <= (-2.9d+229)) then
        tmp = x - t_2
    else if (t <= (-6.2d+181)) then
        tmp = t_1 - (a * t)
    else if ((t <= (-5.4d+139)) .or. (.not. (t <= 2.6d+63))) then
        tmp = (z + x) - t_2
    else
        tmp = (x + (y * b)) + t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (1.0 - y);
	double t_2 = t * (a - b);
	double tmp;
	if (t <= -2.9e+229) {
		tmp = x - t_2;
	} else if (t <= -6.2e+181) {
		tmp = t_1 - (a * t);
	} else if ((t <= -5.4e+139) || !(t <= 2.6e+63)) {
		tmp = (z + x) - t_2;
	} else {
		tmp = (x + (y * b)) + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (1.0 - y)
	t_2 = t * (a - b)
	tmp = 0
	if t <= -2.9e+229:
		tmp = x - t_2
	elif t <= -6.2e+181:
		tmp = t_1 - (a * t)
	elif (t <= -5.4e+139) or not (t <= 2.6e+63):
		tmp = (z + x) - t_2
	else:
		tmp = (x + (y * b)) + t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(1.0 - y))
	t_2 = Float64(t * Float64(a - b))
	tmp = 0.0
	if (t <= -2.9e+229)
		tmp = Float64(x - t_2);
	elseif (t <= -6.2e+181)
		tmp = Float64(t_1 - Float64(a * t));
	elseif ((t <= -5.4e+139) || !(t <= 2.6e+63))
		tmp = Float64(Float64(z + x) - t_2);
	else
		tmp = Float64(Float64(x + Float64(y * b)) + t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (1.0 - y);
	t_2 = t * (a - b);
	tmp = 0.0;
	if (t <= -2.9e+229)
		tmp = x - t_2;
	elseif (t <= -6.2e+181)
		tmp = t_1 - (a * t);
	elseif ((t <= -5.4e+139) || ~((t <= 2.6e+63)))
		tmp = (z + x) - t_2;
	else
		tmp = (x + (y * b)) + t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+229], N[(x - t$95$2), $MachinePrecision], If[LessEqual[t, -6.2e+181], N[(t$95$1 - N[(a * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -5.4e+139], N[Not[LessEqual[t, 2.6e+63]], $MachinePrecision]], N[(N[(z + x), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(x + N[(y * b), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -6.2 \cdot 10^{+181}:\\
\;\;\;\;t_1 - a \cdot t\\

\mathbf{elif}\;t \leq -5.4 \cdot 10^{+139} \lor \neg \left(t \leq 2.6 \cdot 10^{+63}\right):\\
\;\;\;\;\left(z + x\right) - t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.89999999999999981e229

    1. Initial program 92.9%

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

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

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

    if -2.89999999999999981e229 < t < -6.19999999999999978e181

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.19999999999999978e181 < t < -5.3999999999999995e139 or 2.6000000000000001e63 < t

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

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

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

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

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

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

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

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

    if -5.3999999999999995e139 < t < 2.6000000000000001e63

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+229}:\\ \;\;\;\;x - t \cdot \left(a - b\right)\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{+181}:\\ \;\;\;\;z \cdot \left(1 - y\right) - a \cdot t\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{+139} \lor \neg \left(t \leq 2.6 \cdot 10^{+63}\right):\\ \;\;\;\;\left(z + x\right) - t \cdot \left(a - b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + y \cdot b\right) + z \cdot \left(1 - y\right)\\ \end{array} \]

Alternative 11: 83.9% accurate, 1.1× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.40000000000000026e61 or 6.5e77 < b

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

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

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

    if -3.40000000000000026e61 < b < -1.54999999999999994e-60

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.54999999999999994e-60 < b < 6.5e77

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{+61}:\\ \;\;\;\;x - b \cdot \left(2 - \left(t + y\right)\right)\\ \mathbf{elif}\;b \leq -1.55 \cdot 10^{-60}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{+77}:\\ \;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x - b \cdot \left(2 - \left(t + y\right)\right)\\ \end{array} \]

Alternative 12: 87.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.9 \cdot 10^{-17} \lor \neg \left(y \leq 0.0037\right):\\
\;\;\;\;\left(x - b \cdot \left(2 - \left(t + y\right)\right)\right) + z \cdot \left(1 - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.90000000000000012e-17 or 0.0037000000000000002 < y

    1. Initial program 91.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-91.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. *-commutative91.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. *-commutative91.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-neg91.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-eval91.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-neg91.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-neg91.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-neg91.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-eval91.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+91.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. Simplified91.5%

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

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

    if -4.90000000000000012e-17 < y < 0.0037000000000000002

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 42.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -9.5 \cdot 10^{-123}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 5.4 \cdot 10^{-157}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-40}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2.42 \cdot 10^{-14}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 21000000:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.6499999999999999e69 or 2.1e7 < t

    1. Initial program 90.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-90.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. *-commutative90.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. *-commutative90.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-neg90.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-eval90.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-neg90.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-neg90.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-neg90.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-eval90.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+90.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. Simplified90.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 69.8%

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

    if -1.6499999999999999e69 < t < -9.5000000000000002e-123

    1. Initial program 92.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-92.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. *-commutative92.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. *-commutative92.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-neg92.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-eval92.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-neg92.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-neg92.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-neg92.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-eval92.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+92.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. Simplified92.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 38.9%

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

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

    if -9.5000000000000002e-123 < t < 5.4e-157 or 8.4999999999999998e-40 < t < 2.42e-14

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.4e-157 < t < 8.4999999999999998e-40 or 2.42e-14 < t < 2.1e7

    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 57.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 inf 45.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-123}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-157}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-40}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 2.42 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 21000000:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 14: 46.8% accurate, 1.2× 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.72 \cdot 10^{+19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-123}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-285}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-252}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{-171}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 1850000000:\\ \;\;\;\;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.72e+19)
     t_2
     (if (<= t -8.2e-123)
       t_1
       (if (<= t 9.2e-285)
         x
         (if (<= t 1.7e-252)
           t_1
           (if (<= t 2.65e-171) (* y b) (if (<= t 1850000000.0) 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.72e+19) {
		tmp = t_2;
	} else if (t <= -8.2e-123) {
		tmp = t_1;
	} else if (t <= 9.2e-285) {
		tmp = x;
	} else if (t <= 1.7e-252) {
		tmp = t_1;
	} else if (t <= 2.65e-171) {
		tmp = y * b;
	} else if (t <= 1850000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = z * (1.0d0 - y)
    t_2 = t * (b - a)
    if (t <= (-1.72d+19)) then
        tmp = t_2
    else if (t <= (-8.2d-123)) then
        tmp = t_1
    else if (t <= 9.2d-285) then
        tmp = x
    else if (t <= 1.7d-252) then
        tmp = t_1
    else if (t <= 2.65d-171) then
        tmp = y * b
    else if (t <= 1850000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (1.0 - y);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -1.72e+19) {
		tmp = t_2;
	} else if (t <= -8.2e-123) {
		tmp = t_1;
	} else if (t <= 9.2e-285) {
		tmp = x;
	} else if (t <= 1.7e-252) {
		tmp = t_1;
	} else if (t <= 2.65e-171) {
		tmp = y * b;
	} else if (t <= 1850000000.0) {
		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.72e+19:
		tmp = t_2
	elif t <= -8.2e-123:
		tmp = t_1
	elif t <= 9.2e-285:
		tmp = x
	elif t <= 1.7e-252:
		tmp = t_1
	elif t <= 2.65e-171:
		tmp = y * b
	elif t <= 1850000000.0:
		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.72e+19)
		tmp = t_2;
	elseif (t <= -8.2e-123)
		tmp = t_1;
	elseif (t <= 9.2e-285)
		tmp = x;
	elseif (t <= 1.7e-252)
		tmp = t_1;
	elseif (t <= 2.65e-171)
		tmp = Float64(y * b);
	elseif (t <= 1850000000.0)
		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.72e+19)
		tmp = t_2;
	elseif (t <= -8.2e-123)
		tmp = t_1;
	elseif (t <= 9.2e-285)
		tmp = x;
	elseif (t <= 1.7e-252)
		tmp = t_1;
	elseif (t <= 2.65e-171)
		tmp = y * b;
	elseif (t <= 1850000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.72e+19], t$95$2, If[LessEqual[t, -8.2e-123], t$95$1, If[LessEqual[t, 9.2e-285], x, If[LessEqual[t, 1.7e-252], t$95$1, If[LessEqual[t, 2.65e-171], N[(y * b), $MachinePrecision], If[LessEqual[t, 1850000000.0], 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.72 \cdot 10^{+19}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -8.2 \cdot 10^{-123}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 9.2 \cdot 10^{-285}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{-252}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.65 \cdot 10^{-171}:\\
\;\;\;\;y \cdot b\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.72e19 or 1.85e9 < t

    1. Initial program 89.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-89.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. *-commutative89.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. *-commutative89.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-neg89.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-eval89.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-neg89.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-neg89.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-neg89.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-eval89.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+89.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. Simplified89.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 68.4%

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

    if -1.72e19 < t < -8.2000000000000001e-123 or 9.19999999999999986e-285 < t < 1.7e-252 or 2.65000000000000009e-171 < t < 1.85e9

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

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

    if -8.2000000000000001e-123 < t < 9.19999999999999986e-285

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

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

    if 1.7e-252 < t < 2.65000000000000009e-171

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.72 \cdot 10^{+19}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-123}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-285}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-252}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{-171}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 1850000000:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 15: 61.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - t \cdot \left(a - b\right)\\ t_2 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.1 \cdot 10^{+93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.66 \cdot 10^{+27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-17}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* t (- a b)))) (t_2 (* y (- b z))))
   (if (<= y -1.1e+93)
     t_2
     (if (<= y -1.66e+27)
       t_1
       (if (<= y -5.4e+25)
         (* y (- z))
         (if (<= y -5.1e-17)
           (* b (- (+ t y) 2.0))
           (if (<= y 1.12e+54) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (t * (a - b));
	double t_2 = y * (b - z);
	double tmp;
	if (y <= -1.1e+93) {
		tmp = t_2;
	} else if (y <= -1.66e+27) {
		tmp = t_1;
	} else if (y <= -5.4e+25) {
		tmp = y * -z;
	} else if (y <= -5.1e-17) {
		tmp = b * ((t + y) - 2.0);
	} else if (y <= 1.12e+54) {
		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 * (a - b))
    t_2 = y * (b - z)
    if (y <= (-1.1d+93)) then
        tmp = t_2
    else if (y <= (-1.66d+27)) then
        tmp = t_1
    else if (y <= (-5.4d+25)) then
        tmp = y * -z
    else if (y <= (-5.1d-17)) then
        tmp = b * ((t + y) - 2.0d0)
    else if (y <= 1.12d+54) 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 * (a - b));
	double t_2 = y * (b - z);
	double tmp;
	if (y <= -1.1e+93) {
		tmp = t_2;
	} else if (y <= -1.66e+27) {
		tmp = t_1;
	} else if (y <= -5.4e+25) {
		tmp = y * -z;
	} else if (y <= -5.1e-17) {
		tmp = b * ((t + y) - 2.0);
	} else if (y <= 1.12e+54) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (t * (a - b))
	t_2 = y * (b - z)
	tmp = 0
	if y <= -1.1e+93:
		tmp = t_2
	elif y <= -1.66e+27:
		tmp = t_1
	elif y <= -5.4e+25:
		tmp = y * -z
	elif y <= -5.1e-17:
		tmp = b * ((t + y) - 2.0)
	elif y <= 1.12e+54:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(t * Float64(a - b)))
	t_2 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -1.1e+93)
		tmp = t_2;
	elseif (y <= -1.66e+27)
		tmp = t_1;
	elseif (y <= -5.4e+25)
		tmp = Float64(y * Float64(-z));
	elseif (y <= -5.1e-17)
		tmp = Float64(b * Float64(Float64(t + y) - 2.0));
	elseif (y <= 1.12e+54)
		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 * (a - b));
	t_2 = y * (b - z);
	tmp = 0.0;
	if (y <= -1.1e+93)
		tmp = t_2;
	elseif (y <= -1.66e+27)
		tmp = t_1;
	elseif (y <= -5.4e+25)
		tmp = y * -z;
	elseif (y <= -5.1e-17)
		tmp = b * ((t + y) - 2.0);
	elseif (y <= 1.12e+54)
		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[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e+93], t$95$2, If[LessEqual[y, -1.66e+27], t$95$1, If[LessEqual[y, -5.4e+25], N[(y * (-z)), $MachinePrecision], If[LessEqual[y, -5.1e-17], N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e+54], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.66 \cdot 10^{+27}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;y \leq 1.12 \cdot 10^{+54}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.10000000000000011e93 or 1.12e54 < y

    1. Initial program 91.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-91.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. *-commutative91.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. *-commutative91.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-neg91.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-eval91.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-neg91.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-neg91.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-neg91.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-eval91.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+91.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. Simplified91.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 77.4%

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

    if -1.10000000000000011e93 < y < -1.65999999999999986e27 or -5.1000000000000003e-17 < y < 1.12e54

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65999999999999986e27 < y < -5.4e25

    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 100.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 inf 100.0%

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

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

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

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

    if -5.4e25 < y < -5.1000000000000003e-17

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{+93}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.66 \cdot 10^{+27}:\\ \;\;\;\;x - t \cdot \left(a - b\right)\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-17}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+54}:\\ \;\;\;\;x - t \cdot \left(a - b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 16: 80.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.35 \cdot 10^{+68} \lor \neg \left(b \leq 8.5 \cdot 10^{+77}\right):\\
\;\;\;\;x - b \cdot \left(2 - \left(t + y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.3499999999999999e68 or 8.50000000000000018e77 < b

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

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

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

    if -3.3499999999999999e68 < b < 8.50000000000000018e77

    1. Initial program 99.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-99.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. *-commutative99.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. *-commutative99.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-neg99.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-eval99.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-neg99.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-neg99.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-neg99.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-eval99.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+99.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. Simplified99.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 84.1%

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

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

Alternative 17: 62.6% accurate, 1.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.3e18 or 9.8e11 < t

    1. Initial program 89.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-89.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. *-commutative89.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. *-commutative89.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-neg89.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-eval89.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-neg89.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-neg89.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-neg89.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-eval89.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+89.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. Simplified89.8%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 87.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 73.6%

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

    if -3.3e18 < t < -3.4000000000000001e-74 or -2.1e-105 < t < 9.8e11

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

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

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

    if -3.4000000000000001e-74 < t < -2.1e-105

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{+18}:\\ \;\;\;\;x - t \cdot \left(a - b\right)\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-74}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-105}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 980000000000:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \left(a - b\right)\\ \end{array} \]

Alternative 18: 77.2% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{+34} \lor \neg \left(b \leq 1.15 \cdot 10^{+80}\right):\\
\;\;\;\;x - b \cdot \left(2 - \left(t + y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.99999999999999978e34 or 1.15000000000000002e80 < b

    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 a around 0 88.2%

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

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

    if -3.99999999999999978e34 < b < 1.15000000000000002e80

    1. Initial program 99.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-99.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. *-commutative99.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. *-commutative99.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-neg99.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-eval99.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-neg99.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-neg99.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-neg99.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-eval99.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+99.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. Simplified99.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 84.5%

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

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

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

Alternative 19: 26.6% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-123}:\\
\;\;\;\;y \cdot b\\

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

\mathbf{elif}\;t \leq 8.8 \cdot 10^{+64}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 2.05 \cdot 10^{+102}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.3999999999999995e139 or 2.05e102 < t

    1. Initial program 89.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-89.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. *-commutative89.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. *-commutative89.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-neg89.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-eval89.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-neg89.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-neg89.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-neg89.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-eval89.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+89.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. Simplified89.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 b around inf 58.0%

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

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

    if -5.3999999999999995e139 < t < -1.25000000000000007e-123 or 6.2e13 < t < 8.80000000000000007e64

    1. Initial program 91.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-91.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. *-commutative91.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. *-commutative91.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-neg91.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-eval91.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-neg91.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-neg91.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-neg91.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-eval91.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+91.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. Simplified91.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 b around inf 43.8%

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

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

    if -1.25000000000000007e-123 < t < 6.2e13 or 8.80000000000000007e64 < t < 2.05e102

    1. Initial program 99.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.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. *-commutative99.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. *-commutative99.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-neg99.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-eval99.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-neg99.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-neg99.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-neg99.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-eval99.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+99.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. Simplified99.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 30.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.4 \cdot 10^{+139}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-123}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 62000000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{+64}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+102}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 20: 49.3% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -5.4 \cdot 10^{+139}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-242}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-284}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.4 \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 (- b z))) (t_2 (* t (- b a))))
   (if (<= t -5.4e+139)
     t_2
     (if (<= t -2.1e-242)
       t_1
       (if (<= t 2.2e-284) x (if (<= t 3.4e+63) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -5.4e+139) {
		tmp = t_2;
	} else if (t <= -2.1e-242) {
		tmp = t_1;
	} else if (t <= 2.2e-284) {
		tmp = x;
	} else if (t <= 3.4e+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 * (b - z)
    t_2 = t * (b - a)
    if (t <= (-5.4d+139)) then
        tmp = t_2
    else if (t <= (-2.1d-242)) then
        tmp = t_1
    else if (t <= 2.2d-284) then
        tmp = x
    else if (t <= 3.4d+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 * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -5.4e+139) {
		tmp = t_2;
	} else if (t <= -2.1e-242) {
		tmp = t_1;
	} else if (t <= 2.2e-284) {
		tmp = x;
	} else if (t <= 3.4e+63) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -5.4e+139:
		tmp = t_2
	elif t <= -2.1e-242:
		tmp = t_1
	elif t <= 2.2e-284:
		tmp = x
	elif t <= 3.4e+63:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -5.4e+139)
		tmp = t_2;
	elseif (t <= -2.1e-242)
		tmp = t_1;
	elseif (t <= 2.2e-284)
		tmp = x;
	elseif (t <= 3.4e+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 * (b - z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -5.4e+139)
		tmp = t_2;
	elseif (t <= -2.1e-242)
		tmp = t_1;
	elseif (t <= 2.2e-284)
		tmp = x;
	elseif (t <= 3.4e+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 * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.4e+139], t$95$2, If[LessEqual[t, -2.1e-242], t$95$1, If[LessEqual[t, 2.2e-284], x, If[LessEqual[t, 3.4e+63], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.1 \cdot 10^{-242}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-284}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.3999999999999995e139 < t < -2.10000000000000019e-242 or 2.2000000000000001e-284 < t < 3.3999999999999999e63

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

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

    if -2.10000000000000019e-242 < t < 2.2000000000000001e-284

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.4 \cdot 10^{+139}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-242}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-284}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+63}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 21: 70.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \cdot 10^{+92} \lor \neg \left(y \leq 5.4 \cdot 10^{+53}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.4500000000000001e92 or 5.40000000000000039e53 < y

    1. Initial program 91.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-91.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. *-commutative91.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. *-commutative91.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-neg91.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-eval91.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-neg91.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-neg91.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-neg91.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-eval91.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+91.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. Simplified91.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 77.4%

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

    if -2.4500000000000001e92 < y < 5.40000000000000039e53

    1. Initial program 95.0%

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

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 78.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 75.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.45 \cdot 10^{+92} \lor \neg \left(y \leq 5.4 \cdot 10^{+53}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + x\right) - t \cdot \left(a - b\right)\\ \end{array} \]

Alternative 22: 51.0% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-102}:\\
\;\;\;\;x + t \cdot b\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.50000000000000012e-5 or 7.9999999999999999e52 < y

    1. Initial program 92.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-92.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. *-commutative92.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. *-commutative92.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-neg92.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-eval92.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-neg92.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-neg92.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-neg92.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-eval92.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+92.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. Simplified92.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 69.3%

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

    if -2.50000000000000012e-5 < y < 3.49999999999999986e-102

    1. Initial program 95.3%

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

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

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

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

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

    if 3.49999999999999986e-102 < y < 7.9999999999999999e52

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{-5}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-102}:\\ \;\;\;\;x + t \cdot b\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+52}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 23: 25.5% accurate, 2.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.3999999999999995e139 or 2e13 < t

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

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

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

    if -5.3999999999999995e139 < t < 2e13

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.4 \cdot 10^{+139}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 20000000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 24: 20.0% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;a \leq 9.4 \cdot 10^{+207}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5e152 or 9.39999999999999951e207 < a

    1. Initial program 83.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-83.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. *-commutative83.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. *-commutative83.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-neg83.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-eval83.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-neg83.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-neg83.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-neg83.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-eval83.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+83.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. Simplified83.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 74.3%

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

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

    if -5e152 < a < 9.39999999999999951e207

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

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

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

Alternative 25: 10.5% 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 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{a} \]
  6. Final simplification7.4%

    \[\leadsto a \]

Reproduce

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