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

Percentage Accurate: 95.2% → 98.3%
Time: 11.4s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 95.2% accurate, 1.0× speedup?

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

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

Alternative 1: 98.3% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)}{a} - t, a, a\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 a around -inf

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

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

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

Alternative 2: 98.3% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\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 a around 0

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

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

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

Alternative 3: 85.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.08 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\ \mathbf{elif}\;y \leq 1.06 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, \mathsf{fma}\left(1 - t, a, z\right) + x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.08e+15)
   (fma (- 1.0 t) a (fma (- (+ t y) 2.0) b x))
   (if (<= y 1.06e+15)
     (fma (- t 2.0) b (+ (fma (- 1.0 t) a z) x))
     (fma (- b z) y (fma (- t 2.0) b (+ z x))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.08e+15) {
		tmp = fma((1.0 - t), a, fma(((t + y) - 2.0), b, x));
	} else if (y <= 1.06e+15) {
		tmp = fma((t - 2.0), b, (fma((1.0 - t), a, z) + x));
	} else {
		tmp = fma((b - z), y, fma((t - 2.0), b, (z + x)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.08e+15)
		tmp = fma(Float64(1.0 - t), a, fma(Float64(Float64(t + y) - 2.0), b, x));
	elseif (y <= 1.06e+15)
		tmp = fma(Float64(t - 2.0), b, Float64(fma(Float64(1.0 - t), a, z) + x));
	else
		tmp = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, Float64(z + x)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.08e+15], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e+15], N[(N[(t - 2.0), $MachinePrecision] * b + N[(N[(N[(1.0 - t), $MachinePrecision] * a + z), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\

\mathbf{elif}\;y \leq 1.06 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, \mathsf{fma}\left(1 - t, a, z\right) + x\right)\\

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


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

    1. Initial program 89.1%

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

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

        \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      4. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
      7. mul-1-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      14. lower--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
      17. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
      18. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
      19. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
      20. lower-+.f6481.7

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

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

    if -1.08e15 < y < 1.06e15

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

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

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

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)} \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(b \cdot \left(t - 2\right) + x\right)} + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right) \]
      3. associate-+l+N/A

        \[\leadsto \color{blue}{b \cdot \left(t - 2\right) + \left(x + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{\left(t - 2\right) \cdot b} + \left(x + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right)\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - 2, b, x + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right)\right)} \]
      6. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{t - 2}, b, x + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right)\right) \]
      7. lower-+.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \color{blue}{\left(\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)}\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)\right) \]
      11. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\left(\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right) \cdot a + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)\right) \]
      13. metadata-evalN/A

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

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\left(\left(\mathsf{neg}\left(t\right)\right) + \color{blue}{1}\right) \cdot a + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot a + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)\right) \]
      17. sub-negN/A

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\color{blue}{\left(1 - t\right)} \cdot a + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)\right) \]
      18. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\left(1 - t\right) \cdot a + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
      19. remove-double-negN/A

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

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

    if 1.06e15 < y

    1. Initial program 96.0%

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

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

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

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

Alternative 4: 86.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+158}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6500000000000001e157 or 3.9e158 < z

    1. Initial program 90.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 a around 0

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

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

    if -1.6500000000000001e157 < z < 3.9e158

    1. Initial program 97.4%

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

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

        \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      4. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
      7. mul-1-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      14. lower--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
      17. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
      18. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
      19. +-commutativeN/A

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

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

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

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

Alternative 5: 84.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{+123}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.25000000000000007e208 or 2.44999999999999988e123 < z

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

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

        \[\leadsto x - \color{blue}{\left(z \cdot \left(y - 1\right) + a \cdot \left(t - 1\right)\right)} \]
      2. associate--r+N/A

        \[\leadsto \color{blue}{\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)} \]
      3. sub-negN/A

        \[\leadsto \color{blue}{\left(x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)} - a \cdot \left(t - 1\right) \]
      4. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x\right)} - a \cdot \left(t - 1\right) \]
      5. associate-+r-N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + \left(x - a \cdot \left(t - 1\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - 1\right) \cdot z}\right)\right) + \left(x - a \cdot \left(t - 1\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z} + \left(x - a \cdot \left(t - 1\right)\right) \]
      8. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} \cdot z + \left(x - a \cdot \left(t - 1\right)\right) \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - 1\right), z, x - a \cdot \left(t - 1\right)\right)} \]
      10. sub-negN/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(1\right)\right)\right)}, z, x - a \cdot \left(t - 1\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(y + \color{blue}{-1}\right), z, x - a \cdot \left(t - 1\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot \color{blue}{\left(-1 + y\right)}, z, x - a \cdot \left(t - 1\right)\right) \]
      13. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot -1 + -1 \cdot y}, z, x - a \cdot \left(t - 1\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1} + -1 \cdot y, z, x - a \cdot \left(t - 1\right)\right) \]
      15. neg-mul-1N/A

        \[\leadsto \mathsf{fma}\left(1 + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, z, x - a \cdot \left(t - 1\right)\right) \]
      16. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - y}, z, x - a \cdot \left(t - 1\right)\right) \]
      17. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - y}, z, x - a \cdot \left(t - 1\right)\right) \]
      18. sub-negN/A

        \[\leadsto \mathsf{fma}\left(1 - y, z, \color{blue}{x + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)}\right) \]
      19. +-commutativeN/A

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

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

    if -2.25000000000000007e208 < z < 2.44999999999999988e123

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

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

        \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      4. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
      7. mul-1-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      14. lower--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
      17. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
      18. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
      19. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
      20. lower-+.f6491.3

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+208}:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+123}:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 43.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot z\\ \mathbf{if}\;z \leq -8 \cdot 10^{+167}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-44}:\\ \;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\ \mathbf{elif}\;z \leq 0.00115:\\ \;\;\;\;\left(t - 2\right) \cdot b\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+145}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- 1.0 y) z)))
   (if (<= z -8e+167)
     t_1
     (if (<= z 7.5e-44)
       (fma (- t) a x)
       (if (<= z 0.00115)
         (* (- t 2.0) b)
         (if (<= z 6.8e+145) (* (- 1.0 t) a) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (1.0 - y) * z;
	double tmp;
	if (z <= -8e+167) {
		tmp = t_1;
	} else if (z <= 7.5e-44) {
		tmp = fma(-t, a, x);
	} else if (z <= 0.00115) {
		tmp = (t - 2.0) * b;
	} else if (z <= 6.8e+145) {
		tmp = (1.0 - t) * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(1.0 - y) * z)
	tmp = 0.0
	if (z <= -8e+167)
		tmp = t_1;
	elseif (z <= 7.5e-44)
		tmp = fma(Float64(-t), a, x);
	elseif (z <= 0.00115)
		tmp = Float64(Float64(t - 2.0) * b);
	elseif (z <= 6.8e+145)
		tmp = Float64(Float64(1.0 - t) * a);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -8e+167], t$95$1, If[LessEqual[z, 7.5e-44], N[((-t) * a + x), $MachinePrecision], If[LessEqual[z, 0.00115], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 6.8e+145], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-44}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\

\mathbf{elif}\;z \leq 0.00115:\\
\;\;\;\;\left(t - 2\right) \cdot b\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.0000000000000003e167 or 6.7999999999999998e145 < z

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

      \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
      2. sub-negN/A

        \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right)} \cdot z \]
      3. metadata-evalN/A

        \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} + \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z \]
      4. distribute-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 + y\right)\right)\right)} \cdot z \]
      5. +-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y + -1\right)}\right)\right) \cdot z \]
      6. metadata-evalN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(y + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right)\right) \cdot z \]
      7. sub-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - 1\right)}\right)\right) \cdot z \]
      8. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} \cdot z \]
      9. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - 1\right)\right) \cdot z} \]
      10. sub-negN/A

        \[\leadsto \left(-1 \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) \cdot z \]
      11. metadata-evalN/A

        \[\leadsto \left(-1 \cdot \left(y + \color{blue}{-1}\right)\right) \cdot z \]
      12. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \color{blue}{\left(-1 + y\right)}\right) \cdot z \]
      13. distribute-lft-inN/A

        \[\leadsto \color{blue}{\left(-1 \cdot -1 + -1 \cdot y\right)} \cdot z \]
      14. metadata-evalN/A

        \[\leadsto \left(\color{blue}{1} + -1 \cdot y\right) \cdot z \]
      15. neg-mul-1N/A

        \[\leadsto \left(1 + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \cdot z \]
      16. sub-negN/A

        \[\leadsto \color{blue}{\left(1 - y\right)} \cdot z \]
      17. lower--.f6468.0

        \[\leadsto \color{blue}{\left(1 - y\right)} \cdot z \]
    5. Applied rewrites68.0%

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

    if -8.0000000000000003e167 < z < 7.50000000000000008e-44

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

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

        \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      4. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
      7. mul-1-negN/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      14. lower--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
      17. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
      18. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
      19. +-commutativeN/A

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

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

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

      \[\leadsto x + \color{blue}{a \cdot \left(1 - t\right)} \]
    7. Step-by-step derivation
      1. Applied rewrites58.4%

        \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
      2. Taylor expanded in t around inf

        \[\leadsto \mathsf{fma}\left(-1 \cdot t, a, x\right) \]
      3. Step-by-step derivation
        1. Applied rewrites46.1%

          \[\leadsto \mathsf{fma}\left(-t, a, x\right) \]

        if 7.50000000000000008e-44 < z < 0.00115

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

          \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
          3. lower--.f64N/A

            \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right)} \cdot b \]
          4. +-commutativeN/A

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

            \[\leadsto \left(\color{blue}{\left(y + t\right)} - 2\right) \cdot b \]
        5. Applied rewrites76.5%

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

          \[\leadsto \left(t - 2\right) \cdot b \]
        7. Step-by-step derivation
          1. Applied rewrites75.5%

            \[\leadsto \left(t - 2\right) \cdot b \]

          if 0.00115 < z < 6.7999999999999998e145

          1. Initial program 93.8%

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

            \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
            2. sub-negN/A

              \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot a \]
            3. metadata-evalN/A

              \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a \]
            4. distribute-neg-inN/A

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 + t\right)\right)\right)} \cdot a \]
            5. +-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t + -1\right)}\right)\right) \cdot a \]
            6. metadata-evalN/A

              \[\leadsto \left(\mathsf{neg}\left(\left(t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right)\right) \cdot a \]
            7. sub-negN/A

              \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right)}\right)\right) \cdot a \]
            8. mul-1-negN/A

              \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a \]
            9. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right) \cdot a} \]
            10. mul-1-negN/A

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} \cdot a \]
            11. sub-negN/A

              \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right) \cdot a \]
            12. metadata-evalN/A

              \[\leadsto \left(\mathsf{neg}\left(\left(t + \color{blue}{-1}\right)\right)\right) \cdot a \]
            13. +-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(-1 + t\right)}\right)\right) \cdot a \]
            14. distribute-neg-inN/A

              \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(-1\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot a \]
            15. metadata-evalN/A

              \[\leadsto \left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a \]
            16. sub-negN/A

              \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
            17. lower--.f6451.2

              \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
          5. Applied rewrites51.2%

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

        Alternative 7: 66.5% accurate, 1.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -5 \cdot 10^{+32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+32}:\\ \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (* (- b a) t)))
           (if (<= t -5e+32)
             t_1
             (if (<= t -4.4e-5)
               (fma (- 1.0 y) z x)
               (if (<= t 6.6e+32) (+ (fma (- y 2.0) b x) a) t_1)))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = (b - a) * t;
        	double tmp;
        	if (t <= -5e+32) {
        		tmp = t_1;
        	} else if (t <= -4.4e-5) {
        		tmp = fma((1.0 - y), z, x);
        	} else if (t <= 6.6e+32) {
        		tmp = fma((y - 2.0), b, x) + a;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(Float64(b - a) * t)
        	tmp = 0.0
        	if (t <= -5e+32)
        		tmp = t_1;
        	elseif (t <= -4.4e-5)
        		tmp = fma(Float64(1.0 - y), z, x);
        	elseif (t <= 6.6e+32)
        		tmp = Float64(fma(Float64(y - 2.0), b, x) + a);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5e+32], t$95$1, If[LessEqual[t, -4.4e-5], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, 6.6e+32], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left(b - a\right) \cdot t\\
        \mathbf{if}\;t \leq -5 \cdot 10^{+32}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq -4.4 \cdot 10^{-5}:\\
        \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
        
        \mathbf{elif}\;t \leq 6.6 \cdot 10^{+32}:\\
        \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -4.9999999999999997e32 or 6.60000000000000039e32 < t

          1. Initial program 92.6%

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

            \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
            2. lower-*.f64N/A

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

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

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

          if -4.9999999999999997e32 < t < -4.3999999999999999e-5

          1. Initial program 100.0%

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

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

              \[\leadsto x - \color{blue}{\left(z \cdot \left(y - 1\right) + a \cdot \left(t - 1\right)\right)} \]
            2. associate--r+N/A

              \[\leadsto \color{blue}{\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)} \]
            3. sub-negN/A

              \[\leadsto \color{blue}{\left(x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)} - a \cdot \left(t - 1\right) \]
            4. +-commutativeN/A

              \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x\right)} - a \cdot \left(t - 1\right) \]
            5. associate-+r-N/A

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + \left(x - a \cdot \left(t - 1\right)\right)} \]
            6. *-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - 1\right) \cdot z}\right)\right) + \left(x - a \cdot \left(t - 1\right)\right) \]
            7. distribute-lft-neg-inN/A

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z} + \left(x - a \cdot \left(t - 1\right)\right) \]
            8. mul-1-negN/A

              \[\leadsto \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} \cdot z + \left(x - a \cdot \left(t - 1\right)\right) \]
            9. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - 1\right), z, x - a \cdot \left(t - 1\right)\right)} \]
            10. sub-negN/A

              \[\leadsto \mathsf{fma}\left(-1 \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(1\right)\right)\right)}, z, x - a \cdot \left(t - 1\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(-1 \cdot \left(y + \color{blue}{-1}\right), z, x - a \cdot \left(t - 1\right)\right) \]
            12. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(-1 \cdot \color{blue}{\left(-1 + y\right)}, z, x - a \cdot \left(t - 1\right)\right) \]
            13. distribute-lft-inN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot -1 + -1 \cdot y}, z, x - a \cdot \left(t - 1\right)\right) \]
            14. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{1} + -1 \cdot y, z, x - a \cdot \left(t - 1\right)\right) \]
            15. neg-mul-1N/A

              \[\leadsto \mathsf{fma}\left(1 + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, z, x - a \cdot \left(t - 1\right)\right) \]
            16. sub-negN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{1 - y}, z, x - a \cdot \left(t - 1\right)\right) \]
            17. lower--.f64N/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{1 - y}, z, x - a \cdot \left(t - 1\right)\right) \]
            18. sub-negN/A

              \[\leadsto \mathsf{fma}\left(1 - y, z, \color{blue}{x + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)}\right) \]
            19. +-commutativeN/A

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

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

            \[\leadsto x + \color{blue}{z \cdot \left(1 - y\right)} \]
          7. Step-by-step derivation
            1. Applied rewrites66.6%

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

            if -4.3999999999999999e-5 < t < 6.60000000000000039e32

            1. Initial program 97.7%

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

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

                \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
              2. +-commutativeN/A

                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
              3. *-commutativeN/A

                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
              4. distribute-lft-neg-inN/A

                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
              5. mul-1-negN/A

                \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
              6. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
              7. mul-1-negN/A

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
              13. sub-negN/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
              14. lower--.f64N/A

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

                \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
              16. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
              17. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
              18. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
              19. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
              20. lower-+.f6475.7

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

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

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

                \[\leadsto \mathsf{fma}\left(y - 2, b, x\right) + \color{blue}{a} \]
            8. Recombined 3 regimes into one program.
            9. Add Preprocessing

            Alternative 8: 80.0% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\ \mathbf{if}\;b \leq -7 \cdot 10^{+220}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{+126}:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (fma (- (+ t y) 2.0) b x)))
               (if (<= b -7e+220)
                 t_1
                 (if (<= b 4.6e+126) (fma (- 1.0 y) z (fma (- 1.0 t) a x)) t_1))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = fma(((t + y) - 2.0), b, x);
            	double tmp;
            	if (b <= -7e+220) {
            		tmp = t_1;
            	} else if (b <= 4.6e+126) {
            		tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b)
            	t_1 = fma(Float64(Float64(t + y) - 2.0), b, x)
            	tmp = 0.0
            	if (b <= -7e+220)
            		tmp = t_1;
            	elseif (b <= 4.6e+126)
            		tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -7e+220], t$95$1, If[LessEqual[b, 4.6e+126], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
            \mathbf{if}\;b \leq -7 \cdot 10^{+220}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;b \leq 4.6 \cdot 10^{+126}:\\
            \;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if b < -6.99999999999999972e220 or 4.6000000000000001e126 < b

              1. Initial program 89.4%

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

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

                  \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                2. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                3. *-commutativeN/A

                  \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                4. distribute-lft-neg-inN/A

                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                5. mul-1-negN/A

                  \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                6. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                7. mul-1-negN/A

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                13. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                14. lower--.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                16. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                17. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                18. lower--.f64N/A

                  \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                19. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
                20. lower-+.f6494.0

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

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

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

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

                if -6.99999999999999972e220 < b < 4.6000000000000001e126

                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

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

                    \[\leadsto x - \color{blue}{\left(z \cdot \left(y - 1\right) + a \cdot \left(t - 1\right)\right)} \]
                  2. associate--r+N/A

                    \[\leadsto \color{blue}{\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)} \]
                  3. sub-negN/A

                    \[\leadsto \color{blue}{\left(x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)} - a \cdot \left(t - 1\right) \]
                  4. +-commutativeN/A

                    \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x\right)} - a \cdot \left(t - 1\right) \]
                  5. associate-+r-N/A

                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + \left(x - a \cdot \left(t - 1\right)\right)} \]
                  6. *-commutativeN/A

                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - 1\right) \cdot z}\right)\right) + \left(x - a \cdot \left(t - 1\right)\right) \]
                  7. distribute-lft-neg-inN/A

                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - 1\right)\right)\right) \cdot z} + \left(x - a \cdot \left(t - 1\right)\right) \]
                  8. mul-1-negN/A

                    \[\leadsto \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} \cdot z + \left(x - a \cdot \left(t - 1\right)\right) \]
                  9. lower-fma.f64N/A

                    \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - 1\right), z, x - a \cdot \left(t - 1\right)\right)} \]
                  10. sub-negN/A

                    \[\leadsto \mathsf{fma}\left(-1 \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(1\right)\right)\right)}, z, x - a \cdot \left(t - 1\right)\right) \]
                  11. metadata-evalN/A

                    \[\leadsto \mathsf{fma}\left(-1 \cdot \left(y + \color{blue}{-1}\right), z, x - a \cdot \left(t - 1\right)\right) \]
                  12. +-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(-1 \cdot \color{blue}{\left(-1 + y\right)}, z, x - a \cdot \left(t - 1\right)\right) \]
                  13. distribute-lft-inN/A

                    \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot -1 + -1 \cdot y}, z, x - a \cdot \left(t - 1\right)\right) \]
                  14. metadata-evalN/A

                    \[\leadsto \mathsf{fma}\left(\color{blue}{1} + -1 \cdot y, z, x - a \cdot \left(t - 1\right)\right) \]
                  15. neg-mul-1N/A

                    \[\leadsto \mathsf{fma}\left(1 + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, z, x - a \cdot \left(t - 1\right)\right) \]
                  16. sub-negN/A

                    \[\leadsto \mathsf{fma}\left(\color{blue}{1 - y}, z, x - a \cdot \left(t - 1\right)\right) \]
                  17. lower--.f64N/A

                    \[\leadsto \mathsf{fma}\left(\color{blue}{1 - y}, z, x - a \cdot \left(t - 1\right)\right) \]
                  18. sub-negN/A

                    \[\leadsto \mathsf{fma}\left(1 - y, z, \color{blue}{x + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)}\right) \]
                  19. +-commutativeN/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)} \]
              8. Recombined 2 regimes into one program.
              9. Add Preprocessing

              Alternative 9: 41.4% accurate, 1.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - 2\right) \cdot b\\ \mathbf{if}\;b \leq -6 \cdot 10^{+169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-258}:\\ \;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+94}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (* (- t 2.0) b)))
                 (if (<= b -6e+169)
                   t_1
                   (if (<= b 8e-258)
                     (fma (- t) a x)
                     (if (<= b 1.2e+94) (* (- 1.0 t) a) t_1)))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = (t - 2.0) * b;
              	double tmp;
              	if (b <= -6e+169) {
              		tmp = t_1;
              	} else if (b <= 8e-258) {
              		tmp = fma(-t, a, x);
              	} else if (b <= 1.2e+94) {
              		tmp = (1.0 - t) * a;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b)
              	t_1 = Float64(Float64(t - 2.0) * b)
              	tmp = 0.0
              	if (b <= -6e+169)
              		tmp = t_1;
              	elseif (b <= 8e-258)
              		tmp = fma(Float64(-t), a, x);
              	elseif (b <= 1.2e+94)
              		tmp = Float64(Float64(1.0 - t) * a);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -6e+169], t$95$1, If[LessEqual[b, 8e-258], N[((-t) * a + x), $MachinePrecision], If[LessEqual[b, 1.2e+94], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left(t - 2\right) \cdot b\\
              \mathbf{if}\;b \leq -6 \cdot 10^{+169}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;b \leq 8 \cdot 10^{-258}:\\
              \;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
              
              \mathbf{elif}\;b \leq 1.2 \cdot 10^{+94}:\\
              \;\;\;\;\left(1 - t\right) \cdot a\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if b < -5.9999999999999999e169 or 1.19999999999999991e94 < b

                1. Initial program 88.8%

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

                  \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
                  3. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right)} \cdot b \]
                  4. +-commutativeN/A

                    \[\leadsto \left(\color{blue}{\left(y + t\right)} - 2\right) \cdot b \]
                  5. lower-+.f6482.0

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

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

                  \[\leadsto \left(t - 2\right) \cdot b \]
                7. Step-by-step derivation
                  1. Applied rewrites52.9%

                    \[\leadsto \left(t - 2\right) \cdot b \]

                  if -5.9999999999999999e169 < b < 7.99999999999999963e-258

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

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

                      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                    2. +-commutativeN/A

                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                    3. *-commutativeN/A

                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    4. distribute-lft-neg-inN/A

                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    5. mul-1-negN/A

                      \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    6. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                    7. mul-1-negN/A

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    13. sub-negN/A

                      \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    14. lower--.f64N/A

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

                      \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                    16. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                    17. lower-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                    18. lower--.f64N/A

                      \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                    19. +-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
                    20. lower-+.f6475.9

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

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

                    \[\leadsto x + \color{blue}{a \cdot \left(1 - t\right)} \]
                  7. Step-by-step derivation
                    1. Applied rewrites64.4%

                      \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                    2. Taylor expanded in t around inf

                      \[\leadsto \mathsf{fma}\left(-1 \cdot t, a, x\right) \]
                    3. Step-by-step derivation
                      1. Applied rewrites51.6%

                        \[\leadsto \mathsf{fma}\left(-t, a, x\right) \]

                      if 7.99999999999999963e-258 < b < 1.19999999999999991e94

                      1. Initial program 100.0%

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

                        \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                        2. sub-negN/A

                          \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot a \]
                        3. metadata-evalN/A

                          \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a \]
                        4. distribute-neg-inN/A

                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 + t\right)\right)\right)} \cdot a \]
                        5. +-commutativeN/A

                          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t + -1\right)}\right)\right) \cdot a \]
                        6. metadata-evalN/A

                          \[\leadsto \left(\mathsf{neg}\left(\left(t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right)\right) \cdot a \]
                        7. sub-negN/A

                          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right)}\right)\right) \cdot a \]
                        8. mul-1-negN/A

                          \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a \]
                        9. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right) \cdot a} \]
                        10. mul-1-negN/A

                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} \cdot a \]
                        11. sub-negN/A

                          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right) \cdot a \]
                        12. metadata-evalN/A

                          \[\leadsto \left(\mathsf{neg}\left(\left(t + \color{blue}{-1}\right)\right)\right) \cdot a \]
                        13. +-commutativeN/A

                          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(-1 + t\right)}\right)\right) \cdot a \]
                        14. distribute-neg-inN/A

                          \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(-1\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot a \]
                        15. metadata-evalN/A

                          \[\leadsto \left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a \]
                        16. sub-negN/A

                          \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                        17. lower--.f6448.2

                          \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                      5. Applied rewrites48.2%

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

                    Alternative 10: 35.4% accurate, 1.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-a\right) \cdot t\\ \mathbf{if}\;t \leq -4.7 \cdot 10^{+264}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+92}:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-8}:\\ \;\;\;\;a + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (let* ((t_1 (* (- a) t)))
                       (if (<= t -4.7e+264)
                         t_1
                         (if (<= t -5.2e+92) (* b t) (if (<= t 2.3e-8) (+ a x) t_1)))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = -a * t;
                    	double tmp;
                    	if (t <= -4.7e+264) {
                    		tmp = t_1;
                    	} else if (t <= -5.2e+92) {
                    		tmp = b * t;
                    	} else if (t <= 2.3e-8) {
                    		tmp = a + x;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z, t, a, b)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = -a * t
                        if (t <= (-4.7d+264)) then
                            tmp = t_1
                        else if (t <= (-5.2d+92)) then
                            tmp = b * t
                        else if (t <= 2.3d-8) then
                            tmp = a + x
                        else
                            tmp = t_1
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = -a * t;
                    	double tmp;
                    	if (t <= -4.7e+264) {
                    		tmp = t_1;
                    	} else if (t <= -5.2e+92) {
                    		tmp = b * t;
                    	} else if (t <= 2.3e-8) {
                    		tmp = a + x;
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	t_1 = -a * t
                    	tmp = 0
                    	if t <= -4.7e+264:
                    		tmp = t_1
                    	elif t <= -5.2e+92:
                    		tmp = b * t
                    	elif t <= 2.3e-8:
                    		tmp = a + x
                    	else:
                    		tmp = t_1
                    	return tmp
                    
                    function code(x, y, z, t, a, b)
                    	t_1 = Float64(Float64(-a) * t)
                    	tmp = 0.0
                    	if (t <= -4.7e+264)
                    		tmp = t_1;
                    	elseif (t <= -5.2e+92)
                    		tmp = Float64(b * t);
                    	elseif (t <= 2.3e-8)
                    		tmp = Float64(a + x);
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b)
                    	t_1 = -a * t;
                    	tmp = 0.0;
                    	if (t <= -4.7e+264)
                    		tmp = t_1;
                    	elseif (t <= -5.2e+92)
                    		tmp = b * t;
                    	elseif (t <= 2.3e-8)
                    		tmp = a + x;
                    	else
                    		tmp = t_1;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) * t), $MachinePrecision]}, If[LessEqual[t, -4.7e+264], t$95$1, If[LessEqual[t, -5.2e+92], N[(b * t), $MachinePrecision], If[LessEqual[t, 2.3e-8], N[(a + x), $MachinePrecision], t$95$1]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(-a\right) \cdot t\\
                    \mathbf{if}\;t \leq -4.7 \cdot 10^{+264}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t \leq -5.2 \cdot 10^{+92}:\\
                    \;\;\;\;b \cdot t\\
                    
                    \mathbf{elif}\;t \leq 2.3 \cdot 10^{-8}:\\
                    \;\;\;\;a + x\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if t < -4.6999999999999996e264 or 2.3000000000000001e-8 < t

                      1. Initial program 94.5%

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

                        \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                        2. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                        3. lower--.f6479.5

                          \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
                      5. Applied rewrites79.5%

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

                        \[\leadsto \left(-1 \cdot a\right) \cdot t \]
                      7. Step-by-step derivation
                        1. Applied rewrites55.2%

                          \[\leadsto \left(-a\right) \cdot t \]

                        if -4.6999999999999996e264 < t < -5.1999999999999998e92

                        1. Initial program 94.6%

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

                          \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
                          2. lower-*.f64N/A

                            \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
                          3. lower--.f64N/A

                            \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right)} \cdot b \]
                          4. +-commutativeN/A

                            \[\leadsto \left(\color{blue}{\left(y + t\right)} - 2\right) \cdot b \]
                          5. lower-+.f6454.4

                            \[\leadsto \left(\color{blue}{\left(y + t\right)} - 2\right) \cdot b \]
                        5. Applied rewrites54.4%

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

                          \[\leadsto b \cdot \color{blue}{t} \]
                        7. Step-by-step derivation
                          1. Applied rewrites49.4%

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

                          if -5.1999999999999998e92 < t < 2.3000000000000001e-8

                          1. Initial program 96.6%

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

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

                              \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                            2. +-commutativeN/A

                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                            3. *-commutativeN/A

                              \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                            4. distribute-lft-neg-inN/A

                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                            5. mul-1-negN/A

                              \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                            6. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                            7. mul-1-negN/A

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                            13. sub-negN/A

                              \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                            14. lower--.f64N/A

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

                              \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                            16. *-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                            17. lower-fma.f64N/A

                              \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                            18. lower--.f64N/A

                              \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                            19. +-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
                            20. lower-+.f6473.5

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

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

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

                              \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                            2. Taylor expanded in t around 0

                              \[\leadsto a + x \]
                            3. Step-by-step derivation
                              1. Applied rewrites40.6%

                                \[\leadsto a + x \]
                            4. Recombined 3 regimes into one program.
                            5. Add Preprocessing

                            Alternative 11: 69.1% accurate, 1.5× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\ \mathbf{if}\;b \leq -5.9 \cdot 10^{+169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 7:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, z\right) + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (let* ((t_1 (fma (- (+ t y) 2.0) b x)))
                               (if (<= b -5.9e+169) t_1 (if (<= b 7.0) (+ (fma (- 1.0 t) a z) x) t_1))))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double t_1 = fma(((t + y) - 2.0), b, x);
                            	double tmp;
                            	if (b <= -5.9e+169) {
                            		tmp = t_1;
                            	} else if (b <= 7.0) {
                            		tmp = fma((1.0 - t), a, z) + x;
                            	} else {
                            		tmp = t_1;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z, t, a, b)
                            	t_1 = fma(Float64(Float64(t + y) - 2.0), b, x)
                            	tmp = 0.0
                            	if (b <= -5.9e+169)
                            		tmp = t_1;
                            	elseif (b <= 7.0)
                            		tmp = Float64(fma(Float64(1.0 - t), a, z) + x);
                            	else
                            		tmp = t_1;
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -5.9e+169], t$95$1, If[LessEqual[b, 7.0], N[(N[(N[(1.0 - t), $MachinePrecision] * a + z), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
                            \mathbf{if}\;b \leq -5.9 \cdot 10^{+169}:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{elif}\;b \leq 7:\\
                            \;\;\;\;\mathsf{fma}\left(1 - t, a, z\right) + x\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_1\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if b < -5.9e169 or 7 < b

                              1. Initial program 91.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 z around 0

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

                                  \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                2. +-commutativeN/A

                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                3. *-commutativeN/A

                                  \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                4. distribute-lft-neg-inN/A

                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                5. mul-1-negN/A

                                  \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                6. lower-fma.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                7. mul-1-negN/A

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                13. sub-negN/A

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                14. lower--.f64N/A

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

                                  \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                16. *-commutativeN/A

                                  \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                                17. lower-fma.f64N/A

                                  \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                                18. lower--.f64N/A

                                  \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                                19. +-commutativeN/A

                                  \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
                                20. lower-+.f6486.0

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

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

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

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

                                if -5.9e169 < b < 7

                                1. Initial program 98.7%

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

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

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

                                  \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)} \]
                                6. Step-by-step derivation
                                  1. sub-negN/A

                                    \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right)} \]
                                  2. +-commutativeN/A

                                    \[\leadsto \color{blue}{\left(b \cdot \left(t - 2\right) + x\right)} + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right) \]
                                  3. associate-+l+N/A

                                    \[\leadsto \color{blue}{b \cdot \left(t - 2\right) + \left(x + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right)\right)} \]
                                  4. *-commutativeN/A

                                    \[\leadsto \color{blue}{\left(t - 2\right) \cdot b} + \left(x + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right)\right) \]
                                  5. lower-fma.f64N/A

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(t - 2, b, x + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right)\right)} \]
                                  6. lower--.f64N/A

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{t - 2}, b, x + \left(\mathsf{neg}\left(\left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right)\right)\right) \]
                                  7. lower-+.f64N/A

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

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

                                    \[\leadsto \mathsf{fma}\left(t - 2, b, x + \color{blue}{\left(\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)}\right) \]
                                  10. *-commutativeN/A

                                    \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)\right) \]
                                  11. distribute-lft-neg-inN/A

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

                                    \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\left(\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right) \cdot a + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)\right) \]
                                  13. metadata-evalN/A

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

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

                                    \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\left(\left(\mathsf{neg}\left(t\right)\right) + \color{blue}{1}\right) \cdot a + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)\right) \]
                                  16. +-commutativeN/A

                                    \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot a + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)\right) \]
                                  17. sub-negN/A

                                    \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\color{blue}{\left(1 - t\right)} \cdot a + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right)\right) \]
                                  18. mul-1-negN/A

                                    \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\left(1 - t\right) \cdot a + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
                                  19. remove-double-negN/A

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

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

                                  \[\leadsto x + \color{blue}{\left(z + a \cdot \left(1 - t\right)\right)} \]
                                9. Step-by-step derivation
                                  1. Applied rewrites73.8%

                                    \[\leadsto \mathsf{fma}\left(1 - t, a, z\right) + \color{blue}{x} \]
                                10. Recombined 2 regimes into one program.
                                11. Add Preprocessing

                                Alternative 12: 58.9% accurate, 1.5× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{if}\;b \leq -5.9 \cdot 10^{+169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 7:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b)
                                 :precision binary64
                                 (let* ((t_1 (* b (- (+ t y) 2.0))))
                                   (if (<= b -5.9e+169) t_1 (if (<= b 7.0) (fma (- 1.0 t) a x) t_1))))
                                double code(double x, double y, double z, double t, double a, double b) {
                                	double t_1 = b * ((t + y) - 2.0);
                                	double tmp;
                                	if (b <= -5.9e+169) {
                                		tmp = t_1;
                                	} else if (b <= 7.0) {
                                		tmp = fma((1.0 - t), a, x);
                                	} else {
                                		tmp = t_1;
                                	}
                                	return tmp;
                                }
                                
                                function code(x, y, z, t, a, b)
                                	t_1 = Float64(b * Float64(Float64(t + y) - 2.0))
                                	tmp = 0.0
                                	if (b <= -5.9e+169)
                                		tmp = t_1;
                                	elseif (b <= 7.0)
                                		tmp = fma(Float64(1.0 - t), a, x);
                                	else
                                		tmp = t_1;
                                	end
                                	return tmp
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.9e+169], t$95$1, If[LessEqual[b, 7.0], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
                                \mathbf{if}\;b \leq -5.9 \cdot 10^{+169}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;b \leq 7:\\
                                \;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_1\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if b < -5.9e169 or 7 < b

                                  1. Initial program 91.1%

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

                                    \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
                                  4. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
                                    2. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
                                    3. lower--.f64N/A

                                      \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right)} \cdot b \]
                                    4. +-commutativeN/A

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

                                      \[\leadsto \left(\color{blue}{\left(y + t\right)} - 2\right) \cdot b \]
                                  5. Applied rewrites74.1%

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

                                  if -5.9e169 < b < 7

                                  1. Initial program 98.7%

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

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

                                      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                    2. +-commutativeN/A

                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                    3. *-commutativeN/A

                                      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                    4. distribute-lft-neg-inN/A

                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                    5. mul-1-negN/A

                                      \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                    6. lower-fma.f64N/A

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                    7. mul-1-negN/A

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                    13. sub-negN/A

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                    14. lower--.f64N/A

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

                                      \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                    16. *-commutativeN/A

                                      \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                                    17. lower-fma.f64N/A

                                      \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                                    18. lower--.f64N/A

                                      \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                                    19. +-commutativeN/A

                                      \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
                                    20. lower-+.f6474.7

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

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

                                    \[\leadsto x + \color{blue}{a \cdot \left(1 - t\right)} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites64.4%

                                      \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                                  8. Recombined 2 regimes into one program.
                                  9. Final simplification68.2%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.9 \cdot 10^{+169}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq 7:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]
                                  10. Add Preprocessing

                                  Alternative 13: 57.2% accurate, 1.7× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - z\right) \cdot y\\ \mathbf{if}\;y \leq -1.65 \cdot 10^{+82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b)
                                   :precision binary64
                                   (let* ((t_1 (* (- b z) y)))
                                     (if (<= y -1.65e+82) t_1 (if (<= y 1.35e+15) (fma (- 1.0 t) a x) t_1))))
                                  double code(double x, double y, double z, double t, double a, double b) {
                                  	double t_1 = (b - z) * y;
                                  	double tmp;
                                  	if (y <= -1.65e+82) {
                                  		tmp = t_1;
                                  	} else if (y <= 1.35e+15) {
                                  		tmp = fma((1.0 - t), a, x);
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a, b)
                                  	t_1 = Float64(Float64(b - z) * y)
                                  	tmp = 0.0
                                  	if (y <= -1.65e+82)
                                  		tmp = t_1;
                                  	elseif (y <= 1.35e+15)
                                  		tmp = fma(Float64(1.0 - t), a, x);
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.65e+82], t$95$1, If[LessEqual[y, 1.35e+15], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := \left(b - z\right) \cdot y\\
                                  \mathbf{if}\;y \leq -1.65 \cdot 10^{+82}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;y \leq 1.35 \cdot 10^{+15}:\\
                                  \;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if y < -1.6499999999999999e82 or 1.35e15 < y

                                    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

                                      \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                    4. Step-by-step derivation
                                      1. *-commutativeN/A

                                        \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                                      2. lower-*.f64N/A

                                        \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                                      3. lower--.f6469.7

                                        \[\leadsto \color{blue}{\left(b - z\right)} \cdot y \]
                                    5. Applied rewrites69.7%

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

                                    if -1.6499999999999999e82 < y < 1.35e15

                                    1. Initial program 98.1%

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

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

                                        \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                      2. +-commutativeN/A

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                      3. *-commutativeN/A

                                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                      4. distribute-lft-neg-inN/A

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                      5. mul-1-negN/A

                                        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                      6. lower-fma.f64N/A

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                      7. mul-1-negN/A

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                      13. sub-negN/A

                                        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                      14. lower--.f64N/A

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

                                        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                      16. *-commutativeN/A

                                        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                                      17. lower-fma.f64N/A

                                        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                                      18. lower--.f64N/A

                                        \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                                      19. +-commutativeN/A

                                        \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
                                      20. lower-+.f6483.7

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

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

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

                                        \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                                    8. Recombined 2 regimes into one program.
                                    9. Add Preprocessing

                                    Alternative 14: 49.8% accurate, 1.7× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - t\right) \cdot a\\ \mathbf{if}\;a \leq -1.25 \cdot 10^{+108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-20}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b)
                                     :precision binary64
                                     (let* ((t_1 (* (- 1.0 t) a)))
                                       (if (<= a -1.25e+108) t_1 (if (<= a 6.8e-20) (fma (- t 2.0) b x) t_1))))
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	double t_1 = (1.0 - t) * a;
                                    	double tmp;
                                    	if (a <= -1.25e+108) {
                                    		tmp = t_1;
                                    	} else if (a <= 6.8e-20) {
                                    		tmp = fma((t - 2.0), b, x);
                                    	} else {
                                    		tmp = t_1;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a, b)
                                    	t_1 = Float64(Float64(1.0 - t) * a)
                                    	tmp = 0.0
                                    	if (a <= -1.25e+108)
                                    		tmp = t_1;
                                    	elseif (a <= 6.8e-20)
                                    		tmp = fma(Float64(t - 2.0), b, x);
                                    	else
                                    		tmp = t_1;
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -1.25e+108], t$95$1, If[LessEqual[a, 6.8e-20], N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \left(1 - t\right) \cdot a\\
                                    \mathbf{if}\;a \leq -1.25 \cdot 10^{+108}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    \mathbf{elif}\;a \leq 6.8 \cdot 10^{-20}:\\
                                    \;\;\;\;\mathsf{fma}\left(t - 2, b, x\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if a < -1.24999999999999998e108 or 6.7999999999999994e-20 < a

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

                                        \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
                                      4. Step-by-step derivation
                                        1. *-commutativeN/A

                                          \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                                        2. sub-negN/A

                                          \[\leadsto \color{blue}{\left(1 + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot a \]
                                        3. metadata-evalN/A

                                          \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a \]
                                        4. distribute-neg-inN/A

                                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(-1 + t\right)\right)\right)} \cdot a \]
                                        5. +-commutativeN/A

                                          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t + -1\right)}\right)\right) \cdot a \]
                                        6. metadata-evalN/A

                                          \[\leadsto \left(\mathsf{neg}\left(\left(t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right)\right) \cdot a \]
                                        7. sub-negN/A

                                          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right)}\right)\right) \cdot a \]
                                        8. mul-1-negN/A

                                          \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a \]
                                        9. lower-*.f64N/A

                                          \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right) \cdot a} \]
                                        10. mul-1-negN/A

                                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} \cdot a \]
                                        11. sub-negN/A

                                          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right) \cdot a \]
                                        12. metadata-evalN/A

                                          \[\leadsto \left(\mathsf{neg}\left(\left(t + \color{blue}{-1}\right)\right)\right) \cdot a \]
                                        13. +-commutativeN/A

                                          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(-1 + t\right)}\right)\right) \cdot a \]
                                        14. distribute-neg-inN/A

                                          \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(-1\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot a \]
                                        15. metadata-evalN/A

                                          \[\leadsto \left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot a \]
                                        16. sub-negN/A

                                          \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                                        17. lower--.f6461.9

                                          \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                                      5. Applied rewrites61.9%

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

                                      if -1.24999999999999998e108 < a < 6.7999999999999994e-20

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

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

                                          \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                        2. +-commutativeN/A

                                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                        3. *-commutativeN/A

                                          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                        4. distribute-lft-neg-inN/A

                                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                        5. mul-1-negN/A

                                          \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                        6. lower-fma.f64N/A

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                        7. mul-1-negN/A

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                        13. sub-negN/A

                                          \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                        14. lower--.f64N/A

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

                                          \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                        16. *-commutativeN/A

                                          \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                                        17. lower-fma.f64N/A

                                          \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                                        18. lower--.f64N/A

                                          \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                                        19. +-commutativeN/A

                                          \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
                                        20. lower-+.f6476.3

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(t - 2, b, x\right) \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites55.5%

                                            \[\leadsto \mathsf{fma}\left(t - 2, b, x\right) \]
                                        4. Recombined 2 regimes into one program.
                                        5. Add Preprocessing

                                        Alternative 15: 49.8% accurate, 1.8× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -280000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-8}:\\ \;\;\;\;a + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a b)
                                         :precision binary64
                                         (let* ((t_1 (* (- b a) t)))
                                           (if (<= t -280000.0) t_1 (if (<= t 2.3e-8) (+ a x) t_1))))
                                        double code(double x, double y, double z, double t, double a, double b) {
                                        	double t_1 = (b - a) * t;
                                        	double tmp;
                                        	if (t <= -280000.0) {
                                        		tmp = t_1;
                                        	} else if (t <= 2.3e-8) {
                                        		tmp = a + x;
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        real(8) function code(x, y, z, t, a, b)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            real(8), intent (in) :: z
                                            real(8), intent (in) :: t
                                            real(8), intent (in) :: a
                                            real(8), intent (in) :: b
                                            real(8) :: t_1
                                            real(8) :: tmp
                                            t_1 = (b - a) * t
                                            if (t <= (-280000.0d0)) then
                                                tmp = t_1
                                            else if (t <= 2.3d-8) then
                                                tmp = a + x
                                            else
                                                tmp = t_1
                                            end if
                                            code = tmp
                                        end function
                                        
                                        public static double code(double x, double y, double z, double t, double a, double b) {
                                        	double t_1 = (b - a) * t;
                                        	double tmp;
                                        	if (t <= -280000.0) {
                                        		tmp = t_1;
                                        	} else if (t <= 2.3e-8) {
                                        		tmp = a + x;
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t, a, b):
                                        	t_1 = (b - a) * t
                                        	tmp = 0
                                        	if t <= -280000.0:
                                        		tmp = t_1
                                        	elif t <= 2.3e-8:
                                        		tmp = a + x
                                        	else:
                                        		tmp = t_1
                                        	return tmp
                                        
                                        function code(x, y, z, t, a, b)
                                        	t_1 = Float64(Float64(b - a) * t)
                                        	tmp = 0.0
                                        	if (t <= -280000.0)
                                        		tmp = t_1;
                                        	elseif (t <= 2.3e-8)
                                        		tmp = Float64(a + x);
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x, y, z, t, a, b)
                                        	t_1 = (b - a) * t;
                                        	tmp = 0.0;
                                        	if (t <= -280000.0)
                                        		tmp = t_1;
                                        	elseif (t <= 2.3e-8)
                                        		tmp = a + x;
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -280000.0], t$95$1, If[LessEqual[t, 2.3e-8], N[(a + x), $MachinePrecision], t$95$1]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := \left(b - a\right) \cdot t\\
                                        \mathbf{if}\;t \leq -280000:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;t \leq 2.3 \cdot 10^{-8}:\\
                                        \;\;\;\;a + x\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if t < -2.8e5 or 2.3000000000000001e-8 < t

                                          1. Initial program 93.8%

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

                                            \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                          4. Step-by-step derivation
                                            1. *-commutativeN/A

                                              \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                            2. lower-*.f64N/A

                                              \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                            3. lower--.f6470.0

                                              \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
                                          5. Applied rewrites70.0%

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

                                          if -2.8e5 < t < 2.3000000000000001e-8

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

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

                                              \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                            2. +-commutativeN/A

                                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                            3. *-commutativeN/A

                                              \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                            4. distribute-lft-neg-inN/A

                                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                            5. mul-1-negN/A

                                              \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                            6. lower-fma.f64N/A

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                            7. mul-1-negN/A

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                            13. sub-negN/A

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                            14. lower--.f64N/A

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

                                              \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                            16. *-commutativeN/A

                                              \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                                            17. lower-fma.f64N/A

                                              \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                                            18. lower--.f64N/A

                                              \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                                            19. +-commutativeN/A

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                                            2. Taylor expanded in t around 0

                                              \[\leadsto a + x \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites44.5%

                                                \[\leadsto a + x \]
                                            4. Recombined 2 regimes into one program.
                                            5. Add Preprocessing

                                            Alternative 16: 43.1% accurate, 1.8× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - 2\right) \cdot b\\ \mathbf{if}\;b \leq -6 \cdot 10^{+169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+14}:\\ \;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                            (FPCore (x y z t a b)
                                             :precision binary64
                                             (let* ((t_1 (* (- t 2.0) b)))
                                               (if (<= b -6e+169) t_1 (if (<= b 2.4e+14) (fma (- t) a x) t_1))))
                                            double code(double x, double y, double z, double t, double a, double b) {
                                            	double t_1 = (t - 2.0) * b;
                                            	double tmp;
                                            	if (b <= -6e+169) {
                                            		tmp = t_1;
                                            	} else if (b <= 2.4e+14) {
                                            		tmp = fma(-t, a, x);
                                            	} else {
                                            		tmp = t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(x, y, z, t, a, b)
                                            	t_1 = Float64(Float64(t - 2.0) * b)
                                            	tmp = 0.0
                                            	if (b <= -6e+169)
                                            		tmp = t_1;
                                            	elseif (b <= 2.4e+14)
                                            		tmp = fma(Float64(-t), a, x);
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -6e+169], t$95$1, If[LessEqual[b, 2.4e+14], N[((-t) * a + x), $MachinePrecision], t$95$1]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            t_1 := \left(t - 2\right) \cdot b\\
                                            \mathbf{if}\;b \leq -6 \cdot 10^{+169}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            \mathbf{elif}\;b \leq 2.4 \cdot 10^{+14}:\\
                                            \;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if b < -5.9999999999999999e169 or 2.4e14 < b

                                              1. Initial program 90.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 b around inf

                                                \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
                                              4. Step-by-step derivation
                                                1. *-commutativeN/A

                                                  \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
                                                2. lower-*.f64N/A

                                                  \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
                                                3. lower--.f64N/A

                                                  \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right)} \cdot b \]
                                                4. +-commutativeN/A

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

                                                  \[\leadsto \left(\color{blue}{\left(y + t\right)} - 2\right) \cdot b \]
                                              5. Applied rewrites75.2%

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

                                                \[\leadsto \left(t - 2\right) \cdot b \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites48.8%

                                                  \[\leadsto \left(t - 2\right) \cdot b \]

                                                if -5.9999999999999999e169 < b < 2.4e14

                                                1. Initial program 98.7%

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

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

                                                    \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                                  2. +-commutativeN/A

                                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                                  3. *-commutativeN/A

                                                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                  4. distribute-lft-neg-inN/A

                                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                  5. mul-1-negN/A

                                                    \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                  6. lower-fma.f64N/A

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                                  7. mul-1-negN/A

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                  13. sub-negN/A

                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                  14. lower--.f64N/A

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

                                                    \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                                  16. *-commutativeN/A

                                                    \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                                                  17. lower-fma.f64N/A

                                                    \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                                                  18. lower--.f64N/A

                                                    \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                                                  19. +-commutativeN/A

                                                    \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
                                                  20. lower-+.f6474.6

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                                                  2. Taylor expanded in t around inf

                                                    \[\leadsto \mathsf{fma}\left(-1 \cdot t, a, x\right) \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites48.4%

                                                      \[\leadsto \mathsf{fma}\left(-t, a, x\right) \]
                                                  4. Recombined 2 regimes into one program.
                                                  5. Add Preprocessing

                                                  Alternative 17: 41.1% accurate, 1.8× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-t, a, x\right)\\ \mathbf{if}\;t \leq -0.0078:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-8}:\\ \;\;\;\;a + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                  (FPCore (x y z t a b)
                                                   :precision binary64
                                                   (let* ((t_1 (fma (- t) a x)))
                                                     (if (<= t -0.0078) t_1 (if (<= t 2.3e-8) (+ a x) t_1))))
                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                  	double t_1 = fma(-t, a, x);
                                                  	double tmp;
                                                  	if (t <= -0.0078) {
                                                  		tmp = t_1;
                                                  	} else if (t <= 2.3e-8) {
                                                  		tmp = a + x;
                                                  	} else {
                                                  		tmp = t_1;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(x, y, z, t, a, b)
                                                  	t_1 = fma(Float64(-t), a, x)
                                                  	tmp = 0.0
                                                  	if (t <= -0.0078)
                                                  		tmp = t_1;
                                                  	elseif (t <= 2.3e-8)
                                                  		tmp = Float64(a + x);
                                                  	else
                                                  		tmp = t_1;
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-t) * a + x), $MachinePrecision]}, If[LessEqual[t, -0.0078], t$95$1, If[LessEqual[t, 2.3e-8], N[(a + x), $MachinePrecision], t$95$1]]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  t_1 := \mathsf{fma}\left(-t, a, x\right)\\
                                                  \mathbf{if}\;t \leq -0.0078:\\
                                                  \;\;\;\;t\_1\\
                                                  
                                                  \mathbf{elif}\;t \leq 2.3 \cdot 10^{-8}:\\
                                                  \;\;\;\;a + x\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;t\_1\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if t < -0.0077999999999999996 or 2.3000000000000001e-8 < t

                                                    1. Initial program 93.9%

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

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

                                                        \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                                      2. +-commutativeN/A

                                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                                      3. *-commutativeN/A

                                                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                      4. distribute-lft-neg-inN/A

                                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                      5. mul-1-negN/A

                                                        \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                      6. lower-fma.f64N/A

                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                                      7. mul-1-negN/A

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

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

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                      13. sub-negN/A

                                                        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                      14. lower--.f64N/A

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

                                                        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                                      16. *-commutativeN/A

                                                        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                                                      17. lower-fma.f64N/A

                                                        \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                                                      18. lower--.f64N/A

                                                        \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                                                      19. +-commutativeN/A

                                                        \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
                                                      20. lower-+.f6482.7

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                                                      2. Taylor expanded in t around inf

                                                        \[\leadsto \mathsf{fma}\left(-1 \cdot t, a, x\right) \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites48.2%

                                                          \[\leadsto \mathsf{fma}\left(-t, a, x\right) \]

                                                        if -0.0077999999999999996 < t < 2.3000000000000001e-8

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

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

                                                            \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                                          2. +-commutativeN/A

                                                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                                          3. *-commutativeN/A

                                                            \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                          4. distribute-lft-neg-inN/A

                                                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                          5. mul-1-negN/A

                                                            \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                          6. lower-fma.f64N/A

                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                                          7. mul-1-negN/A

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

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

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                          13. sub-negN/A

                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                          14. lower--.f64N/A

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

                                                            \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                                          16. *-commutativeN/A

                                                            \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                                                          17. lower-fma.f64N/A

                                                            \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                                                          18. lower--.f64N/A

                                                            \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                                                          19. +-commutativeN/A

                                                            \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(y + t\right)} - 2, b, x\right)\right) \]
                                                          20. lower-+.f6475.5

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                                                          2. Taylor expanded in t around 0

                                                            \[\leadsto a + x \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites44.4%

                                                              \[\leadsto a + x \]
                                                          4. Recombined 2 regimes into one program.
                                                          5. Add Preprocessing

                                                          Alternative 18: 34.3% accurate, 2.1× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+92}:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;t \leq 2900000000000:\\ \;\;\;\;a + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot t\\ \end{array} \end{array} \]
                                                          (FPCore (x y z t a b)
                                                           :precision binary64
                                                           (if (<= t -5.2e+92) (* b t) (if (<= t 2900000000000.0) (+ a x) (* b t))))
                                                          double code(double x, double y, double z, double t, double a, double b) {
                                                          	double tmp;
                                                          	if (t <= -5.2e+92) {
                                                          		tmp = b * t;
                                                          	} else if (t <= 2900000000000.0) {
                                                          		tmp = a + x;
                                                          	} else {
                                                          		tmp = b * t;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          real(8) function code(x, y, z, t, a, b)
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              real(8), intent (in) :: z
                                                              real(8), intent (in) :: t
                                                              real(8), intent (in) :: a
                                                              real(8), intent (in) :: b
                                                              real(8) :: tmp
                                                              if (t <= (-5.2d+92)) then
                                                                  tmp = b * t
                                                              else if (t <= 2900000000000.0d0) then
                                                                  tmp = a + x
                                                              else
                                                                  tmp = b * t
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double x, double y, double z, double t, double a, double b) {
                                                          	double tmp;
                                                          	if (t <= -5.2e+92) {
                                                          		tmp = b * t;
                                                          	} else if (t <= 2900000000000.0) {
                                                          		tmp = a + x;
                                                          	} else {
                                                          		tmp = b * t;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x, y, z, t, a, b):
                                                          	tmp = 0
                                                          	if t <= -5.2e+92:
                                                          		tmp = b * t
                                                          	elif t <= 2900000000000.0:
                                                          		tmp = a + x
                                                          	else:
                                                          		tmp = b * t
                                                          	return tmp
                                                          
                                                          function code(x, y, z, t, a, b)
                                                          	tmp = 0.0
                                                          	if (t <= -5.2e+92)
                                                          		tmp = Float64(b * t);
                                                          	elseif (t <= 2900000000000.0)
                                                          		tmp = Float64(a + x);
                                                          	else
                                                          		tmp = Float64(b * t);
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(x, y, z, t, a, b)
                                                          	tmp = 0.0;
                                                          	if (t <= -5.2e+92)
                                                          		tmp = b * t;
                                                          	elseif (t <= 2900000000000.0)
                                                          		tmp = a + x;
                                                          	else
                                                          		tmp = b * t;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.2e+92], N[(b * t), $MachinePrecision], If[LessEqual[t, 2900000000000.0], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;t \leq -5.2 \cdot 10^{+92}:\\
                                                          \;\;\;\;b \cdot t\\
                                                          
                                                          \mathbf{elif}\;t \leq 2900000000000:\\
                                                          \;\;\;\;a + x\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;b \cdot t\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if t < -5.1999999999999998e92 or 2.9e12 < t

                                                            1. Initial program 94.4%

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

                                                              \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
                                                            4. Step-by-step derivation
                                                              1. *-commutativeN/A

                                                                \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
                                                              2. lower-*.f64N/A

                                                                \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]
                                                              3. lower--.f64N/A

                                                                \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right)} \cdot b \]
                                                              4. +-commutativeN/A

                                                                \[\leadsto \left(\color{blue}{\left(y + t\right)} - 2\right) \cdot b \]
                                                              5. lower-+.f6449.8

                                                                \[\leadsto \left(\color{blue}{\left(y + t\right)} - 2\right) \cdot b \]
                                                            5. Applied rewrites49.8%

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

                                                              \[\leadsto b \cdot \color{blue}{t} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites41.6%

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

                                                              if -5.1999999999999998e92 < t < 2.9e12

                                                              1. Initial program 96.6%

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

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

                                                                  \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                                                2. +-commutativeN/A

                                                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                                                3. *-commutativeN/A

                                                                  \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                4. distribute-lft-neg-inN/A

                                                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                5. mul-1-negN/A

                                                                  \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                6. lower-fma.f64N/A

                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                                                7. mul-1-negN/A

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

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

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

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

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

                                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                13. sub-negN/A

                                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                14. lower--.f64N/A

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

                                                                  \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                                                16. *-commutativeN/A

                                                                  \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                                                                17. lower-fma.f64N/A

                                                                  \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                                                                18. lower--.f64N/A

                                                                  \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                                                                19. +-commutativeN/A

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

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

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

                                                                \[\leadsto x + \color{blue}{a \cdot \left(1 - t\right)} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites44.4%

                                                                  \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                                                                2. Taylor expanded in t around 0

                                                                  \[\leadsto a + x \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites39.9%

                                                                    \[\leadsto a + x \]
                                                                4. Recombined 2 regimes into one program.
                                                                5. Add Preprocessing

                                                                Alternative 19: 23.9% accurate, 9.3× speedup?

                                                                \[\begin{array}{l} \\ a + x \end{array} \]
                                                                (FPCore (x y z t a b) :precision binary64 (+ a x))
                                                                double code(double x, double y, double z, double t, double a, double b) {
                                                                	return a + x;
                                                                }
                                                                
                                                                real(8) function code(x, y, z, t, a, b)
                                                                    real(8), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    real(8), intent (in) :: z
                                                                    real(8), intent (in) :: t
                                                                    real(8), intent (in) :: a
                                                                    real(8), intent (in) :: b
                                                                    code = a + x
                                                                end function
                                                                
                                                                public static double code(double x, double y, double z, double t, double a, double b) {
                                                                	return a + x;
                                                                }
                                                                
                                                                def code(x, y, z, t, a, b):
                                                                	return a + x
                                                                
                                                                function code(x, y, z, t, a, b)
                                                                	return Float64(a + x)
                                                                end
                                                                
                                                                function tmp = code(x, y, z, t, a, b)
                                                                	tmp = a + x;
                                                                end
                                                                
                                                                code[x_, y_, z_, t_, a_, b_] := N[(a + x), $MachinePrecision]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                a + x
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Initial program 95.7%

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

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

                                                                    \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                                                  2. +-commutativeN/A

                                                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                                                  3. *-commutativeN/A

                                                                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(t - 1\right) \cdot a}\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                  4. distribute-lft-neg-inN/A

                                                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(t - 1\right)\right)\right) \cdot a} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                  5. mul-1-negN/A

                                                                    \[\leadsto \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} \cdot a + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                  6. lower-fma.f64N/A

                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(t - 1\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                                                  7. mul-1-negN/A

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

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

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

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

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

                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{1} + \left(\mathsf{neg}\left(t\right)\right), a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                  13. sub-negN/A

                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{1 - t}, a, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                                                  14. lower--.f64N/A

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

                                                                    \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                                                  16. *-commutativeN/A

                                                                    \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + x\right) \]
                                                                  17. lower-fma.f64N/A

                                                                    \[\leadsto \mathsf{fma}\left(1 - t, a, \color{blue}{\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)}\right) \]
                                                                  18. lower--.f64N/A

                                                                    \[\leadsto \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\color{blue}{\left(t + y\right) - 2}, b, x\right)\right) \]
                                                                  19. +-commutativeN/A

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

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

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

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

                                                                    \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                                                                  2. Taylor expanded in t around 0

                                                                    \[\leadsto a + x \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites25.5%

                                                                      \[\leadsto a + x \]
                                                                    2. Add Preprocessing

                                                                    Reproduce

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