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

Percentage Accurate: 95.5% → 97.8%
Time: 12.3s
Alternatives: 24
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 24 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + \left(a + t\_2\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) 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
    3. Taylor expanded in t around 0 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) 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 t around 0 31.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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:\\ \;\;\;\;x + \left(\mathsf{fma}\left(t, b - a, b \cdot \left(y + -2\right)\right) + \left(a + z \cdot \left(1 - y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(a + \mathsf{fma}\left(t, b - a, b \cdot \left(y + -2\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 97.5% 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.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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: 98.5% accurate, 0.2× 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}:\\ \;\;\;\;x + \left(a + \mathsf{fma}\left(t, b - a, b \cdot \left(y + -2\right)\right)\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 (+ x (+ a (fma t (- b a) (* b (+ y -2.0))))))))
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 = x + (a + fma(t, (b - a), (b * (y + -2.0))));
	}
	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(x + Float64(a + fma(t, Float64(b - a), Float64(b * Float64(y + -2.0)))));
	end
	return 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[(x + N[(a + N[(t * N[(b - a), $MachinePrecision] + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) 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 #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) 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 t around 0 31.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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}:\\ \;\;\;\;x + \left(a + \mathsf{fma}\left(t, b - a, b \cdot \left(y + -2\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 97.5% 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}:\\ \;\;\;\;x - z \cdot \left(-1 + \left(y + \frac{a \cdot \left(t + -1\right)}{z}\right)\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
     (- x (* z (+ -1.0 (+ y (/ (* a (+ t -1.0)) 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 = x - (z * (-1.0 + (y + ((a * (t + -1.0)) / 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 = x - (z * (-1.0 + (y + ((a * (t + -1.0)) / 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 = x - (z * (-1.0 + (y + ((a * (t + -1.0)) / 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(x - Float64(z * Float64(-1.0 + Float64(y + Float64(Float64(a * Float64(t + -1.0)) / 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 = x - (z * (-1.0 + (y + ((a * (t + -1.0)) / 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[(x - N[(z * N[(-1.0 + N[(y + N[(N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) 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 #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) 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 b around 0 50.0%

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

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

    \[\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}:\\ \;\;\;\;x - z \cdot \left(-1 + \left(y + \frac{a \cdot \left(t + -1\right)}{z}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 46.9% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;t \leq -4.3 \cdot 10^{-148}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 8.6 \cdot 10^{+72}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.79999999999999984e60 or 8.6000000000000003e72 < t

    1. Initial program 88.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 t around inf 72.5%

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

    if -1.79999999999999984e60 < t < -5.99999999999999982e-21

    1. Initial program 95.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 73.1%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv48.9%

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity48.9%

        \[\leadsto x + \color{blue}{z} \]
    7. Simplified48.9%

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

    if -5.99999999999999982e-21 < t < -4.2999999999999998e-148

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2999999999999998e-148 < t < 8.6000000000000003e72

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -6 \cdot 10^{-21}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{-148}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{+72}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 84.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \left(b - z\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.65e17

    1. Initial program 91.8%

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

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

    if -1.65e17 < y < 8.8e16

    1. Initial program 96.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 t around 0 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.8e16 < y

    1. Initial program 89.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 t around 0 89.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -900000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-289}:\\ \;\;\;\;x + \left(z + \left(t + -2\right) \cdot b\right)\\ \mathbf{elif}\;y \leq 225000000000:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\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 -900000000000.0)
     t_1
     (if (<= y -5e-289)
       (+ x (+ z (* (+ t -2.0) b)))
       (if (<= y 225000000000.0) (+ x (+ z (* 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 <= -900000000000.0) {
		tmp = t_1;
	} else if (y <= -5e-289) {
		tmp = x + (z + ((t + -2.0) * b));
	} else if (y <= 225000000000.0) {
		tmp = x + (z + (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 <= (-900000000000.0d0)) then
        tmp = t_1
    else if (y <= (-5d-289)) then
        tmp = x + (z + ((t + (-2.0d0)) * b))
    else if (y <= 225000000000.0d0) then
        tmp = x + (z + (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 <= -900000000000.0) {
		tmp = t_1;
	} else if (y <= -5e-289) {
		tmp = x + (z + ((t + -2.0) * b));
	} else if (y <= 225000000000.0) {
		tmp = x + (z + (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 <= -900000000000.0:
		tmp = t_1
	elif y <= -5e-289:
		tmp = x + (z + ((t + -2.0) * b))
	elif y <= 225000000000.0:
		tmp = x + (z + (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 <= -900000000000.0)
		tmp = t_1;
	elseif (y <= -5e-289)
		tmp = Float64(x + Float64(z + Float64(Float64(t + -2.0) * b)));
	elseif (y <= 225000000000.0)
		tmp = Float64(x + Float64(z + 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 <= -900000000000.0)
		tmp = t_1;
	elseif (y <= -5e-289)
		tmp = x + (z + ((t + -2.0) * b));
	elseif (y <= 225000000000.0)
		tmp = x + (z + (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, -900000000000.0], t$95$1, If[LessEqual[y, -5e-289], N[(x + N[(z + N[(N[(t + -2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 225000000000.0], N[(x + N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9e11 or 2.25e11 < y

    1. Initial program 90.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 inf 73.6%

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

    if -9e11 < y < -5.00000000000000029e-289

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000029e-289 < y < 2.25e11

    1. Initial program 94.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 0 83.2%

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

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

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

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

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

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

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

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

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

Alternative 8: 79.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.8 \cdot 10^{+58} \lor \neg \left(t \leq 1.75 \cdot 10^{-12}\right):\\
\;\;\;\;x + \left(a + \left(t \cdot \left(b - a\right) + y \cdot b\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.8000000000000002e58 or 1.75e-12 < 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 t around 0 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.8000000000000002e58 < t < 1.75e-12

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+88} \lor \neg \left(t \leq 2.8 \cdot 10^{+135}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.59999999999999977e88 or 2.80000000000000002e135 < t

    1. Initial program 84.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 t around inf 79.7%

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

    if -5.59999999999999977e88 < t < 2.80000000000000002e135

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 81.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.45 \cdot 10^{+31}:\\
\;\;\;\;x + \left(a + \left(t \cdot \left(b - a\right) + y \cdot b\right)\right)\\

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

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


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

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\left(t \cdot \left(b - a\right) + b \cdot \left(y + -2\right)\right)} + a\right) \]
    8. Applied egg-rr88.4%

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

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

    if -1.45e31 < b < 1.8500000000000001e54

    1. Initial program 97.9%

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

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

    if 1.8500000000000001e54 < b

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 64.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{+14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-148}:\\ \;\;\;\;x + \left(z + \left(t + -2\right) \cdot b\right)\\ \mathbf{elif}\;y \leq 155000000000:\\ \;\;\;\;x + 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 -7.5e+14)
     t_1
     (if (<= y 1.08e-148)
       (+ x (+ z (* (+ t -2.0) b)))
       (if (<= y 155000000000.0) (+ x (* 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 <= -7.5e+14) {
		tmp = t_1;
	} else if (y <= 1.08e-148) {
		tmp = x + (z + ((t + -2.0) * b));
	} else if (y <= 155000000000.0) {
		tmp = x + (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 <= (-7.5d+14)) then
        tmp = t_1
    else if (y <= 1.08d-148) then
        tmp = x + (z + ((t + (-2.0d0)) * b))
    else if (y <= 155000000000.0d0) then
        tmp = x + (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 <= -7.5e+14) {
		tmp = t_1;
	} else if (y <= 1.08e-148) {
		tmp = x + (z + ((t + -2.0) * b));
	} else if (y <= 155000000000.0) {
		tmp = x + (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 <= -7.5e+14:
		tmp = t_1
	elif y <= 1.08e-148:
		tmp = x + (z + ((t + -2.0) * b))
	elif y <= 155000000000.0:
		tmp = x + (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 <= -7.5e+14)
		tmp = t_1;
	elseif (y <= 1.08e-148)
		tmp = Float64(x + Float64(z + Float64(Float64(t + -2.0) * b)));
	elseif (y <= 155000000000.0)
		tmp = Float64(x + 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 <= -7.5e+14)
		tmp = t_1;
	elseif (y <= 1.08e-148)
		tmp = x + (z + ((t + -2.0) * b));
	elseif (y <= 155000000000.0)
		tmp = x + (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, -7.5e+14], t$95$1, If[LessEqual[y, 1.08e-148], N[(x + N[(z + N[(N[(t + -2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 155000000000.0], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 155000000000:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.5e14 or 1.55e11 < y

    1. Initial program 90.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 inf 73.6%

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

    if -7.5e14 < y < 1.08000000000000006e-148

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(z + \left(b \cdot t + \color{blue}{b \cdot -2}\right)\right) \]
      3. distribute-lft-in74.5%

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

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

    if 1.08000000000000006e-148 < y < 1.55e11

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

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

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

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

Alternative 12: 58.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -12000000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.05 \cdot 10^{-288}:\\ \;\;\;\;x + \left(t + -2\right) \cdot b\\ \mathbf{elif}\;y \leq 225000000000:\\ \;\;\;\;x + 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 -12000000000000.0)
     t_1
     (if (<= y -3.05e-288)
       (+ x (* (+ t -2.0) b))
       (if (<= y 225000000000.0) (+ x (* 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 <= -12000000000000.0) {
		tmp = t_1;
	} else if (y <= -3.05e-288) {
		tmp = x + ((t + -2.0) * b);
	} else if (y <= 225000000000.0) {
		tmp = x + (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 <= (-12000000000000.0d0)) then
        tmp = t_1
    else if (y <= (-3.05d-288)) then
        tmp = x + ((t + (-2.0d0)) * b)
    else if (y <= 225000000000.0d0) then
        tmp = x + (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 <= -12000000000000.0) {
		tmp = t_1;
	} else if (y <= -3.05e-288) {
		tmp = x + ((t + -2.0) * b);
	} else if (y <= 225000000000.0) {
		tmp = x + (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 <= -12000000000000.0:
		tmp = t_1
	elif y <= -3.05e-288:
		tmp = x + ((t + -2.0) * b)
	elif y <= 225000000000.0:
		tmp = x + (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 <= -12000000000000.0)
		tmp = t_1;
	elseif (y <= -3.05e-288)
		tmp = Float64(x + Float64(Float64(t + -2.0) * b));
	elseif (y <= 225000000000.0)
		tmp = Float64(x + 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 <= -12000000000000.0)
		tmp = t_1;
	elseif (y <= -3.05e-288)
		tmp = x + ((t + -2.0) * b);
	elseif (y <= 225000000000.0)
		tmp = x + (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, -12000000000000.0], t$95$1, If[LessEqual[y, -3.05e-288], N[(x + N[(N[(t + -2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 225000000000.0], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 225000000000:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.2e13 or 2.25e11 < y

    1. Initial program 90.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 inf 73.6%

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

    if -1.2e13 < y < -3.04999999999999991e-288

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(b \cdot t + \color{blue}{b \cdot -2}\right) \]
      3. distribute-lft-out62.9%

        \[\leadsto x + \color{blue}{b \cdot \left(t + -2\right)} \]
    10. Simplified62.9%

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

    if -3.04999999999999991e-288 < y < 2.25e11

    1. Initial program 94.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 0 83.2%

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

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

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

Alternative 13: 73.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.2000000000000003e72 or 2.84999999999999994e-62 < b

    1. Initial program 90.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 t around 0 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000003e72 < b < 2.84999999999999994e-62

    1. Initial program 96.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 92.6%

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

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

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

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

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

Alternative 14: 50.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.8 \cdot 10^{+17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.05 \cdot 10^{-290}:\\ \;\;\;\;x + t \cdot b\\ \mathbf{elif}\;y \leq 220000000000:\\ \;\;\;\;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 -1.8e+17)
     t_1
     (if (<= y -3.05e-290)
       (+ x (* t b))
       (if (<= y 220000000000.0) (* 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 <= -1.8e+17) {
		tmp = t_1;
	} else if (y <= -3.05e-290) {
		tmp = x + (t * b);
	} else if (y <= 220000000000.0) {
		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 <= (-1.8d+17)) then
        tmp = t_1
    else if (y <= (-3.05d-290)) then
        tmp = x + (t * b)
    else if (y <= 220000000000.0d0) 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 <= -1.8e+17) {
		tmp = t_1;
	} else if (y <= -3.05e-290) {
		tmp = x + (t * b);
	} else if (y <= 220000000000.0) {
		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 <= -1.8e+17:
		tmp = t_1
	elif y <= -3.05e-290:
		tmp = x + (t * b)
	elif y <= 220000000000.0:
		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 <= -1.8e+17)
		tmp = t_1;
	elseif (y <= -3.05e-290)
		tmp = Float64(x + Float64(t * b));
	elseif (y <= 220000000000.0)
		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 <= -1.8e+17)
		tmp = t_1;
	elseif (y <= -3.05e-290)
		tmp = x + (t * b);
	elseif (y <= 220000000000.0)
		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, -1.8e+17], t$95$1, If[LessEqual[y, -3.05e-290], N[(x + N[(t * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 220000000000.0], 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 -1.8 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.8e17 or 2.2e11 < y

    1. Initial program 90.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 inf 73.6%

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

    if -1.8e17 < y < -3.0499999999999999e-290

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{b \cdot t} \]
    9. Step-by-step derivation
      1. *-commutative48.3%

        \[\leadsto x + \color{blue}{t \cdot b} \]
    10. Simplified48.3%

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

    if -3.0499999999999999e-290 < y < 2.2e11

    1. Initial program 94.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 a around inf 46.4%

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

Alternative 15: 48.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -64000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-186}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 225000000000:\\ \;\;\;\;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 -64000000000.0)
     t_1
     (if (<= y -2.9e-186)
       (+ x z)
       (if (<= y 225000000000.0) (* 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 <= -64000000000.0) {
		tmp = t_1;
	} else if (y <= -2.9e-186) {
		tmp = x + z;
	} else if (y <= 225000000000.0) {
		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 <= (-64000000000.0d0)) then
        tmp = t_1
    else if (y <= (-2.9d-186)) then
        tmp = x + z
    else if (y <= 225000000000.0d0) 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 <= -64000000000.0) {
		tmp = t_1;
	} else if (y <= -2.9e-186) {
		tmp = x + z;
	} else if (y <= 225000000000.0) {
		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 <= -64000000000.0:
		tmp = t_1
	elif y <= -2.9e-186:
		tmp = x + z
	elif y <= 225000000000.0:
		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 <= -64000000000.0)
		tmp = t_1;
	elseif (y <= -2.9e-186)
		tmp = Float64(x + z);
	elseif (y <= 225000000000.0)
		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 <= -64000000000.0)
		tmp = t_1;
	elseif (y <= -2.9e-186)
		tmp = x + z;
	elseif (y <= 225000000000.0)
		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, -64000000000.0], t$95$1, If[LessEqual[y, -2.9e-186], N[(x + z), $MachinePrecision], If[LessEqual[y, 225000000000.0], 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 -64000000000:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.4e10 or 2.25e11 < y

    1. Initial program 90.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 inf 73.6%

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

    if -6.4e10 < y < -2.90000000000000019e-186

    1. Initial program 98.2%

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

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

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

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

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity41.5%

        \[\leadsto x + \color{blue}{z} \]
    7. Simplified41.5%

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

    if -2.90000000000000019e-186 < y < 2.25e11

    1. Initial program 95.9%

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

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

Alternative 16: 32.8% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;b \leq 6.5 \cdot 10^{+71}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.3999999999999998e73 or 6.49999999999999954e71 < b

    1. Initial program 88.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 t around 0 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.3999999999999998e73 < b < -2.50000000000000012e-5

    1. Initial program 83.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 67.7%

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

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

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

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

    if -2.50000000000000012e-5 < b < 6.49999999999999954e71

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.4 \cdot 10^{+73}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-5}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{+71}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 28.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 1.15 \cdot 10^{-216}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 1.02:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.2999999999999997e41 or 1.02 < y

    1. Initial program 89.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 t around 0 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2999999999999997e41 < y < 1.14999999999999998e-216

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

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

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

    if 1.14999999999999998e-216 < y < 1.02

    1. Initial program 97.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.3 \cdot 10^{+41}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-216}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.02:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 59.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+60} \lor \neg \left(t \leq 2.95 \cdot 10^{+82}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.7999999999999999e60 or 2.9499999999999998e82 < t

    1. Initial program 87.5%

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

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

    if -6.7999999999999999e60 < t < 2.9499999999999998e82

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+60} \lor \neg \left(t \leq 2.95 \cdot 10^{+82}\right):\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(a + y \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 58.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+16} \lor \neg \left(y \leq 270000000000\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.2e16 or 2.7e11 < y

    1. Initial program 90.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 inf 74.2%

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

    if -3.2e16 < y < 2.7e11

    1. Initial program 96.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 t around 0 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(b \cdot t + \color{blue}{b \cdot -2}\right) \]
      3. distribute-lft-out54.1%

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

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

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

Alternative 20: 41.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+58} \lor \neg \left(a \leq 5.7 \cdot 10^{+47}\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.9999999999999995e58 or 5.6999999999999997e47 < a

    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 a around inf 60.5%

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

    if -6.9999999999999995e58 < a < 5.6999999999999997e47

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv31.1%

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity31.1%

        \[\leadsto x + \color{blue}{z} \]
    7. Simplified31.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+58} \lor \neg \left(a \leq 5.7 \cdot 10^{+47}\right):\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 33.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{+73} \lor \neg \left(b \leq 9.5 \cdot 10^{+65}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.20000000000000001e73 or 9.5000000000000005e65 < b

    1. Initial program 88.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 t around 0 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000001e73 < b < 9.5000000000000005e65

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.2 \cdot 10^{+73} \lor \neg \left(b \leq 9.5 \cdot 10^{+65}\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 27.0% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+30} \lor \neg \left(y \leq 1.02\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.2e30 or 1.02 < y

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.2e30 < y < 1.02

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+30} \lor \neg \left(y \leq 1.02\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 21.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+71}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 4 \cdot 10^{+64}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.7999999999999997e71 or 4.00000000000000009e64 < x

    1. Initial program 94.7%

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

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

    if -6.7999999999999997e71 < x < 4.00000000000000009e64

    1. Initial program 93.2%

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

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

      \[\leadsto \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 24: 10.9% accurate, 21.0× speedup?

\[\begin{array}{l} \\ a \end{array} \]
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
	return a;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return a;
}
def code(x, y, z, t, a, b):
	return a
function code(x, y, z, t, a, b)
	return a
end
function tmp = code(x, y, z, t, a, b)
	tmp = a;
end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}

\\
a
\end{array}
Derivation
  1. Initial program 93.7%

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

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

    \[\leadsto \color{blue}{a} \]
  5. Add Preprocessing

Reproduce

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