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

Percentage Accurate: 95.3% → 97.8%
Time: 18.2s
Alternatives: 29
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 29 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

Alternative 2: 97.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y + \left(t + -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 (+ y (+ t -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((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b)
	return fma(Float64(y + Float64(t + -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[(y + N[(t + -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(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Derivation
  1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 71.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + b \cdot \left(y - 2\right)\\ t_2 := b \cdot \left(\left(t + y\right) - 2\right) - t \cdot a\\ \mathbf{if}\;b \leq -2500000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.95 \cdot 10^{-40}:\\ \;\;\;\;x + \left(\left(a + z\right) - y \cdot z\right)\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{-66}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -3 \cdot 10^{-83}:\\ \;\;\;\;t_1 + t \cdot b\\ \mathbf{elif}\;b \leq 1.55 \cdot 10^{+16}:\\ \;\;\;\;x - \left(a \cdot \left(t + -1\right) + y \cdot z\right)\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{+96} \lor \neg \left(b \leq 7.5 \cdot 10^{+142}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;a + t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* b (- y 2.0)))) (t_2 (- (* b (- (+ t y) 2.0)) (* t a))))
   (if (<= b -2500000.0)
     t_2
     (if (<= b -1.95e-40)
       (+ x (- (+ a z) (* y z)))
       (if (<= b -5.8e-66)
         t_2
         (if (<= b -3e-83)
           (+ t_1 (* t b))
           (if (<= b 1.55e+16)
             (- x (+ (* a (+ t -1.0)) (* y z)))
             (if (or (<= b 6.2e+96) (not (<= b 7.5e+142)))
               t_2
               (+ a t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (b * (y - 2.0));
	double t_2 = (b * ((t + y) - 2.0)) - (t * a);
	double tmp;
	if (b <= -2500000.0) {
		tmp = t_2;
	} else if (b <= -1.95e-40) {
		tmp = x + ((a + z) - (y * z));
	} else if (b <= -5.8e-66) {
		tmp = t_2;
	} else if (b <= -3e-83) {
		tmp = t_1 + (t * b);
	} else if (b <= 1.55e+16) {
		tmp = x - ((a * (t + -1.0)) + (y * z));
	} else if ((b <= 6.2e+96) || !(b <= 7.5e+142)) {
		tmp = t_2;
	} else {
		tmp = a + 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 * (y - 2.0d0))
    t_2 = (b * ((t + y) - 2.0d0)) - (t * a)
    if (b <= (-2500000.0d0)) then
        tmp = t_2
    else if (b <= (-1.95d-40)) then
        tmp = x + ((a + z) - (y * z))
    else if (b <= (-5.8d-66)) then
        tmp = t_2
    else if (b <= (-3d-83)) then
        tmp = t_1 + (t * b)
    else if (b <= 1.55d+16) then
        tmp = x - ((a * (t + (-1.0d0))) + (y * z))
    else if ((b <= 6.2d+96) .or. (.not. (b <= 7.5d+142))) then
        tmp = t_2
    else
        tmp = a + 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 * (y - 2.0));
	double t_2 = (b * ((t + y) - 2.0)) - (t * a);
	double tmp;
	if (b <= -2500000.0) {
		tmp = t_2;
	} else if (b <= -1.95e-40) {
		tmp = x + ((a + z) - (y * z));
	} else if (b <= -5.8e-66) {
		tmp = t_2;
	} else if (b <= -3e-83) {
		tmp = t_1 + (t * b);
	} else if (b <= 1.55e+16) {
		tmp = x - ((a * (t + -1.0)) + (y * z));
	} else if ((b <= 6.2e+96) || !(b <= 7.5e+142)) {
		tmp = t_2;
	} else {
		tmp = a + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (b * (y - 2.0))
	t_2 = (b * ((t + y) - 2.0)) - (t * a)
	tmp = 0
	if b <= -2500000.0:
		tmp = t_2
	elif b <= -1.95e-40:
		tmp = x + ((a + z) - (y * z))
	elif b <= -5.8e-66:
		tmp = t_2
	elif b <= -3e-83:
		tmp = t_1 + (t * b)
	elif b <= 1.55e+16:
		tmp = x - ((a * (t + -1.0)) + (y * z))
	elif (b <= 6.2e+96) or not (b <= 7.5e+142):
		tmp = t_2
	else:
		tmp = a + t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(b * Float64(y - 2.0)))
	t_2 = Float64(Float64(b * Float64(Float64(t + y) - 2.0)) - Float64(t * a))
	tmp = 0.0
	if (b <= -2500000.0)
		tmp = t_2;
	elseif (b <= -1.95e-40)
		tmp = Float64(x + Float64(Float64(a + z) - Float64(y * z)));
	elseif (b <= -5.8e-66)
		tmp = t_2;
	elseif (b <= -3e-83)
		tmp = Float64(t_1 + Float64(t * b));
	elseif (b <= 1.55e+16)
		tmp = Float64(x - Float64(Float64(a * Float64(t + -1.0)) + Float64(y * z)));
	elseif ((b <= 6.2e+96) || !(b <= 7.5e+142))
		tmp = t_2;
	else
		tmp = Float64(a + t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (b * (y - 2.0));
	t_2 = (b * ((t + y) - 2.0)) - (t * a);
	tmp = 0.0;
	if (b <= -2500000.0)
		tmp = t_2;
	elseif (b <= -1.95e-40)
		tmp = x + ((a + z) - (y * z));
	elseif (b <= -5.8e-66)
		tmp = t_2;
	elseif (b <= -3e-83)
		tmp = t_1 + (t * b);
	elseif (b <= 1.55e+16)
		tmp = x - ((a * (t + -1.0)) + (y * z));
	elseif ((b <= 6.2e+96) || ~((b <= 7.5e+142)))
		tmp = t_2;
	else
		tmp = a + t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2500000.0], t$95$2, If[LessEqual[b, -1.95e-40], N[(x + N[(N[(a + z), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.8e-66], t$95$2, If[LessEqual[b, -3e-83], N[(t$95$1 + N[(t * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.55e+16], N[(x - N[(N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 6.2e+96], N[Not[LessEqual[b, 7.5e+142]], $MachinePrecision]], t$95$2, N[(a + t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq -5.8 \cdot 10^{-66}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq -3 \cdot 10^{-83}:\\
\;\;\;\;t_1 + t \cdot b\\

\mathbf{elif}\;b \leq 1.55 \cdot 10^{+16}:\\
\;\;\;\;x - \left(a \cdot \left(t + -1\right) + y \cdot z\right)\\

\mathbf{elif}\;b \leq 6.2 \cdot 10^{+96} \lor \neg \left(b \leq 7.5 \cdot 10^{+142}\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -2.5e6 or -1.9499999999999999e-40 < b < -5.80000000000000023e-66 or 1.55e16 < b < 6.1999999999999996e96 or 7.5000000000000002e142 < b

    1. Initial program 94.5%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. associate-*r*80.7%

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

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

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

    if -2.5e6 < b < -1.9499999999999999e-40

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.80000000000000023e-66 < b < -3.0000000000000001e-83

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0000000000000001e-83 < b < 1.55e16

    1. Initial program 100.0%

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

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

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

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

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

    if 6.1999999999999996e96 < b < 7.5000000000000002e142

    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. Taylor expanded in t around 0 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2500000:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right) - t \cdot a\\ \mathbf{elif}\;b \leq -1.95 \cdot 10^{-40}:\\ \;\;\;\;x + \left(\left(a + z\right) - y \cdot z\right)\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{-66}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right) - t \cdot a\\ \mathbf{elif}\;b \leq -3 \cdot 10^{-83}:\\ \;\;\;\;\left(x + b \cdot \left(y - 2\right)\right) + t \cdot b\\ \mathbf{elif}\;b \leq 1.55 \cdot 10^{+16}:\\ \;\;\;\;x - \left(a \cdot \left(t + -1\right) + y \cdot z\right)\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{+96} \lor \neg \left(b \leq 7.5 \cdot 10^{+142}\right):\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right) - t \cdot a\\ \mathbf{else}:\\ \;\;\;\;a + \left(x + b \cdot \left(y - 2\right)\right)\\ \end{array} \]

Alternative 5: 54.9% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -6.5 \cdot 10^{+56}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.9 \cdot 10^{+33}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;y \leq -2.1 \cdot 10^{-105}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -7.3 \cdot 10^{-153}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{-151}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 2.1 \cdot 10^{+18}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.35000000000000009e86 or -6.5000000000000001e56 < y < -1.90000000000000001e33 or 2.1e18 < y

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

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

    if -1.35000000000000009e86 < y < -6.5000000000000001e56 or -7.39999999999999976e-34 < y < -2.1e-105 or -7.30000000000000003e-153 < y < 4.5000000000000002e-151 or 3.3e-72 < y < 2.1e18

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+66.1%

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

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

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

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

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \color{blue}{\left(-\left(-a\right)\right)}\right)\right)\right) \]
      10. mul-1-neg66.1%

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \left(-\color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      11. distribute-neg-in66.1%

        \[\leadsto x - \left(y \cdot z + \left(-\color{blue}{\left(-\left(-1 \cdot z + -1 \cdot a\right)\right)}\right)\right) \]
      12. unsub-neg66.1%

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

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

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in66.1%

        \[\leadsto x - \left(z \cdot y - \color{blue}{\left(\left(--1 \cdot a\right) + \left(--1 \cdot z\right)\right)}\right) \]
      16. mul-1-neg66.1%

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg66.1%

        \[\leadsto x - \left(z \cdot y - \left(\color{blue}{a} + \left(--1 \cdot z\right)\right)\right) \]
      18. mul-1-neg66.1%

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg66.1%

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

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

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

    if -1.90000000000000001e33 < y < -7.39999999999999976e-34

    1. Initial program 99.9%

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

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

    if -2.1e-105 < y < -7.30000000000000003e-153 or 4.5000000000000002e-151 < y < 3.3e-72

    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. Taylor expanded in t around inf 66.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{+56}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{+33}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{-34}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-105}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{elif}\;y \leq -7.3 \cdot 10^{-153}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-151}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-72}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+18}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 6: 54.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(z + x\right)\\ t_2 := t \cdot \left(b - a\right)\\ t_3 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.35 \cdot 10^{+86}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+56}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{+38}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-33}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-73}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+18}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (+ z x))) (t_2 (* t (- b a))) (t_3 (* y (- b z))))
   (if (<= y -1.35e+86)
     t_3
     (if (<= y -1.85e+56)
       t_1
       (if (<= y -1.55e+38)
         t_3
         (if (<= y -6e-33)
           (- a (* t a))
           (if (<= y -7.2e-106)
             t_1
             (if (<= y -4.4e-150)
               t_2
               (if (<= y 6.2e-152)
                 t_1
                 (if (<= y 4.8e-73) t_2 (if (<= y 3.9e+18) t_1 t_3)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (z + x);
	double t_2 = t * (b - a);
	double t_3 = y * (b - z);
	double tmp;
	if (y <= -1.35e+86) {
		tmp = t_3;
	} else if (y <= -1.85e+56) {
		tmp = t_1;
	} else if (y <= -1.55e+38) {
		tmp = t_3;
	} else if (y <= -6e-33) {
		tmp = a - (t * a);
	} else if (y <= -7.2e-106) {
		tmp = t_1;
	} else if (y <= -4.4e-150) {
		tmp = t_2;
	} else if (y <= 6.2e-152) {
		tmp = t_1;
	} else if (y <= 4.8e-73) {
		tmp = t_2;
	} else if (y <= 3.9e+18) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = a + (z + x)
    t_2 = t * (b - a)
    t_3 = y * (b - z)
    if (y <= (-1.35d+86)) then
        tmp = t_3
    else if (y <= (-1.85d+56)) then
        tmp = t_1
    else if (y <= (-1.55d+38)) then
        tmp = t_3
    else if (y <= (-6d-33)) then
        tmp = a - (t * a)
    else if (y <= (-7.2d-106)) then
        tmp = t_1
    else if (y <= (-4.4d-150)) then
        tmp = t_2
    else if (y <= 6.2d-152) then
        tmp = t_1
    else if (y <= 4.8d-73) then
        tmp = t_2
    else if (y <= 3.9d+18) then
        tmp = t_1
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (z + x);
	double t_2 = t * (b - a);
	double t_3 = y * (b - z);
	double tmp;
	if (y <= -1.35e+86) {
		tmp = t_3;
	} else if (y <= -1.85e+56) {
		tmp = t_1;
	} else if (y <= -1.55e+38) {
		tmp = t_3;
	} else if (y <= -6e-33) {
		tmp = a - (t * a);
	} else if (y <= -7.2e-106) {
		tmp = t_1;
	} else if (y <= -4.4e-150) {
		tmp = t_2;
	} else if (y <= 6.2e-152) {
		tmp = t_1;
	} else if (y <= 4.8e-73) {
		tmp = t_2;
	} else if (y <= 3.9e+18) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (z + x)
	t_2 = t * (b - a)
	t_3 = y * (b - z)
	tmp = 0
	if y <= -1.35e+86:
		tmp = t_3
	elif y <= -1.85e+56:
		tmp = t_1
	elif y <= -1.55e+38:
		tmp = t_3
	elif y <= -6e-33:
		tmp = a - (t * a)
	elif y <= -7.2e-106:
		tmp = t_1
	elif y <= -4.4e-150:
		tmp = t_2
	elif y <= 6.2e-152:
		tmp = t_1
	elif y <= 4.8e-73:
		tmp = t_2
	elif y <= 3.9e+18:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(z + x))
	t_2 = Float64(t * Float64(b - a))
	t_3 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -1.35e+86)
		tmp = t_3;
	elseif (y <= -1.85e+56)
		tmp = t_1;
	elseif (y <= -1.55e+38)
		tmp = t_3;
	elseif (y <= -6e-33)
		tmp = Float64(a - Float64(t * a));
	elseif (y <= -7.2e-106)
		tmp = t_1;
	elseif (y <= -4.4e-150)
		tmp = t_2;
	elseif (y <= 6.2e-152)
		tmp = t_1;
	elseif (y <= 4.8e-73)
		tmp = t_2;
	elseif (y <= 3.9e+18)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (z + x);
	t_2 = t * (b - a);
	t_3 = y * (b - z);
	tmp = 0.0;
	if (y <= -1.35e+86)
		tmp = t_3;
	elseif (y <= -1.85e+56)
		tmp = t_1;
	elseif (y <= -1.55e+38)
		tmp = t_3;
	elseif (y <= -6e-33)
		tmp = a - (t * a);
	elseif (y <= -7.2e-106)
		tmp = t_1;
	elseif (y <= -4.4e-150)
		tmp = t_2;
	elseif (y <= 6.2e-152)
		tmp = t_1;
	elseif (y <= 4.8e-73)
		tmp = t_2;
	elseif (y <= 3.9e+18)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.35e+86], t$95$3, If[LessEqual[y, -1.85e+56], t$95$1, If[LessEqual[y, -1.55e+38], t$95$3, If[LessEqual[y, -6e-33], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.2e-106], t$95$1, If[LessEqual[y, -4.4e-150], t$95$2, If[LessEqual[y, 6.2e-152], t$95$1, If[LessEqual[y, 4.8e-73], t$95$2, If[LessEqual[y, 3.9e+18], t$95$1, t$95$3]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.85 \cdot 10^{+56}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.55 \cdot 10^{+38}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -6 \cdot 10^{-33}:\\
\;\;\;\;a - t \cdot a\\

\mathbf{elif}\;y \leq -7.2 \cdot 10^{-106}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4.4 \cdot 10^{-150}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{-152}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-73}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 3.9 \cdot 10^{+18}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.35000000000000009e86 or -1.84999999999999998e56 < y < -1.55000000000000009e38 or 3.9e18 < y

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

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

    if -1.35000000000000009e86 < y < -1.84999999999999998e56 or -6.0000000000000003e-33 < y < -7.20000000000000025e-106 or -4.3999999999999999e-150 < y < 6.1999999999999997e-152 or 4.80000000000000011e-73 < y < 3.9e18

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+66.1%

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

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

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

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

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \color{blue}{\left(-\left(-a\right)\right)}\right)\right)\right) \]
      10. mul-1-neg66.1%

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \left(-\color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      11. distribute-neg-in66.1%

        \[\leadsto x - \left(y \cdot z + \left(-\color{blue}{\left(-\left(-1 \cdot z + -1 \cdot a\right)\right)}\right)\right) \]
      12. unsub-neg66.1%

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

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

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in66.1%

        \[\leadsto x - \left(z \cdot y - \color{blue}{\left(\left(--1 \cdot a\right) + \left(--1 \cdot z\right)\right)}\right) \]
      16. mul-1-neg66.1%

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg66.1%

        \[\leadsto x - \left(z \cdot y - \left(\color{blue}{a} + \left(--1 \cdot z\right)\right)\right) \]
      18. mul-1-neg66.1%

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg66.1%

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

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

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

    if -1.55000000000000009e38 < y < -6.0000000000000003e-33

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a - a \cdot t} \]
    7. Simplified47.0%

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

    if -7.20000000000000025e-106 < y < -4.3999999999999999e-150 or 6.1999999999999997e-152 < y < 4.80000000000000011e-73

    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. Taylor expanded in t around inf 66.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+56}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{+38}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-33}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-106}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-150}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-152}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-73}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+18}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 7: 55.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ t_2 := y \cdot \left(b - z\right)\\ t_3 := a + \left(z + x\right)\\ \mathbf{if}\;y \leq -8.6 \cdot 10^{+86}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{+50}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{+24}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-105}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-150}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-152}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-73}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+18}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (- b a))) (t_2 (* y (- b z))) (t_3 (+ a (+ z x))))
   (if (<= y -8.6e+86)
     t_2
     (if (<= y -6.2e+50)
       (- x (* t a))
       (if (<= y -1.7e+24)
         t_2
         (if (<= y -1.3e-105)
           t_3
           (if (<= y -4.6e-150)
             t_1
             (if (<= y 5.8e-152)
               t_3
               (if (<= y 4.4e-73) t_1 (if (<= y 6.6e+18) t_3 t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double t_2 = y * (b - z);
	double t_3 = a + (z + x);
	double tmp;
	if (y <= -8.6e+86) {
		tmp = t_2;
	} else if (y <= -6.2e+50) {
		tmp = x - (t * a);
	} else if (y <= -1.7e+24) {
		tmp = t_2;
	} else if (y <= -1.3e-105) {
		tmp = t_3;
	} else if (y <= -4.6e-150) {
		tmp = t_1;
	} else if (y <= 5.8e-152) {
		tmp = t_3;
	} else if (y <= 4.4e-73) {
		tmp = t_1;
	} else if (y <= 6.6e+18) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t * (b - a)
    t_2 = y * (b - z)
    t_3 = a + (z + x)
    if (y <= (-8.6d+86)) then
        tmp = t_2
    else if (y <= (-6.2d+50)) then
        tmp = x - (t * a)
    else if (y <= (-1.7d+24)) then
        tmp = t_2
    else if (y <= (-1.3d-105)) then
        tmp = t_3
    else if (y <= (-4.6d-150)) then
        tmp = t_1
    else if (y <= 5.8d-152) then
        tmp = t_3
    else if (y <= 4.4d-73) then
        tmp = t_1
    else if (y <= 6.6d+18) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double t_2 = y * (b - z);
	double t_3 = a + (z + x);
	double tmp;
	if (y <= -8.6e+86) {
		tmp = t_2;
	} else if (y <= -6.2e+50) {
		tmp = x - (t * a);
	} else if (y <= -1.7e+24) {
		tmp = t_2;
	} else if (y <= -1.3e-105) {
		tmp = t_3;
	} else if (y <= -4.6e-150) {
		tmp = t_1;
	} else if (y <= 5.8e-152) {
		tmp = t_3;
	} else if (y <= 4.4e-73) {
		tmp = t_1;
	} else if (y <= 6.6e+18) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (b - a)
	t_2 = y * (b - z)
	t_3 = a + (z + x)
	tmp = 0
	if y <= -8.6e+86:
		tmp = t_2
	elif y <= -6.2e+50:
		tmp = x - (t * a)
	elif y <= -1.7e+24:
		tmp = t_2
	elif y <= -1.3e-105:
		tmp = t_3
	elif y <= -4.6e-150:
		tmp = t_1
	elif y <= 5.8e-152:
		tmp = t_3
	elif y <= 4.4e-73:
		tmp = t_1
	elif y <= 6.6e+18:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(b - a))
	t_2 = Float64(y * Float64(b - z))
	t_3 = Float64(a + Float64(z + x))
	tmp = 0.0
	if (y <= -8.6e+86)
		tmp = t_2;
	elseif (y <= -6.2e+50)
		tmp = Float64(x - Float64(t * a));
	elseif (y <= -1.7e+24)
		tmp = t_2;
	elseif (y <= -1.3e-105)
		tmp = t_3;
	elseif (y <= -4.6e-150)
		tmp = t_1;
	elseif (y <= 5.8e-152)
		tmp = t_3;
	elseif (y <= 4.4e-73)
		tmp = t_1;
	elseif (y <= 6.6e+18)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (b - a);
	t_2 = y * (b - z);
	t_3 = a + (z + x);
	tmp = 0.0;
	if (y <= -8.6e+86)
		tmp = t_2;
	elseif (y <= -6.2e+50)
		tmp = x - (t * a);
	elseif (y <= -1.7e+24)
		tmp = t_2;
	elseif (y <= -1.3e-105)
		tmp = t_3;
	elseif (y <= -4.6e-150)
		tmp = t_1;
	elseif (y <= 5.8e-152)
		tmp = t_3;
	elseif (y <= 4.4e-73)
		tmp = t_1;
	elseif (y <= 6.6e+18)
		tmp = t_3;
	else
		tmp = t_2;
	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 * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(z + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.6e+86], t$95$2, If[LessEqual[y, -6.2e+50], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e+24], t$95$2, If[LessEqual[y, -1.3e-105], t$95$3, If[LessEqual[y, -4.6e-150], t$95$1, If[LessEqual[y, 5.8e-152], t$95$3, If[LessEqual[y, 4.4e-73], t$95$1, If[LessEqual[y, 6.6e+18], t$95$3, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -6.2 \cdot 10^{+50}:\\
\;\;\;\;x - t \cdot a\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{+24}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -1.3 \cdot 10^{-105}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -4.6 \cdot 10^{-150}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{-152}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 4.4 \cdot 10^{-73}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 6.6 \cdot 10^{+18}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.6000000000000004e86 or -6.20000000000000006e50 < y < -1.7e24 or 6.6e18 < y

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

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

    if -8.6000000000000004e86 < y < -6.20000000000000006e50

    1. Initial program 99.9%

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

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

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

    if -1.7e24 < y < -1.2999999999999999e-105 or -4.60000000000000006e-150 < y < 5.8000000000000003e-152 or 4.4e-73 < y < 6.6e18

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+63.4%

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

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

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

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(-\color{blue}{-1 \cdot z}\right) + a\right)\right)\right) \]
      9. remove-double-neg63.4%

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \left(-\color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      11. distribute-neg-in63.4%

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in63.4%

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

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg63.4%

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg63.4%

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

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

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

    if -1.2999999999999999e-105 < y < -4.60000000000000006e-150 or 5.8000000000000003e-152 < y < 4.4e-73

    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. Taylor expanded in t around inf 66.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.6 \cdot 10^{+86}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{+50}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{+24}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-105}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-150}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-152}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-73}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+18}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 8: 40.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;a \leq -520000000000:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-29}:\\
\;\;\;\;z + x\\

\mathbf{elif}\;a \leq -1.65 \cdot 10^{-55}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-204}:\\
\;\;\;\;z + x\\

\mathbf{elif}\;a \leq 8 \cdot 10^{-109}:\\
\;\;\;\;b \cdot y\\

\mathbf{elif}\;a \leq 8 \cdot 10^{+107}:\\
\;\;\;\;z + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.00000000000000006e63 or 7.9999999999999998e107 < a

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

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

    if -1.00000000000000006e63 < a < -5.2e11

    1. Initial program 100.0%

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

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

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

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

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

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

    if -5.2e11 < a < -3.2e-29 or -1.65e-55 < a < 5.39999999999999983e-204 or 7.9999999999999999e-109 < a < 7.9999999999999998e107

    1. Initial program 99.2%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    5. Step-by-step derivation
      1. sub-neg39.2%

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

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg39.2%

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative39.2%

        \[\leadsto \color{blue}{z + x} \]
    6. Simplified39.2%

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

    if -3.2e-29 < a < -1.65e-55

    1. Initial program 100.0%

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

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

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

    if 5.39999999999999983e-204 < a < 7.9999999999999999e-109

    1. Initial program 93.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{+63}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -520000000000:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-29}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-55}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-204}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-109}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+107}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 9: 50.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -1.7 \cdot 10^{+62}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -8.6 \cdot 10^{+38}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-204}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-55}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 10500:\\ \;\;\;\;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 -1.7e+62)
     t_2
     (if (<= t -8.6e+38)
       (* z (- 1.0 y))
       (if (<= t -5.6e-15)
         t_1
         (if (<= t -2.3e-204)
           (+ a x)
           (if (<= t 4.3e-186)
             t_1
             (if (<= t 8e-55) (+ z x) (if (<= t 10500.0) 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 <= -1.7e+62) {
		tmp = t_2;
	} else if (t <= -8.6e+38) {
		tmp = z * (1.0 - y);
	} else if (t <= -5.6e-15) {
		tmp = t_1;
	} else if (t <= -2.3e-204) {
		tmp = a + x;
	} else if (t <= 4.3e-186) {
		tmp = t_1;
	} else if (t <= 8e-55) {
		tmp = z + x;
	} else if (t <= 10500.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 = y * (b - z)
    t_2 = t * (b - a)
    if (t <= (-1.7d+62)) then
        tmp = t_2
    else if (t <= (-8.6d+38)) then
        tmp = z * (1.0d0 - y)
    else if (t <= (-5.6d-15)) then
        tmp = t_1
    else if (t <= (-2.3d-204)) then
        tmp = a + x
    else if (t <= 4.3d-186) then
        tmp = t_1
    else if (t <= 8d-55) then
        tmp = z + x
    else if (t <= 10500.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 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -1.7e+62) {
		tmp = t_2;
	} else if (t <= -8.6e+38) {
		tmp = z * (1.0 - y);
	} else if (t <= -5.6e-15) {
		tmp = t_1;
	} else if (t <= -2.3e-204) {
		tmp = a + x;
	} else if (t <= 4.3e-186) {
		tmp = t_1;
	} else if (t <= 8e-55) {
		tmp = z + x;
	} else if (t <= 10500.0) {
		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 <= -1.7e+62:
		tmp = t_2
	elif t <= -8.6e+38:
		tmp = z * (1.0 - y)
	elif t <= -5.6e-15:
		tmp = t_1
	elif t <= -2.3e-204:
		tmp = a + x
	elif t <= 4.3e-186:
		tmp = t_1
	elif t <= 8e-55:
		tmp = z + x
	elif t <= 10500.0:
		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 <= -1.7e+62)
		tmp = t_2;
	elseif (t <= -8.6e+38)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (t <= -5.6e-15)
		tmp = t_1;
	elseif (t <= -2.3e-204)
		tmp = Float64(a + x);
	elseif (t <= 4.3e-186)
		tmp = t_1;
	elseif (t <= 8e-55)
		tmp = Float64(z + x);
	elseif (t <= 10500.0)
		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 <= -1.7e+62)
		tmp = t_2;
	elseif (t <= -8.6e+38)
		tmp = z * (1.0 - y);
	elseif (t <= -5.6e-15)
		tmp = t_1;
	elseif (t <= -2.3e-204)
		tmp = a + x;
	elseif (t <= 4.3e-186)
		tmp = t_1;
	elseif (t <= 8e-55)
		tmp = z + x;
	elseif (t <= 10500.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[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+62], t$95$2, If[LessEqual[t, -8.6e+38], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.6e-15], t$95$1, If[LessEqual[t, -2.3e-204], N[(a + x), $MachinePrecision], If[LessEqual[t, 4.3e-186], t$95$1, If[LessEqual[t, 8e-55], N[(z + x), $MachinePrecision], If[LessEqual[t, 10500.0], 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 -1.7 \cdot 10^{+62}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -8.6 \cdot 10^{+38}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;t \leq -5.6 \cdot 10^{-15}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -2.3 \cdot 10^{-204}:\\
\;\;\;\;a + x\\

\mathbf{elif}\;t \leq 4.3 \cdot 10^{-186}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.70000000000000007e62 or 10500 < t

    1. Initial program 95.4%

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

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

    if -1.70000000000000007e62 < t < -8.5999999999999994e38

    1. Initial program 100.0%

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

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

    if -8.5999999999999994e38 < t < -5.60000000000000028e-15 or -2.2999999999999999e-204 < t < 4.2999999999999999e-186 or 7.99999999999999996e-55 < t < 10500

    1. Initial program 98.6%

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

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

    if -5.60000000000000028e-15 < t < -2.2999999999999999e-204

    1. Initial program 100.0%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+74.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in74.0%

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

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg74.0%

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg74.0%

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

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

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

    if 4.2999999999999999e-186 < t < 7.99999999999999996e-55

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg52.7%

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative52.7%

        \[\leadsto \color{blue}{z + x} \]
    6. Simplified52.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -8.6 \cdot 10^{+38}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-15}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-204}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-186}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-55}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 10500:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 10: 50.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -1.85 \cdot 10^{+62}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{+38}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-183}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-161}:\\ \;\;\;\;a + b \cdot y\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-56}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 10500:\\ \;\;\;\;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 -1.85e+62)
     t_2
     (if (<= t -3.8e+38)
       (* z (- 1.0 y))
       (if (<= t -2.75e-14)
         t_1
         (if (<= t -3.3e-183)
           (+ a x)
           (if (<= t 4e-161)
             (+ a (* b y))
             (if (<= t 6.8e-56) (+ z x) (if (<= t 10500.0) 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 <= -1.85e+62) {
		tmp = t_2;
	} else if (t <= -3.8e+38) {
		tmp = z * (1.0 - y);
	} else if (t <= -2.75e-14) {
		tmp = t_1;
	} else if (t <= -3.3e-183) {
		tmp = a + x;
	} else if (t <= 4e-161) {
		tmp = a + (b * y);
	} else if (t <= 6.8e-56) {
		tmp = z + x;
	} else if (t <= 10500.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 = y * (b - z)
    t_2 = t * (b - a)
    if (t <= (-1.85d+62)) then
        tmp = t_2
    else if (t <= (-3.8d+38)) then
        tmp = z * (1.0d0 - y)
    else if (t <= (-2.75d-14)) then
        tmp = t_1
    else if (t <= (-3.3d-183)) then
        tmp = a + x
    else if (t <= 4d-161) then
        tmp = a + (b * y)
    else if (t <= 6.8d-56) then
        tmp = z + x
    else if (t <= 10500.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 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -1.85e+62) {
		tmp = t_2;
	} else if (t <= -3.8e+38) {
		tmp = z * (1.0 - y);
	} else if (t <= -2.75e-14) {
		tmp = t_1;
	} else if (t <= -3.3e-183) {
		tmp = a + x;
	} else if (t <= 4e-161) {
		tmp = a + (b * y);
	} else if (t <= 6.8e-56) {
		tmp = z + x;
	} else if (t <= 10500.0) {
		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 <= -1.85e+62:
		tmp = t_2
	elif t <= -3.8e+38:
		tmp = z * (1.0 - y)
	elif t <= -2.75e-14:
		tmp = t_1
	elif t <= -3.3e-183:
		tmp = a + x
	elif t <= 4e-161:
		tmp = a + (b * y)
	elif t <= 6.8e-56:
		tmp = z + x
	elif t <= 10500.0:
		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 <= -1.85e+62)
		tmp = t_2;
	elseif (t <= -3.8e+38)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (t <= -2.75e-14)
		tmp = t_1;
	elseif (t <= -3.3e-183)
		tmp = Float64(a + x);
	elseif (t <= 4e-161)
		tmp = Float64(a + Float64(b * y));
	elseif (t <= 6.8e-56)
		tmp = Float64(z + x);
	elseif (t <= 10500.0)
		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 <= -1.85e+62)
		tmp = t_2;
	elseif (t <= -3.8e+38)
		tmp = z * (1.0 - y);
	elseif (t <= -2.75e-14)
		tmp = t_1;
	elseif (t <= -3.3e-183)
		tmp = a + x;
	elseif (t <= 4e-161)
		tmp = a + (b * y);
	elseif (t <= 6.8e-56)
		tmp = z + x;
	elseif (t <= 10500.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[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.85e+62], t$95$2, If[LessEqual[t, -3.8e+38], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.75e-14], t$95$1, If[LessEqual[t, -3.3e-183], N[(a + x), $MachinePrecision], If[LessEqual[t, 4e-161], N[(a + N[(b * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e-56], N[(z + x), $MachinePrecision], If[LessEqual[t, 10500.0], 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 -1.85 \cdot 10^{+62}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -3.8 \cdot 10^{+38}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;t \leq -2.75 \cdot 10^{-14}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -3.3 \cdot 10^{-183}:\\
\;\;\;\;a + x\\

\mathbf{elif}\;t \leq 4 \cdot 10^{-161}:\\
\;\;\;\;a + b \cdot y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.85000000000000007e62 or 10500 < t

    1. Initial program 95.4%

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

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

    if -1.85000000000000007e62 < t < -3.7999999999999998e38

    1. Initial program 100.0%

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

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

    if -3.7999999999999998e38 < t < -2.74999999999999996e-14 or 6.79999999999999964e-56 < t < 10500

    1. Initial program 95.7%

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

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

    if -2.74999999999999996e-14 < t < -3.3e-183

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg77.7%

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

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

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

    if -3.3e-183 < t < 4.00000000000000011e-161

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000011e-161 < t < 6.79999999999999964e-56

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    5. Step-by-step derivation
      1. sub-neg60.4%

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

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg60.4%

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative60.4%

        \[\leadsto \color{blue}{z + x} \]
    6. Simplified60.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{+38}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-14}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-183}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-161}:\\ \;\;\;\;a + b \cdot y\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-56}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 10500:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 11: 59.3% accurate, 1.1× 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)\\ \mathbf{if}\;b \leq -1.16 \cdot 10^{+110}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-170}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 6 \cdot 10^{-77}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 10^{+16}:\\ \;\;\;\;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 (* b (- (+ t y) 2.0))))
   (if (<= b -1.16e+110)
     t_2
     (if (<= b 3.7e-225)
       t_1
       (if (<= b 5.8e-170)
         (- a (* t a))
         (if (<= b 1.05e-129)
           t_1
           (if (<= b 6e-77) (- x (* t a)) (if (<= b 1e+16) 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 = b * ((t + y) - 2.0);
	double tmp;
	if (b <= -1.16e+110) {
		tmp = t_2;
	} else if (b <= 3.7e-225) {
		tmp = t_1;
	} else if (b <= 5.8e-170) {
		tmp = a - (t * a);
	} else if (b <= 1.05e-129) {
		tmp = t_1;
	} else if (b <= 6e-77) {
		tmp = x - (t * a);
	} else if (b <= 1e+16) {
		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 = b * ((t + y) - 2.0d0)
    if (b <= (-1.16d+110)) then
        tmp = t_2
    else if (b <= 3.7d-225) then
        tmp = t_1
    else if (b <= 5.8d-170) then
        tmp = a - (t * a)
    else if (b <= 1.05d-129) then
        tmp = t_1
    else if (b <= 6d-77) then
        tmp = x - (t * a)
    else if (b <= 1d+16) 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 = b * ((t + y) - 2.0);
	double tmp;
	if (b <= -1.16e+110) {
		tmp = t_2;
	} else if (b <= 3.7e-225) {
		tmp = t_1;
	} else if (b <= 5.8e-170) {
		tmp = a - (t * a);
	} else if (b <= 1.05e-129) {
		tmp = t_1;
	} else if (b <= 6e-77) {
		tmp = x - (t * a);
	} else if (b <= 1e+16) {
		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 = b * ((t + y) - 2.0)
	tmp = 0
	if b <= -1.16e+110:
		tmp = t_2
	elif b <= 3.7e-225:
		tmp = t_1
	elif b <= 5.8e-170:
		tmp = a - (t * a)
	elif b <= 1.05e-129:
		tmp = t_1
	elif b <= 6e-77:
		tmp = x - (t * a)
	elif b <= 1e+16:
		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(b * Float64(Float64(t + y) - 2.0))
	tmp = 0.0
	if (b <= -1.16e+110)
		tmp = t_2;
	elseif (b <= 3.7e-225)
		tmp = t_1;
	elseif (b <= 5.8e-170)
		tmp = Float64(a - Float64(t * a));
	elseif (b <= 1.05e-129)
		tmp = t_1;
	elseif (b <= 6e-77)
		tmp = Float64(x - Float64(t * a));
	elseif (b <= 1e+16)
		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 = b * ((t + y) - 2.0);
	tmp = 0.0;
	if (b <= -1.16e+110)
		tmp = t_2;
	elseif (b <= 3.7e-225)
		tmp = t_1;
	elseif (b <= 5.8e-170)
		tmp = a - (t * a);
	elseif (b <= 1.05e-129)
		tmp = t_1;
	elseif (b <= 6e-77)
		tmp = x - (t * a);
	elseif (b <= 1e+16)
		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[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.16e+110], t$95$2, If[LessEqual[b, 3.7e-225], t$95$1, If[LessEqual[b, 5.8e-170], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.05e-129], t$95$1, If[LessEqual[b, 6e-77], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e+16], t$95$1, t$95$2]]]]]]]]
\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)\\
\mathbf{if}\;b \leq -1.16 \cdot 10^{+110}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 3.7 \cdot 10^{-225}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 5.8 \cdot 10^{-170}:\\
\;\;\;\;a - t \cdot a\\

\mathbf{elif}\;b \leq 1.05 \cdot 10^{-129}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 6 \cdot 10^{-77}:\\
\;\;\;\;x - t \cdot a\\

\mathbf{elif}\;b \leq 10^{+16}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.16e110 or 1e16 < b

    1. Initial program 93.8%

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

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

    if -1.16e110 < b < 3.69999999999999988e-225 or 5.8000000000000001e-170 < b < 1.05e-129 or 6.00000000000000033e-77 < b < 1e16

    1. Initial program 100.0%

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

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

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

    if 3.69999999999999988e-225 < b < 5.8000000000000001e-170

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a - a \cdot t} \]
    7. Simplified68.1%

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

    if 1.05e-129 < b < 6.00000000000000033e-77

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.16 \cdot 10^{+110}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-225}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-170}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{-129}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 6 \cdot 10^{-77}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 10^{+16}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 12: 74.2% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq 2.4 \cdot 10^{+24}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.35 \cdot 10^{+133}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.1499999999999999e89 or 1.3500000000000001e133 < b

    1. Initial program 92.3%

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

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

    if -1.1499999999999999e89 < b < 2.4000000000000001e24 or 4.0000000000000001e115 < b < 1.3500000000000001e133

    1. Initial program 100.0%

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

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

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

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

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

    if 2.4000000000000001e24 < b < 4.0000000000000001e115

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{+89}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+24}:\\ \;\;\;\;x - \left(a \cdot \left(t + -1\right) + y \cdot z\right)\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+115}:\\ \;\;\;\;\left(x + b \cdot \left(y - 2\right)\right) + t \cdot b\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+133}:\\ \;\;\;\;x - \left(a \cdot \left(t + -1\right) + y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 13: 86.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{+30} \lor \neg \left(b \leq 3.5 \cdot 10^{+15}\right):\\
\;\;\;\;t \cdot \left(b - a\right) + \left(a + \left(x + b \cdot \left(y - 2\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.49999999999999995e30 or 3.5e15 < b

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999995e30 < b < 3.5e15

    1. Initial program 100.0%

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

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

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

Alternative 14: 86.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -4.7 \cdot 10^{+30}:\\ \;\;\;\;t \cdot \left(b - a\right) + \left(a + \left(x + b \cdot \left(y - 2\right)\right)\right)\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{+15}:\\ \;\;\;\;x + \left(t_1 + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))))
   (if (<= b -4.7e+30)
     (+ (* t (- b a)) (+ a (+ x (* b (- y 2.0)))))
     (if (<= b 1.8e+15)
       (+ x (+ t_1 (* z (- 1.0 y))))
       (+ (+ x (* b (- (+ t y) 2.0))) 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 (b <= -4.7e+30) {
		tmp = (t * (b - a)) + (a + (x + (b * (y - 2.0))));
	} else if (b <= 1.8e+15) {
		tmp = x + (t_1 + (z * (1.0 - y)));
	} else {
		tmp = (x + (b * ((t + y) - 2.0))) + 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 (b <= (-4.7d+30)) then
        tmp = (t * (b - a)) + (a + (x + (b * (y - 2.0d0))))
    else if (b <= 1.8d+15) then
        tmp = x + (t_1 + (z * (1.0d0 - y)))
    else
        tmp = (x + (b * ((t + y) - 2.0d0))) + 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 (b <= -4.7e+30) {
		tmp = (t * (b - a)) + (a + (x + (b * (y - 2.0))));
	} else if (b <= 1.8e+15) {
		tmp = x + (t_1 + (z * (1.0 - y)));
	} else {
		tmp = (x + (b * ((t + y) - 2.0))) + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	tmp = 0
	if b <= -4.7e+30:
		tmp = (t * (b - a)) + (a + (x + (b * (y - 2.0))))
	elif b <= 1.8e+15:
		tmp = x + (t_1 + (z * (1.0 - y)))
	else:
		tmp = (x + (b * ((t + y) - 2.0))) + t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (b <= -4.7e+30)
		tmp = Float64(Float64(t * Float64(b - a)) + Float64(a + Float64(x + Float64(b * Float64(y - 2.0)))));
	elseif (b <= 1.8e+15)
		tmp = Float64(x + Float64(t_1 + Float64(z * Float64(1.0 - y))));
	else
		tmp = Float64(Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))) + 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 (b <= -4.7e+30)
		tmp = (t * (b - a)) + (a + (x + (b * (y - 2.0))));
	elseif (b <= 1.8e+15)
		tmp = x + (t_1 + (z * (1.0 - y)));
	else
		tmp = (x + (b * ((t + y) - 2.0))) + 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[b, -4.7e+30], N[(N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision] + N[(a + N[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.8e+15], N[(x + N[(t$95$1 + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 1.8 \cdot 10^{+15}:\\
\;\;\;\;x + \left(t_1 + z \cdot \left(1 - y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.6999999999999999e30

    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. Taylor expanded in t around 0 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.6999999999999999e30 < b < 1.8e15

    1. Initial program 100.0%

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

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

    if 1.8e15 < b

    1. Initial program 96.3%

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

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

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

Alternative 15: 42.7% accurate, 1.2× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.85 \cdot 10^{-103}:\\
\;\;\;\;t \cdot \left(b - a\right)\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+30}:\\
\;\;\;\;b \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.3999999999999999e81 or 3.19999999999999973e30 < z

    1. Initial program 96.8%

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

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

    if -2.3999999999999999e81 < z < -4.3999999999999998e-84

    1. Initial program 100.0%

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

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

    if -4.3999999999999998e-84 < z < 2.5000000000000002e-291 or 1.85e-103 < z < 4.49999999999999993e-8

    1. Initial program 100.0%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+57.5%

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

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

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

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(-\color{blue}{-1 \cdot z}\right) + a\right)\right)\right) \]
      9. remove-double-neg57.5%

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \left(-\color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      11. distribute-neg-in57.5%

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in57.5%

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

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg57.5%

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg57.5%

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

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

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

    if 2.5000000000000002e-291 < z < 1.85e-103

    1. Initial program 92.6%

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

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

    if 4.49999999999999993e-8 < z < 3.19999999999999973e30

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+81}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-84}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-291}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-103}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-8}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+30}:\\ \;\;\;\;b \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \end{array} \]

Alternative 16: 60.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{if}\;b \leq -1600000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-135}:\\ \;\;\;\;x + \left(a - y \cdot z\right)\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-76}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{-52}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{elif}\;b \leq 52000000000000:\\ \;\;\;\;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 (* b (- (+ t y) 2.0))))
   (if (<= b -1600000.0)
     t_1
     (if (<= b 5.8e-135)
       (+ x (- a (* y z)))
       (if (<= b 7.5e-76)
         (- x (* t a))
         (if (<= b 7.2e-52)
           (+ a (+ z x))
           (if (<= b 52000000000000.0) (+ x (* z (- 1.0 y))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * ((t + y) - 2.0);
	double tmp;
	if (b <= -1600000.0) {
		tmp = t_1;
	} else if (b <= 5.8e-135) {
		tmp = x + (a - (y * z));
	} else if (b <= 7.5e-76) {
		tmp = x - (t * a);
	} else if (b <= 7.2e-52) {
		tmp = a + (z + x);
	} else if (b <= 52000000000000.0) {
		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 = b * ((t + y) - 2.0d0)
    if (b <= (-1600000.0d0)) then
        tmp = t_1
    else if (b <= 5.8d-135) then
        tmp = x + (a - (y * z))
    else if (b <= 7.5d-76) then
        tmp = x - (t * a)
    else if (b <= 7.2d-52) then
        tmp = a + (z + x)
    else if (b <= 52000000000000.0d0) 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 = b * ((t + y) - 2.0);
	double tmp;
	if (b <= -1600000.0) {
		tmp = t_1;
	} else if (b <= 5.8e-135) {
		tmp = x + (a - (y * z));
	} else if (b <= 7.5e-76) {
		tmp = x - (t * a);
	} else if (b <= 7.2e-52) {
		tmp = a + (z + x);
	} else if (b <= 52000000000000.0) {
		tmp = x + (z * (1.0 - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * ((t + y) - 2.0)
	tmp = 0
	if b <= -1600000.0:
		tmp = t_1
	elif b <= 5.8e-135:
		tmp = x + (a - (y * z))
	elif b <= 7.5e-76:
		tmp = x - (t * a)
	elif b <= 7.2e-52:
		tmp = a + (z + x)
	elif b <= 52000000000000.0:
		tmp = x + (z * (1.0 - y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(Float64(t + y) - 2.0))
	tmp = 0.0
	if (b <= -1600000.0)
		tmp = t_1;
	elseif (b <= 5.8e-135)
		tmp = Float64(x + Float64(a - Float64(y * z)));
	elseif (b <= 7.5e-76)
		tmp = Float64(x - Float64(t * a));
	elseif (b <= 7.2e-52)
		tmp = Float64(a + Float64(z + x));
	elseif (b <= 52000000000000.0)
		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 = b * ((t + y) - 2.0);
	tmp = 0.0;
	if (b <= -1600000.0)
		tmp = t_1;
	elseif (b <= 5.8e-135)
		tmp = x + (a - (y * z));
	elseif (b <= 7.5e-76)
		tmp = x - (t * a);
	elseif (b <= 7.2e-52)
		tmp = a + (z + x);
	elseif (b <= 52000000000000.0)
		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[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1600000.0], t$95$1, If[LessEqual[b, 5.8e-135], N[(x + N[(a - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e-76], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e-52], N[(a + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 52000000000000.0], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq 7.5 \cdot 10^{-76}:\\
\;\;\;\;x - t \cdot a\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.6e6 or 5.2e13 < b

    1. Initial program 94.8%

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

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

    if -1.6e6 < b < 5.8000000000000004e-135

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if 5.8000000000000004e-135 < b < 7.4999999999999997e-76

    1. Initial program 100.0%

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

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

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

    if 7.4999999999999997e-76 < b < 7.19999999999999976e-52

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.19999999999999976e-52 < b < 5.2e13

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1600000:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-135}:\\ \;\;\;\;x + \left(a - y \cdot z\right)\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-76}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{-52}:\\ \;\;\;\;a + \left(z + x\right)\\ \mathbf{elif}\;b \leq 52000000000000:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 17: 67.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq 2 \cdot 10^{-126}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.25 \cdot 10^{-76}:\\
\;\;\;\;x - t \cdot a\\

\mathbf{elif}\;b \leq 1.35 \cdot 10^{+133}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -7.2e109 or 1.3500000000000001e133 < b

    1. Initial program 91.8%

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

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

    if -7.2e109 < b < 1.9999999999999999e-126 or 1.2499999999999999e-76 < b < 1.3500000000000001e133

    1. Initial program 100.0%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg69.7%

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

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

    if 1.9999999999999999e-126 < b < 1.2499999999999999e-76

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.2 \cdot 10^{+109}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq 2 \cdot 10^{-126}:\\ \;\;\;\;x + \left(\left(a + z\right) - y \cdot z\right)\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-76}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+133}:\\ \;\;\;\;x + \left(\left(a + z\right) - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 18: 81.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{+110} \lor \neg \left(b \leq 1.6 \cdot 10^{+133}\right):\\
\;\;\;\;b \cdot \left(\left(t + y\right) - 2\right) - t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.55000000000000009e110 or 1.59999999999999999e133 < b

    1. Initial program 91.8%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. associate-*r*84.1%

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

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

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

    if -1.55000000000000009e110 < b < 1.59999999999999999e133

    1. Initial program 100.0%

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

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

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

Alternative 19: 66.1% accurate, 1.4× speedup?

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

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

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

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

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


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

    1. Initial program 94.9%

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

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

    if -1.05000000000000001e102 < t < -5.00000000000000024e25

    1. Initial program 99.9%

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

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

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

    if -5.00000000000000024e25 < t < 10500

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 41.0% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-204}:\\
\;\;\;\;z + x\\

\mathbf{elif}\;a \leq 5.3 \cdot 10^{-108}:\\
\;\;\;\;b \cdot y\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{+107}:\\
\;\;\;\;z + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.29999999999999998e64 or 5.59999999999999969e107 < a

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

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

    if -1.29999999999999998e64 < a < 8.2000000000000002e-204 or 5.29999999999999989e-108 < a < 5.59999999999999969e107

    1. Initial program 99.2%

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

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

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

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

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

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg37.7%

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative37.7%

        \[\leadsto \color{blue}{z + x} \]
    6. Simplified37.7%

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

    if 8.2000000000000002e-204 < a < 5.29999999999999989e-108

    1. Initial program 93.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{+64}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-204}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{-108}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+107}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 21: 47.9% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -0.00045:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 7 \cdot 10^{-172}:\\
\;\;\;\;a + x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.4999999999999999e-4 or 4.49999999999999982e49 < t

    1. Initial program 95.8%

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

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

    if -4.4999999999999999e-4 < t < 7.00000000000000057e-172

    1. Initial program 100.0%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+72.5%

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

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

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

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(-\color{blue}{-1 \cdot z}\right) + a\right)\right)\right) \]
      9. remove-double-neg72.5%

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \left(-\color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      11. distribute-neg-in72.5%

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in72.5%

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

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg72.5%

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg72.5%

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

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

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

    if 7.00000000000000057e-172 < t < 7.6000000000000005e-54

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    5. Step-by-step derivation
      1. sub-neg54.8%

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

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg54.8%

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

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

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

    if 7.6000000000000005e-54 < t < 4.49999999999999982e49

    1. Initial program 94.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.00045:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-172}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-54}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+49}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 22: 35.5% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(-a\right)\\
\mathbf{if}\;t \leq -215000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 8.2 \cdot 10^{-172}:\\
\;\;\;\;a + x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.15e11 or 1.35e-10 < t

    1. Initial program 96.0%

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

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

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

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

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

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

    if -2.15e11 < t < 8.2e-172

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+71.8%

        \[\leadsto x - \color{blue}{\left(y \cdot z + \left(-1 \cdot z + -1 \cdot a\right)\right)} \]
      5. distribute-lft-out71.8%

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

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

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(-\color{blue}{-1 \cdot z}\right) + a\right)\right)\right) \]
      9. remove-double-neg71.8%

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

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

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

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

        \[\leadsto x - \left(\color{blue}{z \cdot y} - \left(-\left(-1 \cdot z + -1 \cdot a\right)\right)\right) \]
      14. +-commutative71.8%

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in71.8%

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

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg71.8%

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg71.8%

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

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

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

    if 8.2e-172 < t < 2.79999999999999993e-56

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    5. Step-by-step derivation
      1. sub-neg54.8%

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

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg54.8%

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

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

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

    if 2.79999999999999993e-56 < t < 1.35e-10

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -215000000000:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-172}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-56}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-10}:\\ \;\;\;\;b \cdot y\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \end{array} \]

Alternative 23: 36.7% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;y \leq -3 \cdot 10^{-93}:\\
\;\;\;\;a + x\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-92}:\\
\;\;\;\;z + x\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+21}:\\
\;\;\;\;a + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.19999999999999979e94

    1. Initial program 97.8%

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

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

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

    if -4.19999999999999979e94 < y < -3.0000000000000001e-93 or 2.69999999999999995e-92 < y < 2.4e21

    1. Initial program 98.4%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+58.4%

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

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

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

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(-\color{blue}{-1 \cdot z}\right) + a\right)\right)\right) \]
      9. remove-double-neg58.4%

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \left(-\color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      11. distribute-neg-in58.4%

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in58.4%

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

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg58.4%

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg58.4%

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

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

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

    if -3.0000000000000001e-93 < y < 2.69999999999999995e-92

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    5. Step-by-step derivation
      1. sub-neg43.4%

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

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg43.4%

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative43.4%

        \[\leadsto \color{blue}{z + x} \]
    6. Simplified43.4%

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

    if 2.4e21 < y

    1. Initial program 96.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+94}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-93}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-92}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+21}:\\ \;\;\;\;a + x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \end{array} \]

Alternative 24: 36.3% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;y \leq -7.2 \cdot 10^{-93}:\\
\;\;\;\;a + x\\

\mathbf{elif}\;y \leq 2.65 \cdot 10^{-92}:\\
\;\;\;\;z + x\\

\mathbf{elif}\;y \leq 8.1 \cdot 10^{+108}:\\
\;\;\;\;a + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.0000000000000002e94 or 8.1e108 < y

    1. Initial program 97.8%

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

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

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

    if -8.0000000000000002e94 < y < -7.2000000000000003e-93 or 2.65000000000000015e-92 < y < 8.1e108

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+58.4%

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

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

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

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(-\color{blue}{-1 \cdot z}\right) + a\right)\right)\right) \]
      9. remove-double-neg58.4%

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \left(-\color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      11. distribute-neg-in58.4%

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in58.4%

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

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg58.4%

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg58.4%

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

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

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

    if -7.2000000000000003e-93 < y < 2.65000000000000015e-92

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    5. Step-by-step derivation
      1. sub-neg43.4%

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

        \[\leadsto x + \left(-\color{blue}{\left(-z\right)}\right) \]
      3. remove-double-neg43.4%

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative43.4%

        \[\leadsto \color{blue}{z + x} \]
    6. Simplified43.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+94}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-93}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{-92}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq 8.1 \cdot 10^{+108}:\\ \;\;\;\;a + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot y\\ \end{array} \]

Alternative 25: 20.8% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;x \leq -3.9 \cdot 10^{-212}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 5.2 \cdot 10^{-25}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.50000000000000007e85 or 5.2e-25 < x

    1. Initial program 97.3%

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

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

    if -4.50000000000000007e85 < x < -3.9e-212

    1. Initial program 100.0%

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

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

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

    if -3.9e-212 < x < 5.2e-25

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg48.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{+85}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.9 \cdot 10^{-212}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-25}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 26: 25.6% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.8 \cdot 10^{-65}:\\
\;\;\;\;b \cdot y\\

\mathbf{elif}\;b \leq 9 \cdot 10^{+20}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -9.79999999999999929e-65 or 9e20 < b

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

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

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

    if -9.79999999999999929e-65 < b < 9e20

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.8 \cdot 10^{-65}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;b \leq 9 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot y\\ \end{array} \]

Alternative 27: 34.0% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;y \leq 4.7 \cdot 10^{+109}:\\
\;\;\;\;a + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4600000000000001e96 or 4.69999999999999998e109 < y

    1. Initial program 97.8%

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

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

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

    if -1.4600000000000001e96 < y < 4.69999999999999998e109

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+55.5%

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

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

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

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(-\color{blue}{-1 \cdot z}\right) + a\right)\right)\right) \]
      9. remove-double-neg55.5%

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \left(-\color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      11. distribute-neg-in55.5%

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in55.5%

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

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg55.5%

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg55.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.46 \cdot 10^{+96}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{+109}:\\ \;\;\;\;a + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot y\\ \end{array} \]

Alternative 28: 20.8% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 7 \cdot 10^{-25}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.3500000000000001e136 or 7.0000000000000004e-25 < x

    1. Initial program 99.0%

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

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

    if -1.3500000000000001e136 < x < 7.0000000000000004e-25

    1. Initial program 96.7%

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
      4. associate-+l+48.5%

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

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

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

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(-\color{blue}{-1 \cdot z}\right) + a\right)\right)\right) \]
      9. remove-double-neg48.5%

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

        \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \left(-\color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      11. distribute-neg-in48.5%

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

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

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

        \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
      15. distribute-neg-in48.5%

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

        \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
      17. remove-double-neg48.5%

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

        \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
      19. remove-double-neg48.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{+136}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-25}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 29: 11.3% 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 97.6%

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

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

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

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

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

      \[\leadsto x - \left(\color{blue}{\left(y \cdot z + -1 \cdot z\right)} + -1 \cdot a\right) \]
    4. associate-+l+53.2%

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

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

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

      \[\leadsto x - \left(y \cdot z + \left(-\left(\color{blue}{\left(-\left(-z\right)\right)} + a\right)\right)\right) \]
    8. mul-1-neg53.2%

      \[\leadsto x - \left(y \cdot z + \left(-\left(\left(-\color{blue}{-1 \cdot z}\right) + a\right)\right)\right) \]
    9. remove-double-neg53.2%

      \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \color{blue}{\left(-\left(-a\right)\right)}\right)\right)\right) \]
    10. mul-1-neg53.2%

      \[\leadsto x - \left(y \cdot z + \left(-\left(\left(--1 \cdot z\right) + \left(-\color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
    11. distribute-neg-in53.2%

      \[\leadsto x - \left(y \cdot z + \left(-\color{blue}{\left(-\left(-1 \cdot z + -1 \cdot a\right)\right)}\right)\right) \]
    12. unsub-neg53.2%

      \[\leadsto x - \color{blue}{\left(y \cdot z - \left(-\left(-1 \cdot z + -1 \cdot a\right)\right)\right)} \]
    13. *-commutative53.2%

      \[\leadsto x - \left(\color{blue}{z \cdot y} - \left(-\left(-1 \cdot z + -1 \cdot a\right)\right)\right) \]
    14. +-commutative53.2%

      \[\leadsto x - \left(z \cdot y - \left(-\color{blue}{\left(-1 \cdot a + -1 \cdot z\right)}\right)\right) \]
    15. distribute-neg-in53.2%

      \[\leadsto x - \left(z \cdot y - \color{blue}{\left(\left(--1 \cdot a\right) + \left(--1 \cdot z\right)\right)}\right) \]
    16. mul-1-neg53.2%

      \[\leadsto x - \left(z \cdot y - \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(--1 \cdot z\right)\right)\right) \]
    17. remove-double-neg53.2%

      \[\leadsto x - \left(z \cdot y - \left(\color{blue}{a} + \left(--1 \cdot z\right)\right)\right) \]
    18. mul-1-neg53.2%

      \[\leadsto x - \left(z \cdot y - \left(a + \left(-\color{blue}{\left(-z\right)}\right)\right)\right) \]
    19. remove-double-neg53.2%

      \[\leadsto x - \left(z \cdot y - \left(a + \color{blue}{z}\right)\right) \]
  5. Simplified53.2%

    \[\leadsto x - \color{blue}{\left(z \cdot y - \left(a + z\right)\right)} \]
  6. Taylor expanded in a around inf 12.7%

    \[\leadsto \color{blue}{a} \]
  7. Final simplification12.7%

    \[\leadsto a \]

Reproduce

?
herbie shell --seed 2023268 
(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)))