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

Percentage Accurate: 94.9% → 97.9%
Time: 18.2s
Alternatives: 28
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 28 alternatives:

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

Initial Program: 94.9% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

    1. Initial program 0.0%

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

      \[\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(1 - t\right)\right) + b \cdot \left(\left(t + y\right) - 2\right) \leq \infty:\\ \;\;\;\;\left(x + \left(a \cdot \left(1 - t\right) - b \cdot \left(2 - \left(t + y\right)\right)\right)\right) + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 2: 97.3% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + 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 86.7%

      \[\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(1 - t\right)\right) + b \cdot \left(\left(t + y\right) - 2\right) \leq \infty:\\ \;\;\;\;\left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 4: 57.8% accurate, 0.9× speedup?

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

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

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

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

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

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

\mathbf{elif}\;b \leq 2.3 \cdot 10^{-200}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 3.4 \cdot 10^{-154}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;b \leq 3.4 \cdot 10^{+89}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if b < -6.8000000000000002e91 or 3.4000000000000002e89 < b

    1. Initial program 93.1%

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

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

    if -6.8000000000000002e91 < b < -104000

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

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

    if -104000 < b < -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 z around 0 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999993e-8 < b < -1.15e-169

    1. Initial program 97.7%

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

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

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

    if -1.15e-169 < b < -4.49999999999999996e-238

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(0 - \color{blue}{\left(-1 \cdot z - a\right)}\right) \]
      6. associate-+l-65.0%

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

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

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

        \[\leadsto x + \left(\color{blue}{z} + a\right) \]
      10. +-commutative65.0%

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

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

    if -4.49999999999999996e-238 < b < 2.30000000000000007e-200 or 3.3999999999999998e-154 < b < 3.4000000000000002e89

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

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

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

    if 2.30000000000000007e-200 < b < 3.3999999999999998e-154

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{+91}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -104000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-8}:\\ \;\;\;\;a - b \cdot \left(2 - y\right)\\ \mathbf{elif}\;b \leq -1.15 \cdot 10^{-169}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-238}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-200}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{-154}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{+89}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 5: 55.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z + a\right)\\ t_2 := b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{if}\;b \leq -2.8 \cdot 10^{+93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -4600000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-7}:\\ \;\;\;\;a - b \cdot \left(2 - y\right)\\ \mathbf{elif}\;b \leq -1.8 \cdot 10^{-169}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-219}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 8.8 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (+ z a))) (t_2 (* b (- (+ t y) 2.0))))
   (if (<= b -2.8e+93)
     t_2
     (if (<= b -4600000.0)
       (* y (- b z))
       (if (<= b -4.5e-7)
         (- a (* b (- 2.0 y)))
         (if (<= b -1.8e-169)
           (- x (* y z))
           (if (<= b -1e-264)
             t_1
             (if (<= b 9e-219)
               (- x (* t a))
               (if (<= b 8.8e+52) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (z + a);
	double t_2 = b * ((t + y) - 2.0);
	double tmp;
	if (b <= -2.8e+93) {
		tmp = t_2;
	} else if (b <= -4600000.0) {
		tmp = y * (b - z);
	} else if (b <= -4.5e-7) {
		tmp = a - (b * (2.0 - y));
	} else if (b <= -1.8e-169) {
		tmp = x - (y * z);
	} else if (b <= -1e-264) {
		tmp = t_1;
	} else if (b <= 9e-219) {
		tmp = x - (t * a);
	} else if (b <= 8.8e+52) {
		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 + a)
    t_2 = b * ((t + y) - 2.0d0)
    if (b <= (-2.8d+93)) then
        tmp = t_2
    else if (b <= (-4600000.0d0)) then
        tmp = y * (b - z)
    else if (b <= (-4.5d-7)) then
        tmp = a - (b * (2.0d0 - y))
    else if (b <= (-1.8d-169)) then
        tmp = x - (y * z)
    else if (b <= (-1d-264)) then
        tmp = t_1
    else if (b <= 9d-219) then
        tmp = x - (t * a)
    else if (b <= 8.8d+52) 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 + a);
	double t_2 = b * ((t + y) - 2.0);
	double tmp;
	if (b <= -2.8e+93) {
		tmp = t_2;
	} else if (b <= -4600000.0) {
		tmp = y * (b - z);
	} else if (b <= -4.5e-7) {
		tmp = a - (b * (2.0 - y));
	} else if (b <= -1.8e-169) {
		tmp = x - (y * z);
	} else if (b <= -1e-264) {
		tmp = t_1;
	} else if (b <= 9e-219) {
		tmp = x - (t * a);
	} else if (b <= 8.8e+52) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (z + a)
	t_2 = b * ((t + y) - 2.0)
	tmp = 0
	if b <= -2.8e+93:
		tmp = t_2
	elif b <= -4600000.0:
		tmp = y * (b - z)
	elif b <= -4.5e-7:
		tmp = a - (b * (2.0 - y))
	elif b <= -1.8e-169:
		tmp = x - (y * z)
	elif b <= -1e-264:
		tmp = t_1
	elif b <= 9e-219:
		tmp = x - (t * a)
	elif b <= 8.8e+52:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(z + a))
	t_2 = Float64(b * Float64(Float64(t + y) - 2.0))
	tmp = 0.0
	if (b <= -2.8e+93)
		tmp = t_2;
	elseif (b <= -4600000.0)
		tmp = Float64(y * Float64(b - z));
	elseif (b <= -4.5e-7)
		tmp = Float64(a - Float64(b * Float64(2.0 - y)));
	elseif (b <= -1.8e-169)
		tmp = Float64(x - Float64(y * z));
	elseif (b <= -1e-264)
		tmp = t_1;
	elseif (b <= 9e-219)
		tmp = Float64(x - Float64(t * a));
	elseif (b <= 8.8e+52)
		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 + a);
	t_2 = b * ((t + y) - 2.0);
	tmp = 0.0;
	if (b <= -2.8e+93)
		tmp = t_2;
	elseif (b <= -4600000.0)
		tmp = y * (b - z);
	elseif (b <= -4.5e-7)
		tmp = a - (b * (2.0 - y));
	elseif (b <= -1.8e-169)
		tmp = x - (y * z);
	elseif (b <= -1e-264)
		tmp = t_1;
	elseif (b <= 9e-219)
		tmp = x - (t * a);
	elseif (b <= 8.8e+52)
		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 + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.8e+93], t$95$2, If[LessEqual[b, -4600000.0], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.5e-7], N[(a - N[(b * N[(2.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.8e-169], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1e-264], t$95$1, If[LessEqual[b, 9e-219], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.8e+52], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq -4.5 \cdot 10^{-7}:\\
\;\;\;\;a - b \cdot \left(2 - y\right)\\

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

\mathbf{elif}\;b \leq -1 \cdot 10^{-264}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 8.8 \cdot 10^{+52}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if b < -2.79999999999999989e93 or 8.7999999999999999e52 < b

    1. Initial program 93.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 inf 85.7%

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

    if -2.79999999999999989e93 < b < -4.6e6

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

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

    if -4.6e6 < b < -4.4999999999999998e-7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4999999999999998e-7 < b < -1.80000000000000001e-169

    1. Initial program 97.7%

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

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

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

    if -1.80000000000000001e-169 < b < -1e-264 or 9.00000000000000029e-219 < b < 8.7999999999999999e52

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(0 - \color{blue}{\left(-1 \cdot z - a\right)}\right) \]
      6. associate-+l-54.2%

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

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

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

        \[\leadsto x + \left(\color{blue}{z} + a\right) \]
      10. +-commutative54.2%

        \[\leadsto x + \color{blue}{\left(a + z\right)} \]
    6. Simplified54.2%

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

    if -1e-264 < b < 9.00000000000000029e-219

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+93}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -4600000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-7}:\\ \;\;\;\;a - b \cdot \left(2 - y\right)\\ \mathbf{elif}\;b \leq -1.8 \cdot 10^{-169}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-264}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-219}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 8.8 \cdot 10^{+52}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 6: 39.7% accurate, 1.1× speedup?

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

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

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

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

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

\mathbf{elif}\;b \leq 1.02 \cdot 10^{+53}:\\
\;\;\;\;x + a\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if b < -5.1999999999999998e44 or 2.8e114 < b < 1.35000000000000004e181

    1. Initial program 93.2%

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

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

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

    if -5.1999999999999998e44 < b < -4.20000000000000027e-247 or 1.8999999999999999e-218 < b < 1.4e-119

    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 b around 0 89.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z} \]
    6. Simplified41.9%

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

    if -4.20000000000000027e-247 < b < 1.8999999999999999e-218

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

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

    if 1.4e-119 < b < 1.01999999999999999e53

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot a} \]
    7. Step-by-step derivation
      1. mul-1-neg39.4%

        \[\leadsto x - \color{blue}{\left(-a\right)} \]
    8. Simplified39.4%

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

    if 1.01999999999999999e53 < b < 2.8e114

    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 inf 71.5%

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

    if 1.35000000000000004e181 < b

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+44}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;b \leq -4.2 \cdot 10^{-247}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{-218}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{-119}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{+53}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+114}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+181}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]

Alternative 7: 64.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)\\ t_3 := x - a \cdot \left(t + -1\right)\\ \mathbf{if}\;b \leq -3.2 \cdot 10^{+79}:\\ \;\;\;\;a + t_2\\ \mathbf{elif}\;b \leq -3.7 \cdot 10^{-275}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 7.4 \cdot 10^{-218}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.55 \cdot 10^{+22}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;x + 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)))
        (t_3 (- x (* a (+ t -1.0)))))
   (if (<= b -3.2e+79)
     (+ a t_2)
     (if (<= b -3.7e-275)
       t_1
       (if (<= b 7.4e-218)
         t_3
         (if (<= b 2.4e-43) t_1 (if (<= b 2.55e+22) t_3 (+ x 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 t_3 = x - (a * (t + -1.0));
	double tmp;
	if (b <= -3.2e+79) {
		tmp = a + t_2;
	} else if (b <= -3.7e-275) {
		tmp = t_1;
	} else if (b <= 7.4e-218) {
		tmp = t_3;
	} else if (b <= 2.4e-43) {
		tmp = t_1;
	} else if (b <= 2.55e+22) {
		tmp = t_3;
	} else {
		tmp = x + t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (z * (1.0d0 - y))
    t_2 = b * ((t + y) - 2.0d0)
    t_3 = x - (a * (t + (-1.0d0)))
    if (b <= (-3.2d+79)) then
        tmp = a + t_2
    else if (b <= (-3.7d-275)) then
        tmp = t_1
    else if (b <= 7.4d-218) then
        tmp = t_3
    else if (b <= 2.4d-43) then
        tmp = t_1
    else if (b <= 2.55d+22) then
        tmp = t_3
    else
        tmp = x + 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 t_3 = x - (a * (t + -1.0));
	double tmp;
	if (b <= -3.2e+79) {
		tmp = a + t_2;
	} else if (b <= -3.7e-275) {
		tmp = t_1;
	} else if (b <= 7.4e-218) {
		tmp = t_3;
	} else if (b <= 2.4e-43) {
		tmp = t_1;
	} else if (b <= 2.55e+22) {
		tmp = t_3;
	} else {
		tmp = x + 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)
	t_3 = x - (a * (t + -1.0))
	tmp = 0
	if b <= -3.2e+79:
		tmp = a + t_2
	elif b <= -3.7e-275:
		tmp = t_1
	elif b <= 7.4e-218:
		tmp = t_3
	elif b <= 2.4e-43:
		tmp = t_1
	elif b <= 2.55e+22:
		tmp = t_3
	else:
		tmp = x + 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))
	t_3 = Float64(x - Float64(a * Float64(t + -1.0)))
	tmp = 0.0
	if (b <= -3.2e+79)
		tmp = Float64(a + t_2);
	elseif (b <= -3.7e-275)
		tmp = t_1;
	elseif (b <= 7.4e-218)
		tmp = t_3;
	elseif (b <= 2.4e-43)
		tmp = t_1;
	elseif (b <= 2.55e+22)
		tmp = t_3;
	else
		tmp = Float64(x + 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);
	t_3 = x - (a * (t + -1.0));
	tmp = 0.0;
	if (b <= -3.2e+79)
		tmp = a + t_2;
	elseif (b <= -3.7e-275)
		tmp = t_1;
	elseif (b <= 7.4e-218)
		tmp = t_3;
	elseif (b <= 2.4e-43)
		tmp = t_1;
	elseif (b <= 2.55e+22)
		tmp = t_3;
	else
		tmp = x + 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]}, Block[{t$95$3 = N[(x - N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.2e+79], N[(a + t$95$2), $MachinePrecision], If[LessEqual[b, -3.7e-275], t$95$1, If[LessEqual[b, 7.4e-218], t$95$3, If[LessEqual[b, 2.4e-43], t$95$1, If[LessEqual[b, 2.55e+22], t$95$3, N[(x + t$95$2), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq 7.4 \cdot 10^{-218}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 2.4 \cdot 10^{-43}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.55 \cdot 10^{+22}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.20000000000000003e79

    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 z around 0 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000003e79 < b < -3.69999999999999971e-275 or 7.4000000000000005e-218 < b < 2.4000000000000002e-43

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

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

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

    if -3.69999999999999971e-275 < b < 7.4000000000000005e-218 or 2.4000000000000002e-43 < b < 2.5500000000000001e22

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

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

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

    if 2.5500000000000001e22 < b

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{+79}:\\ \;\;\;\;a + b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -3.7 \cdot 10^{-275}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 7.4 \cdot 10^{-218}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-43}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.55 \cdot 10^{+22}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 8: 85.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.6 \cdot 10^{+79} \lor \neg \left(b \leq 2.55 \cdot 10^{-67}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.6000000000000002e79 or 2.54999999999999991e-67 < 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 z around 0 89.6%

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

    if -5.6000000000000002e79 < b < 2.54999999999999991e-67

    1. Initial program 99.3%

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

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

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

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

Alternative 9: 37.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq -1.08 \cdot 10^{+46}:\\
\;\;\;\;y \cdot b\\

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

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

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

\mathbf{elif}\;b \leq 2.8 \cdot 10^{+54}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.75000000000000002e251 or 2.80000000000000015e54 < b

    1. Initial program 94.1%

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

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

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

    if -1.75000000000000002e251 < b < -1.07999999999999994e46

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-\left(t + \color{blue}{-1}\right) \cdot a\right) + x\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      8. distribute-lft-neg-in86.5%

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

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

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

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

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

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

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

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

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

    if -1.07999999999999994e46 < b < -5.2000000000000003e-244 or 8.3000000000000001e-218 < b < 1.54999999999999989e-119

    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 b around 0 89.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z} \]
    6. Simplified41.9%

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

    if -5.2000000000000003e-244 < b < 8.3000000000000001e-218

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

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

    if 1.54999999999999989e-119 < b < 2.80000000000000015e54

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot a} \]
    7. Step-by-step derivation
      1. mul-1-neg39.4%

        \[\leadsto x - \color{blue}{\left(-a\right)} \]
    8. Simplified39.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{+251}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq -1.08 \cdot 10^{+46}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-244}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 8.3 \cdot 10^{-218}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.55 \cdot 10^{-119}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+54}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]

Alternative 10: 61.7% accurate, 1.2× 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)\\ t_3 := x - a \cdot \left(t + -1\right)\\ \mathbf{if}\;b \leq -4 \cdot 10^{+80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2.2 \cdot 10^{-270}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{-218}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 6.4 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{+82}:\\ \;\;\;\;t_3\\ \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)))
        (t_3 (- x (* a (+ t -1.0)))))
   (if (<= b -4e+80)
     t_2
     (if (<= b -2.2e-270)
       t_1
       (if (<= b 4.6e-218)
         t_3
         (if (<= b 6.4e-46) t_1 (if (<= b 3.1e+82) t_3 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 t_3 = x - (a * (t + -1.0));
	double tmp;
	if (b <= -4e+80) {
		tmp = t_2;
	} else if (b <= -2.2e-270) {
		tmp = t_1;
	} else if (b <= 4.6e-218) {
		tmp = t_3;
	} else if (b <= 6.4e-46) {
		tmp = t_1;
	} else if (b <= 3.1e+82) {
		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 = x + (z * (1.0d0 - y))
    t_2 = b * ((t + y) - 2.0d0)
    t_3 = x - (a * (t + (-1.0d0)))
    if (b <= (-4d+80)) then
        tmp = t_2
    else if (b <= (-2.2d-270)) then
        tmp = t_1
    else if (b <= 4.6d-218) then
        tmp = t_3
    else if (b <= 6.4d-46) then
        tmp = t_1
    else if (b <= 3.1d+82) 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 = x + (z * (1.0 - y));
	double t_2 = b * ((t + y) - 2.0);
	double t_3 = x - (a * (t + -1.0));
	double tmp;
	if (b <= -4e+80) {
		tmp = t_2;
	} else if (b <= -2.2e-270) {
		tmp = t_1;
	} else if (b <= 4.6e-218) {
		tmp = t_3;
	} else if (b <= 6.4e-46) {
		tmp = t_1;
	} else if (b <= 3.1e+82) {
		tmp = t_3;
	} 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)
	t_3 = x - (a * (t + -1.0))
	tmp = 0
	if b <= -4e+80:
		tmp = t_2
	elif b <= -2.2e-270:
		tmp = t_1
	elif b <= 4.6e-218:
		tmp = t_3
	elif b <= 6.4e-46:
		tmp = t_1
	elif b <= 3.1e+82:
		tmp = t_3
	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))
	t_3 = Float64(x - Float64(a * Float64(t + -1.0)))
	tmp = 0.0
	if (b <= -4e+80)
		tmp = t_2;
	elseif (b <= -2.2e-270)
		tmp = t_1;
	elseif (b <= 4.6e-218)
		tmp = t_3;
	elseif (b <= 6.4e-46)
		tmp = t_1;
	elseif (b <= 3.1e+82)
		tmp = t_3;
	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);
	t_3 = x - (a * (t + -1.0));
	tmp = 0.0;
	if (b <= -4e+80)
		tmp = t_2;
	elseif (b <= -2.2e-270)
		tmp = t_1;
	elseif (b <= 4.6e-218)
		tmp = t_3;
	elseif (b <= 6.4e-46)
		tmp = t_1;
	elseif (b <= 3.1e+82)
		tmp = t_3;
	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]}, Block[{t$95$3 = N[(x - N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4e+80], t$95$2, If[LessEqual[b, -2.2e-270], t$95$1, If[LessEqual[b, 4.6e-218], t$95$3, If[LessEqual[b, 6.4e-46], t$95$1, If[LessEqual[b, 3.1e+82], t$95$3, 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)\\
t_3 := x - a \cdot \left(t + -1\right)\\
\mathbf{if}\;b \leq -4 \cdot 10^{+80}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq -2.2 \cdot 10^{-270}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 4.6 \cdot 10^{-218}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 6.4 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 3.1 \cdot 10^{+82}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4e80 or 3.10000000000000032e82 < 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 85.8%

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

    if -4e80 < b < -2.1999999999999998e-270 or 4.59999999999999989e-218 < b < 6.3999999999999998e-46

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

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

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

    if -2.1999999999999998e-270 < b < 4.59999999999999989e-218 or 6.3999999999999998e-46 < b < 3.10000000000000032e82

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4 \cdot 10^{+80}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -2.2 \cdot 10^{-270}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{-218}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 6.4 \cdot 10^{-46}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{+82}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 11: 63.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \left(1 - y\right)\\ t_2 := a + b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{if}\;b \leq -3.2 \cdot 10^{+79}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.15 \cdot 10^{-274}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{-218}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 10^{-44}:\\ \;\;\;\;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 (+ a (* b (- (+ t y) 2.0)))))
   (if (<= b -3.2e+79)
     t_2
     (if (<= b -1.15e-274)
       t_1
       (if (<= b 1.05e-218)
         (- x (* a (+ t -1.0)))
         (if (<= b 1e-44) 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 = a + (b * ((t + y) - 2.0));
	double tmp;
	if (b <= -3.2e+79) {
		tmp = t_2;
	} else if (b <= -1.15e-274) {
		tmp = t_1;
	} else if (b <= 1.05e-218) {
		tmp = x - (a * (t + -1.0));
	} else if (b <= 1e-44) {
		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 = a + (b * ((t + y) - 2.0d0))
    if (b <= (-3.2d+79)) then
        tmp = t_2
    else if (b <= (-1.15d-274)) then
        tmp = t_1
    else if (b <= 1.05d-218) then
        tmp = x - (a * (t + (-1.0d0)))
    else if (b <= 1d-44) 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 = a + (b * ((t + y) - 2.0));
	double tmp;
	if (b <= -3.2e+79) {
		tmp = t_2;
	} else if (b <= -1.15e-274) {
		tmp = t_1;
	} else if (b <= 1.05e-218) {
		tmp = x - (a * (t + -1.0));
	} else if (b <= 1e-44) {
		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 = a + (b * ((t + y) - 2.0))
	tmp = 0
	if b <= -3.2e+79:
		tmp = t_2
	elif b <= -1.15e-274:
		tmp = t_1
	elif b <= 1.05e-218:
		tmp = x - (a * (t + -1.0))
	elif b <= 1e-44:
		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(a + Float64(b * Float64(Float64(t + y) - 2.0)))
	tmp = 0.0
	if (b <= -3.2e+79)
		tmp = t_2;
	elseif (b <= -1.15e-274)
		tmp = t_1;
	elseif (b <= 1.05e-218)
		tmp = Float64(x - Float64(a * Float64(t + -1.0)));
	elseif (b <= 1e-44)
		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 = a + (b * ((t + y) - 2.0));
	tmp = 0.0;
	if (b <= -3.2e+79)
		tmp = t_2;
	elseif (b <= -1.15e-274)
		tmp = t_1;
	elseif (b <= 1.05e-218)
		tmp = x - (a * (t + -1.0));
	elseif (b <= 1e-44)
		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[(a + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.2e+79], t$95$2, If[LessEqual[b, -1.15e-274], t$95$1, If[LessEqual[b, 1.05e-218], N[(x - N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e-44], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -1.15 \cdot 10^{-274}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 10^{-44}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.20000000000000003e79 or 9.99999999999999953e-45 < b

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000003e79 < b < -1.14999999999999998e-274 or 1.04999999999999997e-218 < b < 9.99999999999999953e-45

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

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

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

    if -1.14999999999999998e-274 < b < 1.04999999999999997e-218

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{+79}:\\ \;\;\;\;a + b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.15 \cdot 10^{-274}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{-218}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 10^{-44}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;a + b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 12: 69.5% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq -5.2 \cdot 10^{-272}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.7 \cdot 10^{+54}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.30000000000000004e80

    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 z around 0 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000004e80 < b < -5.19999999999999983e-272 or 1.2500000000000001e-218 < b < 1.7e54

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

    if -5.19999999999999983e-272 < b < 1.2500000000000001e-218

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

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

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

    if 1.7e54 < b

    1. Initial program 92.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 0 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.3 \cdot 10^{+80}:\\ \;\;\;\;a + b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-272}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-218}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{+54}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 13: 70.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq -1 \cdot 10^{-270}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 8.6 \cdot 10^{+52}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.20000000000000003e79

    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 z around 0 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000003e79 < b < -1e-270 or 1.8999999999999999e-218 < b < 8.5999999999999999e52

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

    if -1e-270 < b < 1.8999999999999999e-218

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

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

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

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

    if 8.5999999999999999e52 < b

    1. Initial program 92.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 0 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{+79}:\\ \;\;\;\;a + b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-270}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{-218}:\\ \;\;\;\;\left(x + z\right) - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{+52}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 14: 70.9% accurate, 1.2× speedup?

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

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

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

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

\mathbf{elif}\;b \leq 4.5 \cdot 10^{+54}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -4.2000000000000002e61

    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 z around 0 91.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000002e61 < b < -1.49999999999999989e-274 or 1.09999999999999991e-217 < b < 4.49999999999999984e54

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

    if -1.49999999999999989e-274 < b < 1.09999999999999991e-217

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

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

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

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

    if 4.49999999999999984e54 < b

    1. Initial program 92.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 0 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.2 \cdot 10^{+61}:\\ \;\;\;\;a \cdot \left(1 - t\right) - b \cdot \left(2 - \left(t + y\right)\right)\\ \mathbf{elif}\;b \leq -1.5 \cdot 10^{-274}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{-217}:\\ \;\;\;\;\left(x + z\right) - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{+54}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]

Alternative 15: 83.1% accurate, 1.2× speedup?

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

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

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

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


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

    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 z around 0 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.08e80 < b < 2.95000000000000002e69

    1. Initial program 99.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 88.0%

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

    if 2.95000000000000002e69 < b

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 83.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.1 \cdot 10^{+79}:\\
\;\;\;\;a \cdot \left(1 - t\right) - b \cdot \left(2 - \left(t + y\right)\right)\\

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

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


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

    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 z around 0 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.1000000000000001e79 < b < 1.00000000000000007e70

    1. Initial program 99.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 0 99.4%

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

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

    if 1.00000000000000007e70 < b

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 39.2% accurate, 1.4× speedup?

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

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

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

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

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

\mathbf{elif}\;b \leq 2.75 \cdot 10^{+54}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -6.49999999999999975e41

    1. Initial program 93.6%

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

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

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

    if -6.49999999999999975e41 < b < -3.4999999999999999e-242 or 6.60000000000000046e-218 < b < 1.79999999999999988e-116

    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 b around 0 89.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z} \]
    6. Simplified41.9%

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

    if -3.4999999999999999e-242 < b < 6.60000000000000046e-218

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

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

    if 1.79999999999999988e-116 < b < 2.75000000000000013e54

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot a} \]
    7. Step-by-step derivation
      1. mul-1-neg39.4%

        \[\leadsto x - \color{blue}{\left(-a\right)} \]
    8. Simplified39.4%

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

    if 2.75000000000000013e54 < b

    1. Initial program 92.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 inf 90.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.5 \cdot 10^{+41}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-242}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-218}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{-116}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 2.75 \cdot 10^{+54}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]

Alternative 18: 50.4% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq -1.75 \cdot 10^{-230}:\\
\;\;\;\;x + z\\

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

\mathbf{elif}\;y \leq 7.5 \cdot 10^{-201}:\\
\;\;\;\;x + z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.3e6 or 2.40000000000000013e44 < y

    1. Initial program 95.0%

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

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

    if -1.3e6 < y < -1.74999999999999994e-230 or 3.0000000000000001e-305 < y < 7.49999999999999987e-201

    1. Initial program 98.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 71.2%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z} \]
    6. Simplified54.5%

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

    if -1.74999999999999994e-230 < y < 3.0000000000000001e-305

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

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

    if 7.49999999999999987e-201 < y < 2.40000000000000013e44

    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 inf 54.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1300000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-230}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-305}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-201}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+44}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 19: 32.9% accurate, 1.9× speedup?

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

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

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

\mathbf{elif}\;b \leq 8.8 \cdot 10^{-219}:\\
\;\;\;\;-t \cdot a\\

\mathbf{elif}\;b \leq 5.1 \cdot 10^{+92}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -5.7999999999999998e48

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-\left(t + \color{blue}{-1}\right) \cdot a\right) + x\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      8. distribute-lft-neg-in89.4%

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

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

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

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

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

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

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

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

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

    if -5.7999999999999998e48 < b < -2.49999999999999989e-269 or 8.7999999999999998e-219 < b < 5.1000000000000003e92

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

    if -2.49999999999999989e-269 < b < 8.7999999999999998e-219

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

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

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

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-rgt-neg-out54.3%

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

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

    if 5.1000000000000003e92 < b

    1. Initial program 91.7%

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

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

      \[\leadsto \color{blue}{b \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative42.3%

        \[\leadsto \color{blue}{t \cdot b} \]
    5. Simplified42.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.8 \cdot 10^{+48}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-269}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 8.8 \cdot 10^{-219}:\\ \;\;\;\;-t \cdot a\\ \mathbf{elif}\;b \leq 5.1 \cdot 10^{+92}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 20: 55.4% accurate, 1.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4e9 or 1.04999999999999997e45 < y

    1. Initial program 95.0%

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

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

    if -4e9 < y < 1.45000000000000005e-146

    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 b around 0 71.0%

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

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

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

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

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

        \[\leadsto x + \left(0 - \color{blue}{\left(-1 \cdot z + -1 \cdot a\right)}\right) \]
      4. mul-1-neg60.3%

        \[\leadsto x + \left(0 - \left(-1 \cdot z + \color{blue}{\left(-a\right)}\right)\right) \]
      5. unsub-neg60.3%

        \[\leadsto x + \left(0 - \color{blue}{\left(-1 \cdot z - a\right)}\right) \]
      6. associate-+l-60.3%

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

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

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

        \[\leadsto x + \left(\color{blue}{z} + a\right) \]
      10. +-commutative60.3%

        \[\leadsto x + \color{blue}{\left(a + z\right)} \]
    6. Simplified60.3%

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

    if 1.45000000000000005e-146 < y < 1.04999999999999997e45

    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 inf 59.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4000000000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-146}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+45}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 21: 41.5% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{+19} \lor \neg \left(a \leq 16000000000\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.8e19 or 1.6e10 < a

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

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

    if -4.8e19 < a < 1.6e10

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+19} \lor \neg \left(a \leq 16000000000\right):\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]

Alternative 22: 32.1% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{+59}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;a \leq 0.003:\\
\;\;\;\;x + z\\

\mathbf{else}:\\
\;\;\;\;-t \cdot a\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.5999999999999999e59

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{-1 \cdot a} \]
    7. Step-by-step derivation
      1. mul-1-neg45.0%

        \[\leadsto x - \color{blue}{\left(-a\right)} \]
    8. Simplified45.0%

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

    if -3.5999999999999999e59 < a < 0.0030000000000000001

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

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

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

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

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

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

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

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

    if 0.0030000000000000001 < a

    1. Initial program 92.2%

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

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

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

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-rgt-neg-out35.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+59}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;a \leq 0.003:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;-t \cdot a\\ \end{array} \]

Alternative 23: 26.7% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -650 \lor \neg \left(b \leq 4.2 \cdot 10^{+79}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -650 or 4.20000000000000016e79 < 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 z around 0 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -650 < b < 4.20000000000000016e79

    1. Initial program 99.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -650 \lor \neg \left(b \leq 4.2 \cdot 10^{+79}\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 24: 27.0% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -72:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;b \leq 3.8 \cdot 10^{+23}:\\
\;\;\;\;x\\

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


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

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -72 < b < 3.79999999999999975e23

    1. Initial program 99.3%

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

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

    if 3.79999999999999975e23 < 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 81.8%

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

      \[\leadsto \color{blue}{b \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative36.3%

        \[\leadsto \color{blue}{t \cdot b} \]
    5. Simplified36.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -72:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 3.8 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 25: 33.7% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;b \leq 5.8 \cdot 10^{+81}:\\
\;\;\;\;x + z\\

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


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

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-\left(t + \color{blue}{-1}\right) \cdot a\right) + x\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      8. distribute-lft-neg-in89.4%

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

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

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

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

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

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

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

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

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

    if -5.9999999999999997e41 < b < 5.7999999999999999e81

    1. Initial program 99.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 88.3%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z} \]
    6. Simplified36.1%

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

    if 5.7999999999999999e81 < b

    1. Initial program 91.7%

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

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

      \[\leadsto \color{blue}{b \cdot t} \]
    4. Step-by-step derivation
      1. *-commutative42.3%

        \[\leadsto \color{blue}{t \cdot b} \]
    5. Simplified42.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6 \cdot 10^{+41}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{+81}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 26: 20.8% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 4.8 \cdot 10^{+42}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.7500000000000001e146 or 4.7999999999999997e42 < x

    1. Initial program 96.4%

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

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

    if -1.7500000000000001e146 < x < 4.7999999999999997e42

    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 a around inf 30.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.75 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{+42}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 27: 21.5% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 8.8 \cdot 10^{+45}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.4999999999999997e53 or 8.8000000000000001e45 < x

    1. Initial program 97.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 37.7%

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

    if -7.4999999999999997e53 < x < 8.8000000000000001e45

    1. Initial program 97.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+53}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{+45}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 28: 10.7% 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.2%

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

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

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

    \[\leadsto a \]

Reproduce

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