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

Percentage Accurate: 95.3% → 97.9%
Time: 17.1s
Alternatives: 23
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 23 alternatives:

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

Initial Program: 95.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.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(y + t\right) - 2\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\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 (- (+ y t) 2.0)))))
   (if (<= t_1 INFINITY) t_1 (* y (- b z)))))
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 * ((y + t) - 2.0));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = y * (b - z);
	}
	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 * ((y + t) - 2.0));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = y * (b - z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = y * (b - z)
	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(y + t) - 2.0)))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(y * Float64(b - z));
	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 * ((y + t) - 2.0));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = y * (b - z);
	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[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(y * N[(b - z), $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(y + t\right) - 2\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\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. Add Preprocessing

    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. Add Preprocessing
    3. Taylor expanded in y around inf 62.8%

      \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.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(y + t\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(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 97.6% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 37.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(t - 2\right)\\ t_2 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -1.4 \cdot 10^{+171}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -5.6 \cdot 10^{+73}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -3900:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-219}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 10^{-258}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{-247}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{-147}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{+50}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- t 2.0))) (t_2 (* a (- 1.0 t))))
   (if (<= b -1.4e+171)
     t_1
     (if (<= b -5.6e+73)
       (* y b)
       (if (<= b -3900.0)
         (+ x z)
         (if (<= b -4.6e-219)
           t_2
           (if (<= b 1e-258)
             (+ x z)
             (if (<= b 1.9e-247)
               t_2
               (if (<= b 9.5e-147)
                 (* y (- z))
                 (if (<= b 1.1e+50) t_2 t_1))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (t - 2.0);
	double t_2 = a * (1.0 - t);
	double tmp;
	if (b <= -1.4e+171) {
		tmp = t_1;
	} else if (b <= -5.6e+73) {
		tmp = y * b;
	} else if (b <= -3900.0) {
		tmp = x + z;
	} else if (b <= -4.6e-219) {
		tmp = t_2;
	} else if (b <= 1e-258) {
		tmp = x + z;
	} else if (b <= 1.9e-247) {
		tmp = t_2;
	} else if (b <= 9.5e-147) {
		tmp = y * -z;
	} else if (b <= 1.1e+50) {
		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 - 2.0d0)
    t_2 = a * (1.0d0 - t)
    if (b <= (-1.4d+171)) then
        tmp = t_1
    else if (b <= (-5.6d+73)) then
        tmp = y * b
    else if (b <= (-3900.0d0)) then
        tmp = x + z
    else if (b <= (-4.6d-219)) then
        tmp = t_2
    else if (b <= 1d-258) then
        tmp = x + z
    else if (b <= 1.9d-247) then
        tmp = t_2
    else if (b <= 9.5d-147) then
        tmp = y * -z
    else if (b <= 1.1d+50) 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 - 2.0);
	double t_2 = a * (1.0 - t);
	double tmp;
	if (b <= -1.4e+171) {
		tmp = t_1;
	} else if (b <= -5.6e+73) {
		tmp = y * b;
	} else if (b <= -3900.0) {
		tmp = x + z;
	} else if (b <= -4.6e-219) {
		tmp = t_2;
	} else if (b <= 1e-258) {
		tmp = x + z;
	} else if (b <= 1.9e-247) {
		tmp = t_2;
	} else if (b <= 9.5e-147) {
		tmp = y * -z;
	} else if (b <= 1.1e+50) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (t - 2.0)
	t_2 = a * (1.0 - t)
	tmp = 0
	if b <= -1.4e+171:
		tmp = t_1
	elif b <= -5.6e+73:
		tmp = y * b
	elif b <= -3900.0:
		tmp = x + z
	elif b <= -4.6e-219:
		tmp = t_2
	elif b <= 1e-258:
		tmp = x + z
	elif b <= 1.9e-247:
		tmp = t_2
	elif b <= 9.5e-147:
		tmp = y * -z
	elif b <= 1.1e+50:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(t - 2.0))
	t_2 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (b <= -1.4e+171)
		tmp = t_1;
	elseif (b <= -5.6e+73)
		tmp = Float64(y * b);
	elseif (b <= -3900.0)
		tmp = Float64(x + z);
	elseif (b <= -4.6e-219)
		tmp = t_2;
	elseif (b <= 1e-258)
		tmp = Float64(x + z);
	elseif (b <= 1.9e-247)
		tmp = t_2;
	elseif (b <= 9.5e-147)
		tmp = Float64(y * Float64(-z));
	elseif (b <= 1.1e+50)
		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 - 2.0);
	t_2 = a * (1.0 - t);
	tmp = 0.0;
	if (b <= -1.4e+171)
		tmp = t_1;
	elseif (b <= -5.6e+73)
		tmp = y * b;
	elseif (b <= -3900.0)
		tmp = x + z;
	elseif (b <= -4.6e-219)
		tmp = t_2;
	elseif (b <= 1e-258)
		tmp = x + z;
	elseif (b <= 1.9e-247)
		tmp = t_2;
	elseif (b <= 9.5e-147)
		tmp = y * -z;
	elseif (b <= 1.1e+50)
		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[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.4e+171], t$95$1, If[LessEqual[b, -5.6e+73], N[(y * b), $MachinePrecision], If[LessEqual[b, -3900.0], N[(x + z), $MachinePrecision], If[LessEqual[b, -4.6e-219], t$95$2, If[LessEqual[b, 1e-258], N[(x + z), $MachinePrecision], If[LessEqual[b, 1.9e-247], t$95$2, If[LessEqual[b, 9.5e-147], N[(y * (-z)), $MachinePrecision], If[LessEqual[b, 1.1e+50], t$95$2, t$95$1]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -5.6 \cdot 10^{+73}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;b \leq -3900:\\
\;\;\;\;x + z\\

\mathbf{elif}\;b \leq -4.6 \cdot 10^{-219}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 10^{-258}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;b \leq 1.9 \cdot 10^{-247}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;b \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.40000000000000002e171 or 1.10000000000000008e50 < b

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in b around inf 80.1%

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

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

    if -1.40000000000000002e171 < b < -5.60000000000000016e73

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in z around 0 86.7%

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

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

    if -5.60000000000000016e73 < b < -3900 or -4.59999999999999977e-219 < b < 9.99999999999999954e-259

    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. Add Preprocessing
    3. Taylor expanded in y around 0 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3900 < b < -4.59999999999999977e-219 or 9.99999999999999954e-259 < b < 1.89999999999999994e-247 or 9.49999999999999986e-147 < b < 1.10000000000000008e50

    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. Add Preprocessing
    3. Taylor expanded in a around inf 44.0%

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

    if 1.89999999999999994e-247 < b < 9.49999999999999986e-147

    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. Add Preprocessing
    3. Taylor expanded in y around inf 63.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.4 \cdot 10^{+171}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq -5.6 \cdot 10^{+73}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -3900:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-219}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 10^{-258}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{-247}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{-147}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{+50}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 54.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z + \left(x + a\right)\\ t_2 := y \cdot \left(b - z\right)\\ t_3 := b \cdot \left(t - 2\right)\\ \mathbf{if}\;y \leq -1.08 \cdot 10^{+46}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-84}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-309}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-286}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-274}:\\ \;\;\;\;x + t \cdot b\\ \mathbf{elif}\;y \leq 4.65 \cdot 10^{-228}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-186}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+34}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ z (+ x a))) (t_2 (* y (- b z))) (t_3 (* b (- t 2.0))))
   (if (<= y -1.08e+46)
     t_2
     (if (<= y -3e-84)
       (* t (- b a))
       (if (<= y -8e-309)
         t_1
         (if (<= y 4.5e-286)
           t_3
           (if (<= y 2.7e-274)
             (+ x (* t b))
             (if (<= y 4.65e-228)
               (* a (- 1.0 t))
               (if (<= y 8.5e-186) t_3 (if (<= y 2.4e+34) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (x + a);
	double t_2 = y * (b - z);
	double t_3 = b * (t - 2.0);
	double tmp;
	if (y <= -1.08e+46) {
		tmp = t_2;
	} else if (y <= -3e-84) {
		tmp = t * (b - a);
	} else if (y <= -8e-309) {
		tmp = t_1;
	} else if (y <= 4.5e-286) {
		tmp = t_3;
	} else if (y <= 2.7e-274) {
		tmp = x + (t * b);
	} else if (y <= 4.65e-228) {
		tmp = a * (1.0 - t);
	} else if (y <= 8.5e-186) {
		tmp = t_3;
	} else if (y <= 2.4e+34) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = z + (x + a)
    t_2 = y * (b - z)
    t_3 = b * (t - 2.0d0)
    if (y <= (-1.08d+46)) then
        tmp = t_2
    else if (y <= (-3d-84)) then
        tmp = t * (b - a)
    else if (y <= (-8d-309)) then
        tmp = t_1
    else if (y <= 4.5d-286) then
        tmp = t_3
    else if (y <= 2.7d-274) then
        tmp = x + (t * b)
    else if (y <= 4.65d-228) then
        tmp = a * (1.0d0 - t)
    else if (y <= 8.5d-186) then
        tmp = t_3
    else if (y <= 2.4d+34) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (x + a);
	double t_2 = y * (b - z);
	double t_3 = b * (t - 2.0);
	double tmp;
	if (y <= -1.08e+46) {
		tmp = t_2;
	} else if (y <= -3e-84) {
		tmp = t * (b - a);
	} else if (y <= -8e-309) {
		tmp = t_1;
	} else if (y <= 4.5e-286) {
		tmp = t_3;
	} else if (y <= 2.7e-274) {
		tmp = x + (t * b);
	} else if (y <= 4.65e-228) {
		tmp = a * (1.0 - t);
	} else if (y <= 8.5e-186) {
		tmp = t_3;
	} else if (y <= 2.4e+34) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z + (x + a)
	t_2 = y * (b - z)
	t_3 = b * (t - 2.0)
	tmp = 0
	if y <= -1.08e+46:
		tmp = t_2
	elif y <= -3e-84:
		tmp = t * (b - a)
	elif y <= -8e-309:
		tmp = t_1
	elif y <= 4.5e-286:
		tmp = t_3
	elif y <= 2.7e-274:
		tmp = x + (t * b)
	elif y <= 4.65e-228:
		tmp = a * (1.0 - t)
	elif y <= 8.5e-186:
		tmp = t_3
	elif y <= 2.4e+34:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z + Float64(x + a))
	t_2 = Float64(y * Float64(b - z))
	t_3 = Float64(b * Float64(t - 2.0))
	tmp = 0.0
	if (y <= -1.08e+46)
		tmp = t_2;
	elseif (y <= -3e-84)
		tmp = Float64(t * Float64(b - a));
	elseif (y <= -8e-309)
		tmp = t_1;
	elseif (y <= 4.5e-286)
		tmp = t_3;
	elseif (y <= 2.7e-274)
		tmp = Float64(x + Float64(t * b));
	elseif (y <= 4.65e-228)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (y <= 8.5e-186)
		tmp = t_3;
	elseif (y <= 2.4e+34)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z + (x + a);
	t_2 = y * (b - z);
	t_3 = b * (t - 2.0);
	tmp = 0.0;
	if (y <= -1.08e+46)
		tmp = t_2;
	elseif (y <= -3e-84)
		tmp = t * (b - a);
	elseif (y <= -8e-309)
		tmp = t_1;
	elseif (y <= 4.5e-286)
		tmp = t_3;
	elseif (y <= 2.7e-274)
		tmp = x + (t * b);
	elseif (y <= 4.65e-228)
		tmp = a * (1.0 - t);
	elseif (y <= 8.5e-186)
		tmp = t_3;
	elseif (y <= 2.4e+34)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.08e+46], t$95$2, If[LessEqual[y, -3e-84], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e-309], t$95$1, If[LessEqual[y, 4.5e-286], t$95$3, If[LessEqual[y, 2.7e-274], N[(x + N[(t * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.65e-228], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-186], t$95$3, If[LessEqual[y, 2.4e+34], t$95$1, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -8 \cdot 10^{-309}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{-286}:\\
\;\;\;\;t\_3\\

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

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

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-186}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.07999999999999994e46 or 2.39999999999999987e34 < y

    1. Initial program 89.3%

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

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

    if -1.07999999999999994e46 < y < -3.0000000000000001e-84

    1. Initial program 95.8%

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

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

    if -3.0000000000000001e-84 < y < -8.0000000000000003e-309 or 8.4999999999999994e-186 < y < 2.39999999999999987e34

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z + \left(a + x\right)} \]
    11. Simplified58.9%

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

    if -8.0000000000000003e-309 < y < 4.50000000000000005e-286 or 4.65000000000000028e-228 < y < 8.4999999999999994e-186

    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. Add Preprocessing
    3. Taylor expanded in b around inf 66.7%

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

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

    if 4.50000000000000005e-286 < y < 2.7e-274

    1. Initial program 66.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. Add Preprocessing
    3. Taylor expanded in y around 0 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e-274 < y < 4.65000000000000028e-228

    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. Add Preprocessing
    3. Taylor expanded in a around inf 64.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.08 \cdot 10^{+46}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-84}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-309}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-286}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-274}:\\ \;\;\;\;x + t \cdot b\\ \mathbf{elif}\;y \leq 4.65 \cdot 10^{-228}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-186}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+34}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 54.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z + \left(x + a\right)\\ t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -1.3 \cdot 10^{+59}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -780:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -1.75 \cdot 10^{-66}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-247}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{-147}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{+31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{+50}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ z (+ x a))) (t_2 (* b (- (+ y t) 2.0))))
   (if (<= b -1.3e+59)
     t_2
     (if (<= b -780.0)
       t_1
       (if (<= b -1.75e-66)
         (* t (- b a))
         (if (<= b 1.7e-247)
           t_1
           (if (<= b 9.8e-147)
             (* z (- 1.0 y))
             (if (<= b 2.7e+31)
               t_1
               (if (<= b 1.3e+50) (* y (- b z)) t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (x + a);
	double t_2 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.3e+59) {
		tmp = t_2;
	} else if (b <= -780.0) {
		tmp = t_1;
	} else if (b <= -1.75e-66) {
		tmp = t * (b - a);
	} else if (b <= 1.7e-247) {
		tmp = t_1;
	} else if (b <= 9.8e-147) {
		tmp = z * (1.0 - y);
	} else if (b <= 2.7e+31) {
		tmp = t_1;
	} else if (b <= 1.3e+50) {
		tmp = y * (b - z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = z + (x + a)
    t_2 = b * ((y + t) - 2.0d0)
    if (b <= (-1.3d+59)) then
        tmp = t_2
    else if (b <= (-780.0d0)) then
        tmp = t_1
    else if (b <= (-1.75d-66)) then
        tmp = t * (b - a)
    else if (b <= 1.7d-247) then
        tmp = t_1
    else if (b <= 9.8d-147) then
        tmp = z * (1.0d0 - y)
    else if (b <= 2.7d+31) then
        tmp = t_1
    else if (b <= 1.3d+50) then
        tmp = y * (b - z)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (x + a);
	double t_2 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.3e+59) {
		tmp = t_2;
	} else if (b <= -780.0) {
		tmp = t_1;
	} else if (b <= -1.75e-66) {
		tmp = t * (b - a);
	} else if (b <= 1.7e-247) {
		tmp = t_1;
	} else if (b <= 9.8e-147) {
		tmp = z * (1.0 - y);
	} else if (b <= 2.7e+31) {
		tmp = t_1;
	} else if (b <= 1.3e+50) {
		tmp = y * (b - z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z + (x + a)
	t_2 = b * ((y + t) - 2.0)
	tmp = 0
	if b <= -1.3e+59:
		tmp = t_2
	elif b <= -780.0:
		tmp = t_1
	elif b <= -1.75e-66:
		tmp = t * (b - a)
	elif b <= 1.7e-247:
		tmp = t_1
	elif b <= 9.8e-147:
		tmp = z * (1.0 - y)
	elif b <= 2.7e+31:
		tmp = t_1
	elif b <= 1.3e+50:
		tmp = y * (b - z)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z + Float64(x + a))
	t_2 = Float64(b * Float64(Float64(y + t) - 2.0))
	tmp = 0.0
	if (b <= -1.3e+59)
		tmp = t_2;
	elseif (b <= -780.0)
		tmp = t_1;
	elseif (b <= -1.75e-66)
		tmp = Float64(t * Float64(b - a));
	elseif (b <= 1.7e-247)
		tmp = t_1;
	elseif (b <= 9.8e-147)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (b <= 2.7e+31)
		tmp = t_1;
	elseif (b <= 1.3e+50)
		tmp = Float64(y * Float64(b - z));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z + (x + a);
	t_2 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -1.3e+59)
		tmp = t_2;
	elseif (b <= -780.0)
		tmp = t_1;
	elseif (b <= -1.75e-66)
		tmp = t * (b - a);
	elseif (b <= 1.7e-247)
		tmp = t_1;
	elseif (b <= 9.8e-147)
		tmp = z * (1.0 - y);
	elseif (b <= 2.7e+31)
		tmp = t_1;
	elseif (b <= 1.3e+50)
		tmp = y * (b - z);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.3e+59], t$95$2, If[LessEqual[b, -780.0], t$95$1, If[LessEqual[b, -1.75e-66], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e-247], t$95$1, If[LessEqual[b, 9.8e-147], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.7e+31], t$95$1, If[LessEqual[b, 1.3e+50], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -780:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 1.7 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 2.7 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1.3 \cdot 10^{+50}:\\
\;\;\;\;y \cdot \left(b - z\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.3e59 or 1.3000000000000001e50 < b

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in b around inf 75.4%

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

    if -1.3e59 < b < -780 or -1.75e-66 < b < 1.7000000000000001e-247 or 9.8000000000000001e-147 < b < 2.69999999999999986e31

    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. Add Preprocessing
    3. Taylor expanded in y around 0 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z + \left(a + x\right)} \]
    11. Simplified58.7%

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

    if -780 < b < -1.75e-66

    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. Add Preprocessing
    3. Taylor expanded in t around inf 63.7%

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

    if 1.7000000000000001e-247 < b < 9.8000000000000001e-147

    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. Add Preprocessing
    3. Taylor expanded in z around inf 65.6%

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

    if 2.69999999999999986e31 < b < 1.3000000000000001e50

    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. Add Preprocessing
    3. Taylor expanded in y around inf 62.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.3 \cdot 10^{+59}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -780:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;b \leq -1.75 \cdot 10^{-66}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-247}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{-147}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{+31}:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{+50}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 36.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := y \cdot \left(-z\right)\\ \mathbf{if}\;y \leq -5.7 \cdot 10^{+149}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{+82}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{-95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-281}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{-89}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-58}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{+35}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))) (t_2 (* y (- z))))
   (if (<= y -5.7e+149)
     t_2
     (if (<= y -2.5e+82)
       (* y b)
       (if (<= y -9.8e-95)
         t_1
         (if (<= y -7.5e-281)
           (+ x z)
           (if (<= y 4.3e-89)
             t_1
             (if (<= y 2.6e-58) (+ x z) (if (<= y 2.25e+35) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = y * -z;
	double tmp;
	if (y <= -5.7e+149) {
		tmp = t_2;
	} else if (y <= -2.5e+82) {
		tmp = y * b;
	} else if (y <= -9.8e-95) {
		tmp = t_1;
	} else if (y <= -7.5e-281) {
		tmp = x + z;
	} else if (y <= 4.3e-89) {
		tmp = t_1;
	} else if (y <= 2.6e-58) {
		tmp = x + z;
	} else if (y <= 2.25e+35) {
		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 = a * (1.0d0 - t)
    t_2 = y * -z
    if (y <= (-5.7d+149)) then
        tmp = t_2
    else if (y <= (-2.5d+82)) then
        tmp = y * b
    else if (y <= (-9.8d-95)) then
        tmp = t_1
    else if (y <= (-7.5d-281)) then
        tmp = x + z
    else if (y <= 4.3d-89) then
        tmp = t_1
    else if (y <= 2.6d-58) then
        tmp = x + z
    else if (y <= 2.25d+35) 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 = a * (1.0 - t);
	double t_2 = y * -z;
	double tmp;
	if (y <= -5.7e+149) {
		tmp = t_2;
	} else if (y <= -2.5e+82) {
		tmp = y * b;
	} else if (y <= -9.8e-95) {
		tmp = t_1;
	} else if (y <= -7.5e-281) {
		tmp = x + z;
	} else if (y <= 4.3e-89) {
		tmp = t_1;
	} else if (y <= 2.6e-58) {
		tmp = x + z;
	} else if (y <= 2.25e+35) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = y * -z
	tmp = 0
	if y <= -5.7e+149:
		tmp = t_2
	elif y <= -2.5e+82:
		tmp = y * b
	elif y <= -9.8e-95:
		tmp = t_1
	elif y <= -7.5e-281:
		tmp = x + z
	elif y <= 4.3e-89:
		tmp = t_1
	elif y <= 2.6e-58:
		tmp = x + z
	elif y <= 2.25e+35:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	t_2 = Float64(y * Float64(-z))
	tmp = 0.0
	if (y <= -5.7e+149)
		tmp = t_2;
	elseif (y <= -2.5e+82)
		tmp = Float64(y * b);
	elseif (y <= -9.8e-95)
		tmp = t_1;
	elseif (y <= -7.5e-281)
		tmp = Float64(x + z);
	elseif (y <= 4.3e-89)
		tmp = t_1;
	elseif (y <= 2.6e-58)
		tmp = Float64(x + z);
	elseif (y <= 2.25e+35)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = y * -z;
	tmp = 0.0;
	if (y <= -5.7e+149)
		tmp = t_2;
	elseif (y <= -2.5e+82)
		tmp = y * b;
	elseif (y <= -9.8e-95)
		tmp = t_1;
	elseif (y <= -7.5e-281)
		tmp = x + z;
	elseif (y <= 4.3e-89)
		tmp = t_1;
	elseif (y <= 2.6e-58)
		tmp = x + z;
	elseif (y <= 2.25e+35)
		tmp = t_1;
	else
		tmp = t_2;
	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[(y * (-z)), $MachinePrecision]}, If[LessEqual[y, -5.7e+149], t$95$2, If[LessEqual[y, -2.5e+82], N[(y * b), $MachinePrecision], If[LessEqual[y, -9.8e-95], t$95$1, If[LessEqual[y, -7.5e-281], N[(x + z), $MachinePrecision], If[LessEqual[y, 4.3e-89], t$95$1, If[LessEqual[y, 2.6e-58], N[(x + z), $MachinePrecision], If[LessEqual[y, 2.25e+35], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -9.8 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 4.3 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 2.25 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.69999999999999965e149 or 2.2499999999999998e35 < y

    1. Initial program 89.1%

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]
    6. Simplified48.4%

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

    if -5.69999999999999965e149 < y < -2.50000000000000008e82

    1. Initial program 85.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. Add Preprocessing
    3. Taylor expanded in z around 0 85.6%

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

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

    if -2.50000000000000008e82 < y < -9.8e-95 or -7.49999999999999968e-281 < y < 4.29999999999999987e-89 or 2.60000000000000007e-58 < y < 2.2499999999999998e35

    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. Add Preprocessing
    3. Taylor expanded in a around inf 45.3%

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

    if -9.8e-95 < y < -7.49999999999999968e-281 or 4.29999999999999987e-89 < y < 2.60000000000000007e-58

    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. Add Preprocessing
    3. Taylor expanded in y around 0 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.7 \cdot 10^{+149}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{+82}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{-95}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-281}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{-89}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-58}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{+35}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 38.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -1.28 \cdot 10^{+70}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;b \leq -17000:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq -2.1 \cdot 10^{-218}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{-258}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-247}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{-147}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{+50}:\\ \;\;\;\;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 (* a (- 1.0 t))))
   (if (<= b -1.28e+70)
     (* b (- y 2.0))
     (if (<= b -17000.0)
       (+ x z)
       (if (<= b -2.1e-218)
         t_1
         (if (<= b 1.02e-258)
           (+ x z)
           (if (<= b 3e-247)
             t_1
             (if (<= b 9.5e-147)
               (* y (- z))
               (if (<= b 4.8e+50) t_1 (* b (- t 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.28e+70) {
		tmp = b * (y - 2.0);
	} else if (b <= -17000.0) {
		tmp = x + z;
	} else if (b <= -2.1e-218) {
		tmp = t_1;
	} else if (b <= 1.02e-258) {
		tmp = x + z;
	} else if (b <= 3e-247) {
		tmp = t_1;
	} else if (b <= 9.5e-147) {
		tmp = y * -z;
	} else if (b <= 4.8e+50) {
		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 = a * (1.0d0 - t)
    if (b <= (-1.28d+70)) then
        tmp = b * (y - 2.0d0)
    else if (b <= (-17000.0d0)) then
        tmp = x + z
    else if (b <= (-2.1d-218)) then
        tmp = t_1
    else if (b <= 1.02d-258) then
        tmp = x + z
    else if (b <= 3d-247) then
        tmp = t_1
    else if (b <= 9.5d-147) then
        tmp = y * -z
    else if (b <= 4.8d+50) 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 = a * (1.0 - t);
	double tmp;
	if (b <= -1.28e+70) {
		tmp = b * (y - 2.0);
	} else if (b <= -17000.0) {
		tmp = x + z;
	} else if (b <= -2.1e-218) {
		tmp = t_1;
	} else if (b <= 1.02e-258) {
		tmp = x + z;
	} else if (b <= 3e-247) {
		tmp = t_1;
	} else if (b <= 9.5e-147) {
		tmp = y * -z;
	} else if (b <= 4.8e+50) {
		tmp = t_1;
	} else {
		tmp = b * (t - 2.0);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	tmp = 0
	if b <= -1.28e+70:
		tmp = b * (y - 2.0)
	elif b <= -17000.0:
		tmp = x + z
	elif b <= -2.1e-218:
		tmp = t_1
	elif b <= 1.02e-258:
		tmp = x + z
	elif b <= 3e-247:
		tmp = t_1
	elif b <= 9.5e-147:
		tmp = y * -z
	elif b <= 4.8e+50:
		tmp = t_1
	else:
		tmp = b * (t - 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.28e+70)
		tmp = Float64(b * Float64(y - 2.0));
	elseif (b <= -17000.0)
		tmp = Float64(x + z);
	elseif (b <= -2.1e-218)
		tmp = t_1;
	elseif (b <= 1.02e-258)
		tmp = Float64(x + z);
	elseif (b <= 3e-247)
		tmp = t_1;
	elseif (b <= 9.5e-147)
		tmp = Float64(y * Float64(-z));
	elseif (b <= 4.8e+50)
		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 = a * (1.0 - t);
	tmp = 0.0;
	if (b <= -1.28e+70)
		tmp = b * (y - 2.0);
	elseif (b <= -17000.0)
		tmp = x + z;
	elseif (b <= -2.1e-218)
		tmp = t_1;
	elseif (b <= 1.02e-258)
		tmp = x + z;
	elseif (b <= 3e-247)
		tmp = t_1;
	elseif (b <= 9.5e-147)
		tmp = y * -z;
	elseif (b <= 4.8e+50)
		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[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.28e+70], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -17000.0], N[(x + z), $MachinePrecision], If[LessEqual[b, -2.1e-218], t$95$1, If[LessEqual[b, 1.02e-258], N[(x + z), $MachinePrecision], If[LessEqual[b, 3e-247], t$95$1, If[LessEqual[b, 9.5e-147], N[(y * (-z)), $MachinePrecision], If[LessEqual[b, 4.8e+50], t$95$1, N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -17000:\\
\;\;\;\;x + z\\

\mathbf{elif}\;b \leq -2.1 \cdot 10^{-218}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 3 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 4.8 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in b around inf 75.8%

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

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

    if -1.27999999999999994e70 < b < -17000 or -2.09999999999999994e-218 < b < 1.02e-258

    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. Add Preprocessing
    3. Taylor expanded in y around 0 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -17000 < b < -2.09999999999999994e-218 or 1.02e-258 < b < 2.9999999999999997e-247 or 9.49999999999999986e-147 < b < 4.8000000000000004e50

    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. Add Preprocessing
    3. Taylor expanded in a around inf 44.0%

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

    if 2.9999999999999997e-247 < b < 9.49999999999999986e-147

    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. Add Preprocessing
    3. Taylor expanded in y around inf 63.0%

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

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

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

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

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

    if 4.8000000000000004e50 < b

    1. Initial program 84.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. Add Preprocessing
    3. Taylor expanded in b around inf 77.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.28 \cdot 10^{+70}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;b \leq -17000:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq -2.1 \cdot 10^{-218}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{-258}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-247}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{-147}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{+50}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 66.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - b \cdot \left(2 - \left(y + t\right)\right)\\ t_2 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -7.6 \cdot 10^{+169}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{+63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{+45}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -0.00029:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 8.3 \cdot 10^{-10}:\\ \;\;\;\;x + \left(z + \left(t + -2\right) \cdot b\right)\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+141}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* b (- 2.0 (+ y t))))) (t_2 (* y (- b z))))
   (if (<= y -7.6e+169)
     t_2
     (if (<= y -1.9e+63)
       t_1
       (if (<= y -9.5e+45)
         t_2
         (if (<= y -0.00029)
           (* t (- b a))
           (if (<= y 8.3e-10)
             (+ x (+ z (* (+ t -2.0) b)))
             (if (<= y 1.75e+141) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (b * (2.0 - (y + t)));
	double t_2 = y * (b - z);
	double tmp;
	if (y <= -7.6e+169) {
		tmp = t_2;
	} else if (y <= -1.9e+63) {
		tmp = t_1;
	} else if (y <= -9.5e+45) {
		tmp = t_2;
	} else if (y <= -0.00029) {
		tmp = t * (b - a);
	} else if (y <= 8.3e-10) {
		tmp = x + (z + ((t + -2.0) * b));
	} else if (y <= 1.75e+141) {
		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 - (b * (2.0d0 - (y + t)))
    t_2 = y * (b - z)
    if (y <= (-7.6d+169)) then
        tmp = t_2
    else if (y <= (-1.9d+63)) then
        tmp = t_1
    else if (y <= (-9.5d+45)) then
        tmp = t_2
    else if (y <= (-0.00029d0)) then
        tmp = t * (b - a)
    else if (y <= 8.3d-10) then
        tmp = x + (z + ((t + (-2.0d0)) * b))
    else if (y <= 1.75d+141) 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 - (b * (2.0 - (y + t)));
	double t_2 = y * (b - z);
	double tmp;
	if (y <= -7.6e+169) {
		tmp = t_2;
	} else if (y <= -1.9e+63) {
		tmp = t_1;
	} else if (y <= -9.5e+45) {
		tmp = t_2;
	} else if (y <= -0.00029) {
		tmp = t * (b - a);
	} else if (y <= 8.3e-10) {
		tmp = x + (z + ((t + -2.0) * b));
	} else if (y <= 1.75e+141) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (b * (2.0 - (y + t)))
	t_2 = y * (b - z)
	tmp = 0
	if y <= -7.6e+169:
		tmp = t_2
	elif y <= -1.9e+63:
		tmp = t_1
	elif y <= -9.5e+45:
		tmp = t_2
	elif y <= -0.00029:
		tmp = t * (b - a)
	elif y <= 8.3e-10:
		tmp = x + (z + ((t + -2.0) * b))
	elif y <= 1.75e+141:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(b * Float64(2.0 - Float64(y + t))))
	t_2 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -7.6e+169)
		tmp = t_2;
	elseif (y <= -1.9e+63)
		tmp = t_1;
	elseif (y <= -9.5e+45)
		tmp = t_2;
	elseif (y <= -0.00029)
		tmp = Float64(t * Float64(b - a));
	elseif (y <= 8.3e-10)
		tmp = Float64(x + Float64(z + Float64(Float64(t + -2.0) * b)));
	elseif (y <= 1.75e+141)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (b * (2.0 - (y + t)));
	t_2 = y * (b - z);
	tmp = 0.0;
	if (y <= -7.6e+169)
		tmp = t_2;
	elseif (y <= -1.9e+63)
		tmp = t_1;
	elseif (y <= -9.5e+45)
		tmp = t_2;
	elseif (y <= -0.00029)
		tmp = t * (b - a);
	elseif (y <= 8.3e-10)
		tmp = x + (z + ((t + -2.0) * b));
	elseif (y <= 1.75e+141)
		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[(b * N[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.6e+169], t$95$2, If[LessEqual[y, -1.9e+63], t$95$1, If[LessEqual[y, -9.5e+45], t$95$2, If[LessEqual[y, -0.00029], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.3e-10], N[(x + N[(z + N[(N[(t + -2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+141], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.9 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9.5 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -0.00029:\\
\;\;\;\;t \cdot \left(b - a\right)\\

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

\mathbf{elif}\;y \leq 1.75 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.59999999999999983e169 or -1.9000000000000001e63 < y < -9.4999999999999998e45 or 1.75e141 < y

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in y around inf 83.5%

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

    if -7.59999999999999983e169 < y < -1.9000000000000001e63 or 8.3000000000000003e-10 < y < 1.75e141

    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. Add Preprocessing
    3. Taylor expanded in y around 0 84.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4999999999999998e45 < y < -2.9e-4

    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. Add Preprocessing
    3. Taylor expanded in t around inf 77.1%

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

    if -2.9e-4 < y < 8.3000000000000003e-10

    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. Add Preprocessing
    3. Taylor expanded in y around 0 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\left(z + b \cdot \left(t + \color{blue}{-2}\right)\right) + y \cdot \left(b - z\right)\right) \]
      4. associate-+r+67.6%

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

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

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

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

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

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

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

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) + z\right) \]
    11. Simplified67.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.6 \cdot 10^{+169}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{+63}:\\ \;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{+45}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -0.00029:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 8.3 \cdot 10^{-10}:\\ \;\;\;\;x + \left(z + \left(t + -2\right) \cdot b\right)\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+141}:\\ \;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 73.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(\left(z + a\right) + t \cdot \left(b - a\right)\right)\\ t_2 := x - b \cdot \left(2 - \left(y + t\right)\right)\\ \mathbf{if}\;b \leq -3.4 \cdot 10^{+74}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 2.65 \cdot 10^{-247}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{-146}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{+82}:\\ \;\;\;\;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 (- b a)))))
        (t_2 (- x (* b (- 2.0 (+ y t))))))
   (if (<= b -3.4e+74)
     t_2
     (if (<= b 2.65e-247)
       t_1
       (if (<= b 1.2e-146)
         (+ x (* z (- 1.0 y)))
         (if (<= b 1.1e+82) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((z + a) + (t * (b - a)));
	double t_2 = x - (b * (2.0 - (y + t)));
	double tmp;
	if (b <= -3.4e+74) {
		tmp = t_2;
	} else if (b <= 2.65e-247) {
		tmp = t_1;
	} else if (b <= 1.2e-146) {
		tmp = x + (z * (1.0 - y));
	} else if (b <= 1.1e+82) {
		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 * (b - a)))
    t_2 = x - (b * (2.0d0 - (y + t)))
    if (b <= (-3.4d+74)) then
        tmp = t_2
    else if (b <= 2.65d-247) then
        tmp = t_1
    else if (b <= 1.2d-146) then
        tmp = x + (z * (1.0d0 - y))
    else if (b <= 1.1d+82) 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) + (t * (b - a)));
	double t_2 = x - (b * (2.0 - (y + t)));
	double tmp;
	if (b <= -3.4e+74) {
		tmp = t_2;
	} else if (b <= 2.65e-247) {
		tmp = t_1;
	} else if (b <= 1.2e-146) {
		tmp = x + (z * (1.0 - y));
	} else if (b <= 1.1e+82) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + ((z + a) + (t * (b - a)))
	t_2 = x - (b * (2.0 - (y + t)))
	tmp = 0
	if b <= -3.4e+74:
		tmp = t_2
	elif b <= 2.65e-247:
		tmp = t_1
	elif b <= 1.2e-146:
		tmp = x + (z * (1.0 - y))
	elif b <= 1.1e+82:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(Float64(z + a) + Float64(t * Float64(b - a))))
	t_2 = Float64(x - Float64(b * Float64(2.0 - Float64(y + t))))
	tmp = 0.0
	if (b <= -3.4e+74)
		tmp = t_2;
	elseif (b <= 2.65e-247)
		tmp = t_1;
	elseif (b <= 1.2e-146)
		tmp = Float64(x + Float64(z * Float64(1.0 - y)));
	elseif (b <= 1.1e+82)
		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 * (b - a)));
	t_2 = x - (b * (2.0 - (y + t)));
	tmp = 0.0;
	if (b <= -3.4e+74)
		tmp = t_2;
	elseif (b <= 2.65e-247)
		tmp = t_1;
	elseif (b <= 1.2e-146)
		tmp = x + (z * (1.0 - y));
	elseif (b <= 1.1e+82)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(z + a), $MachinePrecision] + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(b * N[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.4e+74], t$95$2, If[LessEqual[b, 2.65e-247], t$95$1, If[LessEqual[b, 1.2e-146], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.1e+82], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 2.65 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 1.1 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.3999999999999999e74 or 1.1000000000000001e82 < b

    1. Initial program 85.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. Add Preprocessing
    3. Taylor expanded in y around 0 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3999999999999999e74 < b < 2.6499999999999999e-247 or 1.2000000000000001e-146 < b < 1.1000000000000001e82

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(a + \left(z + t \cdot \left(b + -1 \cdot a\right)\right)\right)} \]
    10. Step-by-step derivation
      1. associate-+r+78.2%

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

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

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

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

    if 2.6499999999999999e-247 < b < 1.2000000000000001e-146

    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. Add Preprocessing
    3. Taylor expanded in b around 0 95.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{+74}:\\ \;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\ \mathbf{elif}\;b \leq 2.65 \cdot 10^{-247}:\\ \;\;\;\;x + \left(\left(z + a\right) + t \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{-146}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{+82}:\\ \;\;\;\;x + \left(\left(z + a\right) + t \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 47.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -1.42 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.05 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.3e13 or 7.9999999999999996e61 < t

    1. Initial program 89.3%

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

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

    if -2.3e13 < t < -1.42000000000000001e-117 or -9.0000000000000005e-247 < t < 2.0500000000000001e-109

    1. Initial program 96.7%

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

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

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

    if -1.42000000000000001e-117 < t < -9.0000000000000005e-247 or 2.0500000000000001e-109 < t < 7.9999999999999996e61

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \left(\color{blue}{b \cdot t} + \left(z + a \cdot \left(1 - t\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-commutative66.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -23000000000000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.42 \cdot 10^{-117}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-247}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-109}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+61}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 49.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -8.8 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-79}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-296}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-130}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{+34}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))))
   (if (<= y -8.8e+44)
     t_1
     (if (<= y -1.8e-79)
       (* t (- b a))
       (if (<= y -6.8e-296)
         (+ x z)
         (if (<= y 2.3e-130)
           (* b (- t 2.0))
           (if (<= y 4.1e+34) (* a (- 1.0 t)) 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 <= -8.8e+44) {
		tmp = t_1;
	} else if (y <= -1.8e-79) {
		tmp = t * (b - a);
	} else if (y <= -6.8e-296) {
		tmp = x + z;
	} else if (y <= 2.3e-130) {
		tmp = b * (t - 2.0);
	} else if (y <= 4.1e+34) {
		tmp = a * (1.0 - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (b - z)
    if (y <= (-8.8d+44)) then
        tmp = t_1
    else if (y <= (-1.8d-79)) then
        tmp = t * (b - a)
    else if (y <= (-6.8d-296)) then
        tmp = x + z
    else if (y <= 2.3d-130) then
        tmp = b * (t - 2.0d0)
    else if (y <= 4.1d+34) then
        tmp = a * (1.0d0 - t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double tmp;
	if (y <= -8.8e+44) {
		tmp = t_1;
	} else if (y <= -1.8e-79) {
		tmp = t * (b - a);
	} else if (y <= -6.8e-296) {
		tmp = x + z;
	} else if (y <= 2.3e-130) {
		tmp = b * (t - 2.0);
	} else if (y <= 4.1e+34) {
		tmp = a * (1.0 - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	tmp = 0
	if y <= -8.8e+44:
		tmp = t_1
	elif y <= -1.8e-79:
		tmp = t * (b - a)
	elif y <= -6.8e-296:
		tmp = x + z
	elif y <= 2.3e-130:
		tmp = b * (t - 2.0)
	elif y <= 4.1e+34:
		tmp = a * (1.0 - t)
	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 <= -8.8e+44)
		tmp = t_1;
	elseif (y <= -1.8e-79)
		tmp = Float64(t * Float64(b - a));
	elseif (y <= -6.8e-296)
		tmp = Float64(x + z);
	elseif (y <= 2.3e-130)
		tmp = Float64(b * Float64(t - 2.0));
	elseif (y <= 4.1e+34)
		tmp = Float64(a * Float64(1.0 - t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	tmp = 0.0;
	if (y <= -8.8e+44)
		tmp = t_1;
	elseif (y <= -1.8e-79)
		tmp = t * (b - a);
	elseif (y <= -6.8e-296)
		tmp = x + z;
	elseif (y <= 2.3e-130)
		tmp = b * (t - 2.0);
	elseif (y <= 4.1e+34)
		tmp = a * (1.0 - t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.8e+44], t$95$1, If[LessEqual[y, -1.8e-79], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.8e-296], N[(x + z), $MachinePrecision], If[LessEqual[y, 2.3e-130], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e+34], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -8.79999999999999983e44 or 4.0999999999999998e34 < y

    1. Initial program 89.3%

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

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

    if -8.79999999999999983e44 < y < -1.8000000000000001e-79

    1. Initial program 95.8%

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

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

    if -1.8000000000000001e-79 < y < -6.79999999999999993e-296

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.79999999999999993e-296 < y < 2.3000000000000001e-130

    1. Initial program 97.5%

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

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

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

    if 2.3000000000000001e-130 < y < 4.0999999999999998e34

    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. Add Preprocessing
    3. Taylor expanded in a around inf 47.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.8 \cdot 10^{+44}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-79}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-296}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-130}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{+34}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 63.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq -720:\\
\;\;\;\;z + \left(x + a\right)\\

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.15000000000000004e59 or 4.2499999999999998e49 < b

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in y around 0 84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000004e59 < b < -720

    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. Add Preprocessing
    3. Taylor expanded in y around 0 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -720 < b < -2.05000000000000014e-58

    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. Add Preprocessing
    3. Taylor expanded in t around inf 73.3%

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

    if -2.05000000000000014e-58 < b < 4.2499999999999998e49

    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. Add Preprocessing
    3. Taylor expanded in b around 0 91.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{+59}:\\ \;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\ \mathbf{elif}\;b \leq -720:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;b \leq -2.05 \cdot 10^{-58}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 4.25 \cdot 10^{+49}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 70.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z + a \cdot \left(1 - t\right)\right)\\ t_2 := x - b \cdot \left(2 - \left(y + t\right)\right)\\ \mathbf{if}\;b \leq -7.8 \cdot 10^{+71}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-247}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{-146}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+50}:\\ \;\;\;\;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 (- 1.0 t))))) (t_2 (- x (* b (- 2.0 (+ y t))))))
   (if (<= b -7.8e+71)
     t_2
     (if (<= b 1.7e-247)
       t_1
       (if (<= b 1.05e-146)
         (+ x (* z (- 1.0 y)))
         (if (<= b 3e+50) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (z + (a * (1.0 - t)));
	double t_2 = x - (b * (2.0 - (y + t)));
	double tmp;
	if (b <= -7.8e+71) {
		tmp = t_2;
	} else if (b <= 1.7e-247) {
		tmp = t_1;
	} else if (b <= 1.05e-146) {
		tmp = x + (z * (1.0 - y));
	} else if (b <= 3e+50) {
		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 * (1.0d0 - t)))
    t_2 = x - (b * (2.0d0 - (y + t)))
    if (b <= (-7.8d+71)) then
        tmp = t_2
    else if (b <= 1.7d-247) then
        tmp = t_1
    else if (b <= 1.05d-146) then
        tmp = x + (z * (1.0d0 - y))
    else if (b <= 3d+50) 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 * (1.0 - t)));
	double t_2 = x - (b * (2.0 - (y + t)));
	double tmp;
	if (b <= -7.8e+71) {
		tmp = t_2;
	} else if (b <= 1.7e-247) {
		tmp = t_1;
	} else if (b <= 1.05e-146) {
		tmp = x + (z * (1.0 - y));
	} else if (b <= 3e+50) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (z + (a * (1.0 - t)))
	t_2 = x - (b * (2.0 - (y + t)))
	tmp = 0
	if b <= -7.8e+71:
		tmp = t_2
	elif b <= 1.7e-247:
		tmp = t_1
	elif b <= 1.05e-146:
		tmp = x + (z * (1.0 - y))
	elif b <= 3e+50:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(z + Float64(a * Float64(1.0 - t))))
	t_2 = Float64(x - Float64(b * Float64(2.0 - Float64(y + t))))
	tmp = 0.0
	if (b <= -7.8e+71)
		tmp = t_2;
	elseif (b <= 1.7e-247)
		tmp = t_1;
	elseif (b <= 1.05e-146)
		tmp = Float64(x + Float64(z * Float64(1.0 - y)));
	elseif (b <= 3e+50)
		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 * (1.0 - t)));
	t_2 = x - (b * (2.0 - (y + t)));
	tmp = 0.0;
	if (b <= -7.8e+71)
		tmp = t_2;
	elseif (b <= 1.7e-247)
		tmp = t_1;
	elseif (b <= 1.05e-146)
		tmp = x + (z * (1.0 - y));
	elseif (b <= 3e+50)
		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[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(b * N[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.8e+71], t$95$2, If[LessEqual[b, 1.7e-247], t$95$1, If[LessEqual[b, 1.05e-146], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e+50], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 1.7 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 3 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -7.8000000000000002e71 or 2.9999999999999998e50 < b

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in y around 0 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.8000000000000002e71 < b < 1.7000000000000001e-247 or 1.05e-146 < b < 2.9999999999999998e50

    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. Add Preprocessing
    3. Taylor expanded in b around 0 88.7%

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

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

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

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

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

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

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

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

    if 1.7000000000000001e-247 < b < 1.05e-146

    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. Add Preprocessing
    3. Taylor expanded in b around 0 95.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.8 \cdot 10^{+71}:\\ \;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-247}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{-146}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+50}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 60.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq -960:\\
\;\;\;\;z + \left(x + a\right)\\

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.44999999999999995e59 or 3.9000000000000001e49 < b

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in b around inf 75.4%

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

    if -1.44999999999999995e59 < b < -960

    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. Add Preprocessing
    3. Taylor expanded in y around 0 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -960 < b < -2.8000000000000001e-58

    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. Add Preprocessing
    3. Taylor expanded in t around inf 73.3%

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

    if -2.8000000000000001e-58 < b < 3.9000000000000001e49

    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. Add Preprocessing
    3. Taylor expanded in b around 0 91.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.45 \cdot 10^{+59}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -960:\\ \;\;\;\;z + \left(x + a\right)\\ \mathbf{elif}\;b \leq -2.8 \cdot 10^{-58}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 3.9 \cdot 10^{+49}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 86.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq 2.75 \cdot 10^{-51}:\\
\;\;\;\;x + \left(t\_1 + t\_3\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2 + t\_3\\


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

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in z around 0 86.5%

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

    if -8.9999999999999999e70 < b < 2.7499999999999999e-51

    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. Add Preprocessing
    3. Taylor expanded in b around 0 92.7%

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

    if 2.7499999999999999e-51 < b

    1. Initial program 88.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. Add Preprocessing
    3. Taylor expanded in a around 0 82.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9 \cdot 10^{+70}:\\ \;\;\;\;\left(x - b \cdot \left(2 - \left(y + t\right)\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.75 \cdot 10^{-51}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - b \cdot \left(2 - \left(y + t\right)\right)\right) + z \cdot \left(1 - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 35.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.5 \cdot 10^{+45}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -2 \cdot 10^{-47}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 0.175:\\
\;\;\;\;x + z\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.60000000000000008e150 or 0.17499999999999999 < y

    1. Initial program 89.3%

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

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

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

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

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

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

    if -1.60000000000000008e150 < y < -1.50000000000000005e45

    1. Initial program 90.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. Add Preprocessing
    3. Taylor expanded in z around 0 86.1%

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

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

    if -1.50000000000000005e45 < y < -1.9999999999999999e-47

    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. Add Preprocessing
    3. Taylor expanded in b around inf 49.9%

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

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

    if -1.9999999999999999e-47 < y < 0.17499999999999999

    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. Add Preprocessing
    3. Taylor expanded in y around 0 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \left(\color{blue}{b \cdot t} + \left(z + a \cdot \left(1 - t\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-commutative77.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+150}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{+45}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-47}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 0.175:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 84.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.3 \cdot 10^{+72} \lor \neg \left(b \leq 5 \cdot 10^{+71}\right):\\
\;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.29999999999999963e72 or 4.99999999999999972e71 < b

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in y around 0 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.29999999999999963e72 < b < 4.99999999999999972e71

    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. Add Preprocessing
    3. Taylor expanded in b around 0 87.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.3 \cdot 10^{+72} \lor \neg \left(b \leq 5 \cdot 10^{+71}\right):\\ \;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 84.8% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_2\\


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

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in z around 0 86.5%

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

    if -7.2000000000000005e69 < b < 5.60000000000000004e71

    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. Add Preprocessing
    3. Taylor expanded in b around 0 87.5%

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

    if 5.60000000000000004e71 < b

    1. Initial program 83.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. Add Preprocessing
    3. Taylor expanded in y around 0 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.2 \cdot 10^{+69}:\\ \;\;\;\;\left(x - b \cdot \left(2 - \left(y + t\right)\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{+71}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 26.7% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+38} \lor \neg \left(t \leq 4 \cdot 10^{+37}\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.69999999999999996e38 or 3.99999999999999982e37 < t

    1. Initial program 89.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. Add Preprocessing
    3. Taylor expanded in b around inf 44.5%

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

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

    if -2.69999999999999996e38 < t < 3.99999999999999982e37

    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. Add Preprocessing
    3. Taylor expanded in x around inf 17.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+38} \lor \neg \left(t \leq 4 \cdot 10^{+37}\right):\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 26.2% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;b \leq 2.4 \cdot 10^{+33}:\\
\;\;\;\;x\\

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


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

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in z around 0 86.5%

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

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

    if -3.8000000000000001e71 < b < 2.4e33

    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. Add Preprocessing
    3. Taylor expanded in x around inf 20.4%

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

    if 2.4e33 < b

    1. Initial program 85.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.8 \cdot 10^{+71}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+33}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 33.4% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;b \leq 1.02 \cdot 10^{+34}:\\
\;\;\;\;x + z\\

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


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

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in z around 0 86.5%

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

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

    if -1.1499999999999999e75 < b < 1.02e34

    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. Add Preprocessing
    3. Taylor expanded in y around 0 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \left(\color{blue}{b \cdot t} + \left(z + a \cdot \left(1 - t\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-commutative74.7%

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

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

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

    if 1.02e34 < b

    1. Initial program 85.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{+75}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{+34}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 20.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+78}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+62}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -2.1e+78) x (if (<= x 9.5e+62) z x)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -2.1e+78) {
		tmp = x;
	} else if (x <= 9.5e+62) {
		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 <= (-2.1d+78)) then
        tmp = x
    else if (x <= 9.5d+62) 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 <= -2.1e+78) {
		tmp = x;
	} else if (x <= 9.5e+62) {
		tmp = z;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -2.1e+78:
		tmp = x
	elif x <= 9.5e+62:
		tmp = z
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -2.1e+78)
		tmp = x;
	elseif (x <= 9.5e+62)
		tmp = z;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -2.1e+78)
		tmp = x;
	elseif (x <= 9.5e+62)
		tmp = z;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.1e+78], x, If[LessEqual[x, 9.5e+62], z, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+78}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+62}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.1000000000000001e78 or 9.5000000000000003e62 < x

    1. Initial program 92.6%

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

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

    if -2.1000000000000001e78 < x < 9.5000000000000003e62

    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. Add Preprocessing
    3. Taylor expanded in z around inf 34.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+78}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+62}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 15.6% accurate, 21.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 93.7%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification13.9%

    \[\leadsto x \]
  5. Add Preprocessing

Reproduce

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