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

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

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

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

Alternative 1: 97.8% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

Alternative 2: 44.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;x + \left(z + a\right)\\

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

      if -inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < 9.99999999999999986e306

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \left(a + z\right) \]
        3. Step-by-step derivation
          1. Applied rewrites51.3%

            \[\leadsto x + \left(a + z\right) \]

          if 9.99999999999999986e306 < (+.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 72.0%

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

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

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

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

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

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

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

              \[\leadsto b \cdot \left(y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}\right) \]
            7. metadata-eval53.0

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

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

            \[\leadsto b \cdot \left(y + -2\right) \]
          7. Step-by-step derivation
            1. Applied rewrites33.7%

              \[\leadsto b \cdot \left(y + -2\right) \]
          8. Recombined 3 regimes into one program.
          9. Final simplification47.7%

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

          Alternative 3: 44.3% accurate, 0.4× speedup?

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

            1. Initial program 100.0%

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

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

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

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

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

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

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

              if -inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < 9.99999999999999986e306

              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto x + \left(a + z\right) \]
                3. Step-by-step derivation
                  1. Applied rewrites51.3%

                    \[\leadsto x + \left(a + z\right) \]

                  if 9.99999999999999986e306 < (+.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 72.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto b \cdot \color{blue}{y} \]
                  7. Step-by-step derivation
                    1. Applied rewrites32.9%

                      \[\leadsto b \cdot \color{blue}{y} \]
                  8. Recombined 3 regimes into one program.
                  9. Final simplification47.6%

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

                  Alternative 4: 44.9% accurate, 0.4× speedup?

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

                    1. Initial program 100.0%

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

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

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

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

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

                        \[\leadsto 1 \cdot z + \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
                      5. *-lft-identityN/A

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

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

                        \[\leadsto \color{blue}{z - y \cdot z} \]
                      8. lower--.f64N/A

                        \[\leadsto \color{blue}{z - y \cdot z} \]
                      9. lower-*.f6426.6

                        \[\leadsto z - \color{blue}{y \cdot z} \]
                    5. Applied rewrites26.6%

                      \[\leadsto \color{blue}{z - y \cdot z} \]
                    6. Taylor expanded in y around inf

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

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

                      if -inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < 9.99999999999999986e306

                      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto x + \left(a + z\right) \]
                        3. Step-by-step derivation
                          1. Applied rewrites51.3%

                            \[\leadsto x + \left(a + z\right) \]

                          if 9.99999999999999986e306 < (+.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 72.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto b \cdot \color{blue}{y} \]
                          7. Step-by-step derivation
                            1. Applied rewrites32.9%

                              \[\leadsto b \cdot \color{blue}{y} \]
                          8. Recombined 3 regimes into one program.
                          9. Final simplification44.1%

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

                          Alternative 5: 43.8% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto b \cdot \color{blue}{y} \]
                            7. Step-by-step derivation
                              1. Applied rewrites28.0%

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

                              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)) < 9.99999999999999986e306

                              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto x + \left(a + z\right) \]
                                3. Step-by-step derivation
                                  1. Applied rewrites51.3%

                                    \[\leadsto x + \left(a + z\right) \]
                                4. Recombined 2 regimes into one program.
                                5. Final simplification43.4%

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

                                Alternative 6: 55.1% accurate, 0.8× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(z, 1 - y, x\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -1.7 \cdot 10^{+125}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-161}:\\ \;\;\;\;b \cdot \left(y + -2\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-243}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-37}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b)
                                 :precision binary64
                                 (let* ((t_1 (fma z (- 1.0 y) x)) (t_2 (* t (- b a))))
                                   (if (<= t -1.7e+125)
                                     t_2
                                     (if (<= t -1.75e-23)
                                       t_1
                                       (if (<= t -7.5e-161)
                                         (* b (+ y -2.0))
                                         (if (<= t 4.2e-243)
                                           t_1
                                           (if (<= t 3.2e-37) (+ x (+ z a)) (if (<= t 5.4e+110) t_1 t_2))))))))
                                double code(double x, double y, double z, double t, double a, double b) {
                                	double t_1 = fma(z, (1.0 - y), x);
                                	double t_2 = t * (b - a);
                                	double tmp;
                                	if (t <= -1.7e+125) {
                                		tmp = t_2;
                                	} else if (t <= -1.75e-23) {
                                		tmp = t_1;
                                	} else if (t <= -7.5e-161) {
                                		tmp = b * (y + -2.0);
                                	} else if (t <= 4.2e-243) {
                                		tmp = t_1;
                                	} else if (t <= 3.2e-37) {
                                		tmp = x + (z + a);
                                	} else if (t <= 5.4e+110) {
                                		tmp = t_1;
                                	} else {
                                		tmp = t_2;
                                	}
                                	return tmp;
                                }
                                
                                function code(x, y, z, t, a, b)
                                	t_1 = fma(z, Float64(1.0 - y), x)
                                	t_2 = Float64(t * Float64(b - a))
                                	tmp = 0.0
                                	if (t <= -1.7e+125)
                                		tmp = t_2;
                                	elseif (t <= -1.75e-23)
                                		tmp = t_1;
                                	elseif (t <= -7.5e-161)
                                		tmp = Float64(b * Float64(y + -2.0));
                                	elseif (t <= 4.2e-243)
                                		tmp = t_1;
                                	elseif (t <= 3.2e-37)
                                		tmp = Float64(x + Float64(z + a));
                                	elseif (t <= 5.4e+110)
                                		tmp = t_1;
                                	else
                                		tmp = t_2;
                                	end
                                	return tmp
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+125], t$95$2, If[LessEqual[t, -1.75e-23], t$95$1, If[LessEqual[t, -7.5e-161], N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-243], t$95$1, If[LessEqual[t, 3.2e-37], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+110], t$95$1, t$95$2]]]]]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := \mathsf{fma}\left(z, 1 - y, x\right)\\
                                t_2 := t \cdot \left(b - a\right)\\
                                \mathbf{if}\;t \leq -1.7 \cdot 10^{+125}:\\
                                \;\;\;\;t\_2\\
                                
                                \mathbf{elif}\;t \leq -1.75 \cdot 10^{-23}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;t \leq -7.5 \cdot 10^{-161}:\\
                                \;\;\;\;b \cdot \left(y + -2\right)\\
                                
                                \mathbf{elif}\;t \leq 4.2 \cdot 10^{-243}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;t \leq 3.2 \cdot 10^{-37}:\\
                                \;\;\;\;x + \left(z + a\right)\\
                                
                                \mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_2\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 4 regimes
                                2. if t < -1.6999999999999999e125 or 5.40000000000000019e110 < t

                                  1. Initial program 87.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. lower-*.f64N/A

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

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

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

                                  if -1.6999999999999999e125 < t < -1.74999999999999997e-23 or -7.49999999999999991e-161 < t < 4.2000000000000002e-243 or 3.1999999999999999e-37 < t < 5.40000000000000019e110

                                  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 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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, 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 rewrites62.3%

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

                                    if -1.74999999999999997e-23 < t < -7.49999999999999991e-161

                                    1. Initial program 97.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. lower-*.f64N/A

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

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

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

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

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

                                        \[\leadsto b \cdot \left(y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}\right) \]
                                      7. metadata-eval54.8

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

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

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

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

                                      if 4.2000000000000002e-243 < t < 3.1999999999999999e-37

                                      1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto x + \left(a + z\right) \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites61.3%

                                            \[\leadsto x + \left(a + z\right) \]
                                        4. Recombined 4 regimes into one program.
                                        5. Final simplification67.1%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+125}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-23}:\\ \;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-161}:\\ \;\;\;\;b \cdot \left(y + -2\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-243}:\\ \;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-37}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\ \;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
                                        6. Add Preprocessing

                                        Alternative 7: 65.5% accurate, 0.9× speedup?

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

                                          1. Initial program 86.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 t around inf

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

                                              \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                            2. lower--.f6480.4

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

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

                                          if -9.99999999999999899e164 < t < -7.0000000000000004e23

                                          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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(a, 1 - t, x + z\right) \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites89.6%

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

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

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

                                              if -7.0000000000000004e23 < t < -8.40000000000000031e-22

                                              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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(a, 1 - t, -1 \cdot \left(y \cdot z\right)\right) \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites91.5%

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

                                                if -8.40000000000000031e-22 < t < -5.49999999999999978e-239

                                                1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, a + x\right) \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites81.5%

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

                                                  if -5.49999999999999978e-239 < t < 5.40000000000000019e110

                                                  1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto a + \color{blue}{\mathsf{fma}\left(z, 1 - y, x\right)} \]
                                                  8. Recombined 5 regimes into one program.
                                                  9. Final simplification77.6%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+165}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -7 \cdot 10^{+23}:\\ \;\;\;\;\mathsf{fma}\left(a, -t, x + z\right)\\ \mathbf{elif}\;t \leq -8.4 \cdot 10^{-22}:\\ \;\;\;\;\mathsf{fma}\left(a, 1 - t, y \cdot \left(-z\right)\right)\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-239}:\\ \;\;\;\;\mathsf{fma}\left(b, y + -2, x + a\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\ \;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
                                                  10. Add Preprocessing

                                                  Alternative 8: 66.2% accurate, 0.9× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \mathsf{fma}\left(z, 1 - y, x\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -1 \cdot 10^{+165}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -4.35 \cdot 10^{+18}:\\ \;\;\;\;\mathsf{fma}\left(a, -t, x + z\right)\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-239}:\\ \;\;\;\;\mathsf{fma}\left(b, y + -2, x + a\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                  (FPCore (x y z t a b)
                                                   :precision binary64
                                                   (let* ((t_1 (+ a (fma z (- 1.0 y) x))) (t_2 (* t (- b a))))
                                                     (if (<= t -1e+165)
                                                       t_2
                                                       (if (<= t -4.35e+18)
                                                         (fma a (- t) (+ x z))
                                                         (if (<= t -3.8e-23)
                                                           t_1
                                                           (if (<= t -5.5e-239)
                                                             (fma b (+ y -2.0) (+ x a))
                                                             (if (<= t 5.4e+110) t_1 t_2)))))))
                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                  	double t_1 = a + fma(z, (1.0 - y), x);
                                                  	double t_2 = t * (b - a);
                                                  	double tmp;
                                                  	if (t <= -1e+165) {
                                                  		tmp = t_2;
                                                  	} else if (t <= -4.35e+18) {
                                                  		tmp = fma(a, -t, (x + z));
                                                  	} else if (t <= -3.8e-23) {
                                                  		tmp = t_1;
                                                  	} else if (t <= -5.5e-239) {
                                                  		tmp = fma(b, (y + -2.0), (x + a));
                                                  	} else if (t <= 5.4e+110) {
                                                  		tmp = t_1;
                                                  	} else {
                                                  		tmp = t_2;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(x, y, z, t, a, b)
                                                  	t_1 = Float64(a + fma(z, Float64(1.0 - y), x))
                                                  	t_2 = Float64(t * Float64(b - a))
                                                  	tmp = 0.0
                                                  	if (t <= -1e+165)
                                                  		tmp = t_2;
                                                  	elseif (t <= -4.35e+18)
                                                  		tmp = fma(a, Float64(-t), Float64(x + z));
                                                  	elseif (t <= -3.8e-23)
                                                  		tmp = t_1;
                                                  	elseif (t <= -5.5e-239)
                                                  		tmp = fma(b, Float64(y + -2.0), Float64(x + a));
                                                  	elseif (t <= 5.4e+110)
                                                  		tmp = t_1;
                                                  	else
                                                  		tmp = t_2;
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+165], t$95$2, If[LessEqual[t, -4.35e+18], N[(a * (-t) + N[(x + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-23], t$95$1, If[LessEqual[t, -5.5e-239], N[(b * N[(y + -2.0), $MachinePrecision] + N[(x + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+110], t$95$1, t$95$2]]]]]]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  t_1 := a + \mathsf{fma}\left(z, 1 - y, x\right)\\
                                                  t_2 := t \cdot \left(b - a\right)\\
                                                  \mathbf{if}\;t \leq -1 \cdot 10^{+165}:\\
                                                  \;\;\;\;t\_2\\
                                                  
                                                  \mathbf{elif}\;t \leq -4.35 \cdot 10^{+18}:\\
                                                  \;\;\;\;\mathsf{fma}\left(a, -t, x + z\right)\\
                                                  
                                                  \mathbf{elif}\;t \leq -3.8 \cdot 10^{-23}:\\
                                                  \;\;\;\;t\_1\\
                                                  
                                                  \mathbf{elif}\;t \leq -5.5 \cdot 10^{-239}:\\
                                                  \;\;\;\;\mathsf{fma}\left(b, y + -2, x + a\right)\\
                                                  
                                                  \mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\
                                                  \;\;\;\;t\_1\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;t\_2\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 4 regimes
                                                  2. if t < -9.99999999999999899e164 or 5.40000000000000019e110 < t

                                                    1. Initial program 86.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 t around inf

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

                                                        \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                      2. lower--.f6480.4

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

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

                                                    if -9.99999999999999899e164 < t < -4.35e18

                                                    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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, x + z\right) \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites90.6%

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

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

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

                                                        if -4.35e18 < t < -3.80000000000000011e-23 or -5.49999999999999978e-239 < t < 5.40000000000000019e110

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if -3.80000000000000011e-23 < t < -5.49999999999999978e-239

                                                          1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(b, y + -2, a + x\right) \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites81.5%

                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, a + x\right) \]
                                                          8. Recombined 4 regimes into one program.
                                                          9. Final simplification77.6%

                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+165}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -4.35 \cdot 10^{+18}:\\ \;\;\;\;\mathsf{fma}\left(a, -t, x + z\right)\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-23}:\\ \;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-239}:\\ \;\;\;\;\mathsf{fma}\left(b, y + -2, x + a\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\ \;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
                                                          10. Add Preprocessing

                                                          Alternative 9: 86.2% accurate, 0.9× speedup?

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

                                                            1. Initial program 86.4%

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

                                                              \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if -4.00000000000000007e184 < t < -2.5e18

                                                            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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if -2.5e18 < t < 2.5e102

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          Alternative 10: 54.0% accurate, 0.9× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := x + \left(z + a\right)\\ t_3 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -3.45 \cdot 10^{+18}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-70}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-236}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+64}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
                                                          (FPCore (x y z t a b)
                                                           :precision binary64
                                                           (let* ((t_1 (* y (- b z))) (t_2 (+ x (+ z a))) (t_3 (* t (- b a))))
                                                             (if (<= t -3.45e+18)
                                                               t_3
                                                               (if (<= t -1.9e-70)
                                                                 t_1
                                                                 (if (<= t -9e-236)
                                                                   t_2
                                                                   (if (<= t 2.2e-196) t_1 (if (<= t 4.9e+64) t_2 t_3)))))))
                                                          double code(double x, double y, double z, double t, double a, double b) {
                                                          	double t_1 = y * (b - z);
                                                          	double t_2 = x + (z + a);
                                                          	double t_3 = t * (b - a);
                                                          	double tmp;
                                                          	if (t <= -3.45e+18) {
                                                          		tmp = t_3;
                                                          	} else if (t <= -1.9e-70) {
                                                          		tmp = t_1;
                                                          	} else if (t <= -9e-236) {
                                                          		tmp = t_2;
                                                          	} else if (t <= 2.2e-196) {
                                                          		tmp = t_1;
                                                          	} else if (t <= 4.9e+64) {
                                                          		tmp = t_2;
                                                          	} else {
                                                          		tmp = t_3;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          real(8) function code(x, y, z, t, a, b)
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              real(8), intent (in) :: z
                                                              real(8), intent (in) :: t
                                                              real(8), intent (in) :: a
                                                              real(8), intent (in) :: b
                                                              real(8) :: t_1
                                                              real(8) :: t_2
                                                              real(8) :: t_3
                                                              real(8) :: tmp
                                                              t_1 = y * (b - z)
                                                              t_2 = x + (z + a)
                                                              t_3 = t * (b - a)
                                                              if (t <= (-3.45d+18)) then
                                                                  tmp = t_3
                                                              else if (t <= (-1.9d-70)) then
                                                                  tmp = t_1
                                                              else if (t <= (-9d-236)) then
                                                                  tmp = t_2
                                                              else if (t <= 2.2d-196) then
                                                                  tmp = t_1
                                                              else if (t <= 4.9d+64) then
                                                                  tmp = t_2
                                                              else
                                                                  tmp = t_3
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double x, double y, double z, double t, double a, double b) {
                                                          	double t_1 = y * (b - z);
                                                          	double t_2 = x + (z + a);
                                                          	double t_3 = t * (b - a);
                                                          	double tmp;
                                                          	if (t <= -3.45e+18) {
                                                          		tmp = t_3;
                                                          	} else if (t <= -1.9e-70) {
                                                          		tmp = t_1;
                                                          	} else if (t <= -9e-236) {
                                                          		tmp = t_2;
                                                          	} else if (t <= 2.2e-196) {
                                                          		tmp = t_1;
                                                          	} else if (t <= 4.9e+64) {
                                                          		tmp = t_2;
                                                          	} else {
                                                          		tmp = t_3;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x, y, z, t, a, b):
                                                          	t_1 = y * (b - z)
                                                          	t_2 = x + (z + a)
                                                          	t_3 = t * (b - a)
                                                          	tmp = 0
                                                          	if t <= -3.45e+18:
                                                          		tmp = t_3
                                                          	elif t <= -1.9e-70:
                                                          		tmp = t_1
                                                          	elif t <= -9e-236:
                                                          		tmp = t_2
                                                          	elif t <= 2.2e-196:
                                                          		tmp = t_1
                                                          	elif t <= 4.9e+64:
                                                          		tmp = t_2
                                                          	else:
                                                          		tmp = t_3
                                                          	return tmp
                                                          
                                                          function code(x, y, z, t, a, b)
                                                          	t_1 = Float64(y * Float64(b - z))
                                                          	t_2 = Float64(x + Float64(z + a))
                                                          	t_3 = Float64(t * Float64(b - a))
                                                          	tmp = 0.0
                                                          	if (t <= -3.45e+18)
                                                          		tmp = t_3;
                                                          	elseif (t <= -1.9e-70)
                                                          		tmp = t_1;
                                                          	elseif (t <= -9e-236)
                                                          		tmp = t_2;
                                                          	elseif (t <= 2.2e-196)
                                                          		tmp = t_1;
                                                          	elseif (t <= 4.9e+64)
                                                          		tmp = t_2;
                                                          	else
                                                          		tmp = t_3;
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(x, y, z, t, a, b)
                                                          	t_1 = y * (b - z);
                                                          	t_2 = x + (z + a);
                                                          	t_3 = t * (b - a);
                                                          	tmp = 0.0;
                                                          	if (t <= -3.45e+18)
                                                          		tmp = t_3;
                                                          	elseif (t <= -1.9e-70)
                                                          		tmp = t_1;
                                                          	elseif (t <= -9e-236)
                                                          		tmp = t_2;
                                                          	elseif (t <= 2.2e-196)
                                                          		tmp = t_1;
                                                          	elseif (t <= 4.9e+64)
                                                          		tmp = t_2;
                                                          	else
                                                          		tmp = t_3;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.45e+18], t$95$3, If[LessEqual[t, -1.9e-70], t$95$1, If[LessEqual[t, -9e-236], t$95$2, If[LessEqual[t, 2.2e-196], t$95$1, If[LessEqual[t, 4.9e+64], t$95$2, t$95$3]]]]]]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          t_1 := y \cdot \left(b - z\right)\\
                                                          t_2 := x + \left(z + a\right)\\
                                                          t_3 := t \cdot \left(b - a\right)\\
                                                          \mathbf{if}\;t \leq -3.45 \cdot 10^{+18}:\\
                                                          \;\;\;\;t\_3\\
                                                          
                                                          \mathbf{elif}\;t \leq -1.9 \cdot 10^{-70}:\\
                                                          \;\;\;\;t\_1\\
                                                          
                                                          \mathbf{elif}\;t \leq -9 \cdot 10^{-236}:\\
                                                          \;\;\;\;t\_2\\
                                                          
                                                          \mathbf{elif}\;t \leq 2.2 \cdot 10^{-196}:\\
                                                          \;\;\;\;t\_1\\
                                                          
                                                          \mathbf{elif}\;t \leq 4.9 \cdot 10^{+64}:\\
                                                          \;\;\;\;t\_2\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;t\_3\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 3 regimes
                                                          2. if t < -3.45e18 or 4.9000000000000003e64 < t

                                                            1. Initial program 89.6%

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

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

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

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

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

                                                            if -3.45e18 < t < -1.8999999999999999e-70 or -8.99999999999999997e-236 < t < 2.20000000000000015e-196

                                                            1. Initial program 100.0%

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

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

                                                                \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
                                                              2. lower--.f6461.1

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

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

                                                            if -1.8999999999999999e-70 < t < -8.99999999999999997e-236 or 2.20000000000000015e-196 < t < 4.9000000000000003e64

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto x + \left(a + z\right) \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites55.4%

                                                                  \[\leadsto x + \left(a + z\right) \]
                                                              4. Recombined 3 regimes into one program.
                                                              5. Final simplification63.5%

                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.45 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-70}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-236}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-196}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+64}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
                                                              6. Add Preprocessing

                                                              Alternative 11: 65.2% accurate, 1.0× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, 1 - t, x + z\right)\\ t_2 := b \cdot \left(y + \left(t + -2\right)\right)\\ \mathbf{if}\;b \leq -6.5 \cdot 10^{+74}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -1.35 \cdot 10^{-25}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.32 \cdot 10^{-164}:\\ \;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{elif}\;b \leq 6.8 \cdot 10^{+224}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                              (FPCore (x y z t a b)
                                                               :precision binary64
                                                               (let* ((t_1 (fma a (- 1.0 t) (+ x z))) (t_2 (* b (+ y (+ t -2.0)))))
                                                                 (if (<= b -6.5e+74)
                                                                   t_2
                                                                   (if (<= b -1.35e-25)
                                                                     t_1
                                                                     (if (<= b 1.32e-164)
                                                                       (+ a (fma z (- 1.0 y) x))
                                                                       (if (<= b 6.8e+224) t_1 t_2))))))
                                                              double code(double x, double y, double z, double t, double a, double b) {
                                                              	double t_1 = fma(a, (1.0 - t), (x + z));
                                                              	double t_2 = b * (y + (t + -2.0));
                                                              	double tmp;
                                                              	if (b <= -6.5e+74) {
                                                              		tmp = t_2;
                                                              	} else if (b <= -1.35e-25) {
                                                              		tmp = t_1;
                                                              	} else if (b <= 1.32e-164) {
                                                              		tmp = a + fma(z, (1.0 - y), x);
                                                              	} else if (b <= 6.8e+224) {
                                                              		tmp = t_1;
                                                              	} else {
                                                              		tmp = t_2;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              function code(x, y, z, t, a, b)
                                                              	t_1 = fma(a, Float64(1.0 - t), Float64(x + z))
                                                              	t_2 = Float64(b * Float64(y + Float64(t + -2.0)))
                                                              	tmp = 0.0
                                                              	if (b <= -6.5e+74)
                                                              		tmp = t_2;
                                                              	elseif (b <= -1.35e-25)
                                                              		tmp = t_1;
                                                              	elseif (b <= 1.32e-164)
                                                              		tmp = Float64(a + fma(z, Float64(1.0 - y), x));
                                                              	elseif (b <= 6.8e+224)
                                                              		tmp = t_1;
                                                              	else
                                                              		tmp = t_2;
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.5e+74], t$95$2, If[LessEqual[b, -1.35e-25], t$95$1, If[LessEqual[b, 1.32e-164], N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.8e+224], t$95$1, t$95$2]]]]]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              t_1 := \mathsf{fma}\left(a, 1 - t, x + z\right)\\
                                                              t_2 := b \cdot \left(y + \left(t + -2\right)\right)\\
                                                              \mathbf{if}\;b \leq -6.5 \cdot 10^{+74}:\\
                                                              \;\;\;\;t\_2\\
                                                              
                                                              \mathbf{elif}\;b \leq -1.35 \cdot 10^{-25}:\\
                                                              \;\;\;\;t\_1\\
                                                              
                                                              \mathbf{elif}\;b \leq 1.32 \cdot 10^{-164}:\\
                                                              \;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\
                                                              
                                                              \mathbf{elif}\;b \leq 6.8 \cdot 10^{+224}:\\
                                                              \;\;\;\;t\_1\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;t\_2\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 3 regimes
                                                              2. if b < -6.49999999999999962e74 or 6.8000000000000004e224 < b

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

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

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

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

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

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

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

                                                                    \[\leadsto b \cdot \left(y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}\right) \]
                                                                  7. metadata-eval80.1

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

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

                                                                if -6.49999999999999962e74 < b < -1.35000000000000008e-25 or 1.3199999999999999e-164 < b < 6.8000000000000004e224

                                                                1. Initial program 93.1%

                                                                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                2. 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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \mathsf{fma}\left(a, 1 - t, x + z\right) \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites70.8%

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

                                                                  if -1.35000000000000008e-25 < b < 1.3199999999999999e-164

                                                                  1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto a + \color{blue}{\mathsf{fma}\left(z, 1 - y, x\right)} \]
                                                                  8. Recombined 3 regimes into one program.
                                                                  9. Final simplification75.0%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.5 \cdot 10^{+74}:\\ \;\;\;\;b \cdot \left(y + \left(t + -2\right)\right)\\ \mathbf{elif}\;b \leq -1.35 \cdot 10^{-25}:\\ \;\;\;\;\mathsf{fma}\left(a, 1 - t, x + z\right)\\ \mathbf{elif}\;b \leq 1.32 \cdot 10^{-164}:\\ \;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{elif}\;b \leq 6.8 \cdot 10^{+224}:\\ \;\;\;\;\mathsf{fma}\left(a, 1 - t, x + z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y + \left(t + -2\right)\right)\\ \end{array} \]
                                                                  10. Add Preprocessing

                                                                  Alternative 12: 58.1% accurate, 1.0× speedup?

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

                                                                    1. Initial program 89.7%

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

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

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

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

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

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

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

                                                                        \[\leadsto b \cdot \left(y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}\right) \]
                                                                      7. metadata-eval78.4

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

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

                                                                    if -3.4999999999999999e71 < b < -1.35000000000000008e-25 or 1.3199999999999999e-164 < b < 2.1e199

                                                                    1. Initial program 92.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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, x + z\right) \]
                                                                    7. Step-by-step derivation
                                                                      1. Applied rewrites70.7%

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

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

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

                                                                        if -1.35000000000000008e-25 < b < 1.3199999999999999e-164

                                                                        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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, 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 rewrites64.7%

                                                                            \[\leadsto \mathsf{fma}\left(z, \color{blue}{1 - y}, x\right) \]
                                                                        8. Recombined 3 regimes into one program.
                                                                        9. Final simplification66.0%

                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+71}:\\ \;\;\;\;b \cdot \left(y + \left(t + -2\right)\right)\\ \mathbf{elif}\;b \leq -1.35 \cdot 10^{-25}:\\ \;\;\;\;\mathsf{fma}\left(a, -t, x + z\right)\\ \mathbf{elif}\;b \leq 1.32 \cdot 10^{-164}:\\ \;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{+199}:\\ \;\;\;\;\mathsf{fma}\left(a, -t, x + z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y + \left(t + -2\right)\right)\\ \end{array} \]
                                                                        10. Add Preprocessing

                                                                        Alternative 13: 82.9% accurate, 1.1× speedup?

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

                                                                          1. Initial program 91.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 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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if -2.5e18 < t < 5.40000000000000019e110

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if 5.40000000000000019e110 < t

                                                                          1. Initial program 86.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 t around inf

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

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

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

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

                                                                        Alternative 14: 66.4% accurate, 1.2× speedup?

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

                                                                          1. Initial program 86.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 t around inf

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

                                                                              \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                            2. lower--.f6480.4

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

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

                                                                          if -9.99999999999999899e164 < t < -4.35e18

                                                                          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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            \[\leadsto \mathsf{fma}\left(a, 1 - t, x + z\right) \]
                                                                          7. Step-by-step derivation
                                                                            1. Applied rewrites90.6%

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

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

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

                                                                              if -4.35e18 < t < 5.40000000000000019e110

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto a + \color{blue}{\mathsf{fma}\left(z, 1 - y, x\right)} \]
                                                                              8. Recombined 3 regimes into one program.
                                                                              9. Final simplification72.0%

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+165}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -4.35 \cdot 10^{+18}:\\ \;\;\;\;\mathsf{fma}\left(a, -t, x + z\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\ \;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
                                                                              10. Add Preprocessing

                                                                              Alternative 15: 78.9% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

                                                                                    \[\leadsto b \cdot \left(y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}\right) \]
                                                                                  7. metadata-eval80.1

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

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

                                                                                if -6.9999999999999997e75 < b < 6.8000000000000004e224

                                                                                1. Initial program 96.4%

                                                                                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                2. Add Preprocessing
                                                                                3. Taylor expanded in 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. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right)} + x\right) \]
                                                                                  19. mul-1-negN/A

                                                                                    \[\leadsto \mathsf{fma}\left(a, 1 - t, z \cdot \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} + x\right) \]
                                                                                  20. lower-fma.f64N/A

                                                                                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(y - 1\right), x\right)}\right) \]
                                                                                5. Applied rewrites84.6%

                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, x\right)\right)} \]
                                                                              3. Recombined 2 regimes into one program.
                                                                              4. Add Preprocessing

                                                                              Alternative 16: 56.5% accurate, 1.7× speedup?

                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, 1 - t, x\right)\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+68}:\\ \;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                              (FPCore (x y z t a b)
                                                                               :precision binary64
                                                                               (let* ((t_1 (fma a (- 1.0 t) x)))
                                                                                 (if (<= a -3.5e+114) t_1 (if (<= a 1.2e+68) (fma z (- 1.0 y) x) t_1))))
                                                                              double code(double x, double y, double z, double t, double a, double b) {
                                                                              	double t_1 = fma(a, (1.0 - t), x);
                                                                              	double tmp;
                                                                              	if (a <= -3.5e+114) {
                                                                              		tmp = t_1;
                                                                              	} else if (a <= 1.2e+68) {
                                                                              		tmp = fma(z, (1.0 - y), x);
                                                                              	} else {
                                                                              		tmp = t_1;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              function code(x, y, z, t, a, b)
                                                                              	t_1 = fma(a, Float64(1.0 - t), x)
                                                                              	tmp = 0.0
                                                                              	if (a <= -3.5e+114)
                                                                              		tmp = t_1;
                                                                              	elseif (a <= 1.2e+68)
                                                                              		tmp = fma(z, Float64(1.0 - y), x);
                                                                              	else
                                                                              		tmp = t_1;
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.5e+114], t$95$1, If[LessEqual[a, 1.2e+68], N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
                                                                              
                                                                              \begin{array}{l}
                                                                              
                                                                              \\
                                                                              \begin{array}{l}
                                                                              t_1 := \mathsf{fma}\left(a, 1 - t, x\right)\\
                                                                              \mathbf{if}\;a \leq -3.5 \cdot 10^{+114}:\\
                                                                              \;\;\;\;t\_1\\
                                                                              
                                                                              \mathbf{elif}\;a \leq 1.2 \cdot 10^{+68}:\\
                                                                              \;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;t\_1\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 2 regimes
                                                                              2. if a < -3.5000000000000001e114 or 1.20000000000000004e68 < a

                                                                                1. Initial program 89.8%

                                                                                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                2. Add Preprocessing
                                                                                3. Taylor expanded in 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. +-commutativeN/A

                                                                                    \[\leadsto \color{blue}{\left(b \cdot \left(\left(t + y\right) - 2\right) + x\right)} - a \cdot \left(t - 1\right) \]
                                                                                  2. associate--l+N/A

                                                                                    \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + \left(x - a \cdot \left(t - 1\right)\right)} \]
                                                                                  3. lower-fma.f64N/A

                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(b, \left(t + y\right) - 2, x - a \cdot \left(t - 1\right)\right)} \]
                                                                                  4. +-commutativeN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, \color{blue}{\left(y + t\right)} - 2, x - a \cdot \left(t - 1\right)\right) \]
                                                                                  5. associate-+r-N/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x - a \cdot \left(t - 1\right)\right) \]
                                                                                  6. lower-+.f64N/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x - a \cdot \left(t - 1\right)\right) \]
                                                                                  7. sub-negN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x - a \cdot \left(t - 1\right)\right) \]
                                                                                  8. lower-+.f64N/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x - a \cdot \left(t - 1\right)\right) \]
                                                                                  9. metadata-evalN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + \color{blue}{-2}\right), x - a \cdot \left(t - 1\right)\right) \]
                                                                                  10. sub-negN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \color{blue}{x + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)}\right) \]
                                                                                  11. +-commutativeN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + x}\right) \]
                                                                                  12. distribute-rgt-neg-inN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \color{blue}{a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} + x\right) \]
                                                                                  13. mul-1-negN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), a \cdot \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} + x\right) \]
                                                                                  14. lower-fma.f64N/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \color{blue}{\mathsf{fma}\left(a, -1 \cdot \left(t - 1\right), x\right)}\right) \]
                                                                                  15. sub-negN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, -1 \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}, x\right)\right) \]
                                                                                  16. metadata-evalN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, -1 \cdot \left(t + \color{blue}{-1}\right), x\right)\right) \]
                                                                                  17. +-commutativeN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, -1 \cdot \color{blue}{\left(-1 + t\right)}, x\right)\right) \]
                                                                                  18. distribute-lft-inN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, \color{blue}{-1 \cdot -1 + -1 \cdot t}, x\right)\right) \]
                                                                                  19. metadata-evalN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, \color{blue}{1} + -1 \cdot t, x\right)\right) \]
                                                                                  20. neg-mul-1N/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, 1 + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}, x\right)\right) \]
                                                                                  21. sub-negN/A

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, \color{blue}{1 - t}, x\right)\right) \]
                                                                                  22. lower--.f6486.6

                                                                                    \[\leadsto \mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, \color{blue}{1 - t}, x\right)\right) \]
                                                                                5. Applied rewrites86.6%

                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, 1 - t, 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 rewrites75.0%

                                                                                    \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x\right) \]

                                                                                  if -3.5000000000000001e114 < a < 1.20000000000000004e68

                                                                                  1. Initial program 97.5%

                                                                                    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                  2. Add Preprocessing
                                                                                  3. Taylor expanded in b around 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. associate--r+N/A

                                                                                      \[\leadsto \color{blue}{\left(x - a \cdot \left(t - 1\right)\right) - z \cdot \left(y - 1\right)} \]
                                                                                    2. sub-negN/A

                                                                                      \[\leadsto \color{blue}{\left(x + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)\right)} - z \cdot \left(y - 1\right) \]
                                                                                    3. +-commutativeN/A

                                                                                      \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + x\right)} - z \cdot \left(y - 1\right) \]
                                                                                    4. associate-+r-N/A

                                                                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x - z \cdot \left(y - 1\right)\right)} \]
                                                                                    5. distribute-rgt-neg-inN/A

                                                                                      \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} + \left(x - z \cdot \left(y - 1\right)\right) \]
                                                                                    6. mul-1-negN/A

                                                                                      \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} + \left(x - z \cdot \left(y - 1\right)\right) \]
                                                                                    7. lower-fma.f64N/A

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(a, -1 \cdot \left(t - 1\right), x - z \cdot \left(y - 1\right)\right)} \]
                                                                                    8. sub-negN/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, -1 \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}, x - z \cdot \left(y - 1\right)\right) \]
                                                                                    9. metadata-evalN/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, -1 \cdot \left(t + \color{blue}{-1}\right), x - z \cdot \left(y - 1\right)\right) \]
                                                                                    10. +-commutativeN/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, -1 \cdot \color{blue}{\left(-1 + t\right)}, x - z \cdot \left(y - 1\right)\right) \]
                                                                                    11. distribute-lft-inN/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, \color{blue}{-1 \cdot -1 + -1 \cdot t}, x - z \cdot \left(y - 1\right)\right) \]
                                                                                    12. metadata-evalN/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, \color{blue}{1} + -1 \cdot t, x - z \cdot \left(y - 1\right)\right) \]
                                                                                    13. neg-mul-1N/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, 1 + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}, x - z \cdot \left(y - 1\right)\right) \]
                                                                                    14. sub-negN/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x - z \cdot \left(y - 1\right)\right) \]
                                                                                    15. lower--.f64N/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x - z \cdot \left(y - 1\right)\right) \]
                                                                                    16. sub-negN/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)}\right) \]
                                                                                    17. +-commutativeN/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x}\right) \]
                                                                                    18. distribute-rgt-neg-inN/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right)} + x\right) \]
                                                                                    19. mul-1-negN/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, z \cdot \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} + x\right) \]
                                                                                    20. lower-fma.f64N/A

                                                                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(y - 1\right), x\right)}\right) \]
                                                                                  5. Applied rewrites59.8%

                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, 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 rewrites54.1%

                                                                                      \[\leadsto \mathsf{fma}\left(z, \color{blue}{1 - y}, x\right) \]
                                                                                  8. Recombined 2 regimes into one program.
                                                                                  9. Add Preprocessing

                                                                                  Alternative 17: 54.3% accurate, 1.8× speedup?

                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -6.8 \cdot 10^{+124}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+64}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                  (FPCore (x y z t a b)
                                                                                   :precision binary64
                                                                                   (let* ((t_1 (* t (- b a))))
                                                                                     (if (<= t -6.8e+124) t_1 (if (<= t 4.9e+64) (+ x (+ z a)) t_1))))
                                                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                                                  	double t_1 = t * (b - a);
                                                                                  	double tmp;
                                                                                  	if (t <= -6.8e+124) {
                                                                                  		tmp = t_1;
                                                                                  	} else if (t <= 4.9e+64) {
                                                                                  		tmp = x + (z + a);
                                                                                  	} else {
                                                                                  		tmp = t_1;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  real(8) function code(x, y, z, t, a, b)
                                                                                      real(8), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      real(8), intent (in) :: z
                                                                                      real(8), intent (in) :: t
                                                                                      real(8), intent (in) :: a
                                                                                      real(8), intent (in) :: b
                                                                                      real(8) :: t_1
                                                                                      real(8) :: tmp
                                                                                      t_1 = t * (b - a)
                                                                                      if (t <= (-6.8d+124)) then
                                                                                          tmp = t_1
                                                                                      else if (t <= 4.9d+64) then
                                                                                          tmp = x + (z + a)
                                                                                      else
                                                                                          tmp = t_1
                                                                                      end if
                                                                                      code = tmp
                                                                                  end function
                                                                                  
                                                                                  public static double code(double x, double y, double z, double t, double a, double b) {
                                                                                  	double t_1 = t * (b - a);
                                                                                  	double tmp;
                                                                                  	if (t <= -6.8e+124) {
                                                                                  		tmp = t_1;
                                                                                  	} else if (t <= 4.9e+64) {
                                                                                  		tmp = x + (z + a);
                                                                                  	} else {
                                                                                  		tmp = t_1;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  def code(x, y, z, t, a, b):
                                                                                  	t_1 = t * (b - a)
                                                                                  	tmp = 0
                                                                                  	if t <= -6.8e+124:
                                                                                  		tmp = t_1
                                                                                  	elif t <= 4.9e+64:
                                                                                  		tmp = x + (z + a)
                                                                                  	else:
                                                                                  		tmp = t_1
                                                                                  	return tmp
                                                                                  
                                                                                  function code(x, y, z, t, a, b)
                                                                                  	t_1 = Float64(t * Float64(b - a))
                                                                                  	tmp = 0.0
                                                                                  	if (t <= -6.8e+124)
                                                                                  		tmp = t_1;
                                                                                  	elseif (t <= 4.9e+64)
                                                                                  		tmp = Float64(x + Float64(z + a));
                                                                                  	else
                                                                                  		tmp = t_1;
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  function tmp_2 = code(x, y, z, t, a, b)
                                                                                  	t_1 = t * (b - a);
                                                                                  	tmp = 0.0;
                                                                                  	if (t <= -6.8e+124)
                                                                                  		tmp = t_1;
                                                                                  	elseif (t <= 4.9e+64)
                                                                                  		tmp = x + (z + a);
                                                                                  	else
                                                                                  		tmp = t_1;
                                                                                  	end
                                                                                  	tmp_2 = tmp;
                                                                                  end
                                                                                  
                                                                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e+124], t$95$1, If[LessEqual[t, 4.9e+64], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  \begin{array}{l}
                                                                                  t_1 := t \cdot \left(b - a\right)\\
                                                                                  \mathbf{if}\;t \leq -6.8 \cdot 10^{+124}:\\
                                                                                  \;\;\;\;t\_1\\
                                                                                  
                                                                                  \mathbf{elif}\;t \leq 4.9 \cdot 10^{+64}:\\
                                                                                  \;\;\;\;x + \left(z + a\right)\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;t\_1\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 2 regimes
                                                                                  2. if t < -6.8e124 or 4.9000000000000003e64 < t

                                                                                    1. Initial program 88.1%

                                                                                      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                    2. Add Preprocessing
                                                                                    3. Taylor expanded in t around inf

                                                                                      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. lower-*.f64N/A

                                                                                        \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                      2. lower--.f6475.2

                                                                                        \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
                                                                                    5. Applied rewrites75.2%

                                                                                      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]

                                                                                    if -6.8e124 < t < 4.9000000000000003e64

                                                                                    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 t around 0

                                                                                      \[\leadsto \color{blue}{\left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. +-commutativeN/A

                                                                                        \[\leadsto \color{blue}{\left(b \cdot \left(y - 2\right) + x\right)} - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
                                                                                      2. associate--l+N/A

                                                                                        \[\leadsto \color{blue}{b \cdot \left(y - 2\right) + \left(x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
                                                                                      3. lower-fma.f64N/A

                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, y - 2, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
                                                                                      4. sub-negN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, \color{blue}{y + \left(\mathsf{neg}\left(2\right)\right)}, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
                                                                                      5. lower-+.f64N/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, \color{blue}{y + \left(\mathsf{neg}\left(2\right)\right)}, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
                                                                                      6. metadata-evalN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + \color{blue}{-2}, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
                                                                                      7. sub-negN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{x + \left(\mathsf{neg}\left(\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)\right)}\right) \]
                                                                                      8. +-commutativeN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)\right) + x}\right) \]
                                                                                      9. distribute-neg-inN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{\left(\left(\mathsf{neg}\left(-1 \cdot a\right)\right) + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)} + x\right) \]
                                                                                      10. mul-1-negN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, \left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right) + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right) + x\right) \]
                                                                                      11. remove-double-negN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, \left(\color{blue}{a} + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right) + x\right) \]
                                                                                      12. associate-+l+N/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{a + \left(\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x\right)}\right) \]
                                                                                      13. +-commutativeN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)}\right) \]
                                                                                      14. sub-negN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(x - z \cdot \left(y - 1\right)\right)}\right) \]
                                                                                      15. lower-+.f64N/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{a + \left(x - z \cdot \left(y - 1\right)\right)}\right) \]
                                                                                      16. sub-negN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)}\right) \]
                                                                                      17. +-commutativeN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x\right)}\right) \]
                                                                                      18. distribute-rgt-neg-inN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, a + \left(\color{blue}{z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right)} + x\right)\right) \]
                                                                                      19. mul-1-negN/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, a + \left(z \cdot \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} + x\right)\right) \]
                                                                                      20. lower-fma.f64N/A

                                                                                        \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(y - 1\right), x\right)}\right) \]
                                                                                    5. Applied rewrites94.5%

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, y + -2, a + \mathsf{fma}\left(z, 1 - y, x\right)\right)} \]
                                                                                    6. Taylor expanded in y around 0

                                                                                      \[\leadsto a + \color{blue}{\left(x + \left(z + -2 \cdot b\right)\right)} \]
                                                                                    7. Step-by-step derivation
                                                                                      1. Applied rewrites56.5%

                                                                                        \[\leadsto x + \color{blue}{\left(a + \mathsf{fma}\left(b, -2, z\right)\right)} \]
                                                                                      2. Taylor expanded in b around 0

                                                                                        \[\leadsto x + \left(a + z\right) \]
                                                                                      3. Step-by-step derivation
                                                                                        1. Applied rewrites47.0%

                                                                                          \[\leadsto x + \left(a + z\right) \]
                                                                                      4. Recombined 2 regimes into one program.
                                                                                      5. Final simplification58.1%

                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+124}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+64}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
                                                                                      6. Add Preprocessing

                                                                                      Alternative 18: 30.3% accurate, 2.1× speedup?

                                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.6 \cdot 10^{+167}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+65}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
                                                                                      (FPCore (x y z t a b)
                                                                                       :precision binary64
                                                                                       (if (<= t -7.6e+167) (* t b) (if (<= t 1.6e+65) (+ z a) (* t b))))
                                                                                      double code(double x, double y, double z, double t, double a, double b) {
                                                                                      	double tmp;
                                                                                      	if (t <= -7.6e+167) {
                                                                                      		tmp = t * b;
                                                                                      	} else if (t <= 1.6e+65) {
                                                                                      		tmp = z + a;
                                                                                      	} else {
                                                                                      		tmp = t * b;
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      real(8) function code(x, y, z, t, a, b)
                                                                                          real(8), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          real(8), intent (in) :: z
                                                                                          real(8), intent (in) :: t
                                                                                          real(8), intent (in) :: a
                                                                                          real(8), intent (in) :: b
                                                                                          real(8) :: tmp
                                                                                          if (t <= (-7.6d+167)) then
                                                                                              tmp = t * b
                                                                                          else if (t <= 1.6d+65) then
                                                                                              tmp = z + a
                                                                                          else
                                                                                              tmp = t * b
                                                                                          end if
                                                                                          code = tmp
                                                                                      end function
                                                                                      
                                                                                      public static double code(double x, double y, double z, double t, double a, double b) {
                                                                                      	double tmp;
                                                                                      	if (t <= -7.6e+167) {
                                                                                      		tmp = t * b;
                                                                                      	} else if (t <= 1.6e+65) {
                                                                                      		tmp = z + a;
                                                                                      	} else {
                                                                                      		tmp = t * b;
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      def code(x, y, z, t, a, b):
                                                                                      	tmp = 0
                                                                                      	if t <= -7.6e+167:
                                                                                      		tmp = t * b
                                                                                      	elif t <= 1.6e+65:
                                                                                      		tmp = z + a
                                                                                      	else:
                                                                                      		tmp = t * b
                                                                                      	return tmp
                                                                                      
                                                                                      function code(x, y, z, t, a, b)
                                                                                      	tmp = 0.0
                                                                                      	if (t <= -7.6e+167)
                                                                                      		tmp = Float64(t * b);
                                                                                      	elseif (t <= 1.6e+65)
                                                                                      		tmp = Float64(z + a);
                                                                                      	else
                                                                                      		tmp = Float64(t * b);
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      function tmp_2 = code(x, y, z, t, a, b)
                                                                                      	tmp = 0.0;
                                                                                      	if (t <= -7.6e+167)
                                                                                      		tmp = t * b;
                                                                                      	elseif (t <= 1.6e+65)
                                                                                      		tmp = z + a;
                                                                                      	else
                                                                                      		tmp = t * b;
                                                                                      	end
                                                                                      	tmp_2 = tmp;
                                                                                      end
                                                                                      
                                                                                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.6e+167], N[(t * b), $MachinePrecision], If[LessEqual[t, 1.6e+65], N[(z + a), $MachinePrecision], N[(t * b), $MachinePrecision]]]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      
                                                                                      \\
                                                                                      \begin{array}{l}
                                                                                      \mathbf{if}\;t \leq -7.6 \cdot 10^{+167}:\\
                                                                                      \;\;\;\;t \cdot b\\
                                                                                      
                                                                                      \mathbf{elif}\;t \leq 1.6 \cdot 10^{+65}:\\
                                                                                      \;\;\;\;z + a\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;t \cdot b\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 2 regimes
                                                                                      2. if t < -7.59999999999999987e167 or 1.60000000000000003e65 < t

                                                                                        1. Initial program 87.1%

                                                                                          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                        2. Add Preprocessing
                                                                                        3. Taylor expanded in t around inf

                                                                                          \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. lower-*.f64N/A

                                                                                            \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                          2. lower--.f6476.2

                                                                                            \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
                                                                                        5. Applied rewrites76.2%

                                                                                          \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                                                                        6. Taylor expanded in b around inf

                                                                                          \[\leadsto b \cdot \color{blue}{t} \]
                                                                                        7. Step-by-step derivation
                                                                                          1. Applied rewrites35.6%

                                                                                            \[\leadsto b \cdot \color{blue}{t} \]

                                                                                          if -7.59999999999999987e167 < t < 1.60000000000000003e65

                                                                                          1. Initial program 98.8%

                                                                                            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                          2. Add Preprocessing
                                                                                          3. Taylor expanded in t around 0

                                                                                            \[\leadsto \color{blue}{\left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. +-commutativeN/A

                                                                                              \[\leadsto \color{blue}{\left(b \cdot \left(y - 2\right) + x\right)} - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
                                                                                            2. associate--l+N/A

                                                                                              \[\leadsto \color{blue}{b \cdot \left(y - 2\right) + \left(x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
                                                                                            3. lower-fma.f64N/A

                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(b, y - 2, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
                                                                                            4. sub-negN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, \color{blue}{y + \left(\mathsf{neg}\left(2\right)\right)}, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
                                                                                            5. lower-+.f64N/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, \color{blue}{y + \left(\mathsf{neg}\left(2\right)\right)}, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
                                                                                            6. metadata-evalN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + \color{blue}{-2}, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
                                                                                            7. sub-negN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{x + \left(\mathsf{neg}\left(\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)\right)}\right) \]
                                                                                            8. +-commutativeN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)\right) + x}\right) \]
                                                                                            9. distribute-neg-inN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{\left(\left(\mathsf{neg}\left(-1 \cdot a\right)\right) + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)} + x\right) \]
                                                                                            10. mul-1-negN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, \left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right) + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right) + x\right) \]
                                                                                            11. remove-double-negN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, \left(\color{blue}{a} + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right) + x\right) \]
                                                                                            12. associate-+l+N/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{a + \left(\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x\right)}\right) \]
                                                                                            13. +-commutativeN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)}\right) \]
                                                                                            14. sub-negN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(x - z \cdot \left(y - 1\right)\right)}\right) \]
                                                                                            15. lower-+.f64N/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{a + \left(x - z \cdot \left(y - 1\right)\right)}\right) \]
                                                                                            16. sub-negN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)}\right) \]
                                                                                            17. +-commutativeN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x\right)}\right) \]
                                                                                            18. distribute-rgt-neg-inN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, a + \left(\color{blue}{z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right)} + x\right)\right) \]
                                                                                            19. mul-1-negN/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, a + \left(z \cdot \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} + x\right)\right) \]
                                                                                            20. lower-fma.f64N/A

                                                                                              \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(y - 1\right), x\right)}\right) \]
                                                                                          5. Applied rewrites91.9%

                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(b, y + -2, a + \mathsf{fma}\left(z, 1 - y, x\right)\right)} \]
                                                                                          6. Taylor expanded in y around 0

                                                                                            \[\leadsto a + \color{blue}{\left(x + \left(z + -2 \cdot b\right)\right)} \]
                                                                                          7. Step-by-step derivation
                                                                                            1. Applied rewrites55.2%

                                                                                              \[\leadsto x + \color{blue}{\left(a + \mathsf{fma}\left(b, -2, z\right)\right)} \]
                                                                                            2. Taylor expanded in x around 0

                                                                                              \[\leadsto a + \left(z + \color{blue}{-2 \cdot b}\right) \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites41.7%

                                                                                                \[\leadsto \mathsf{fma}\left(b, -2, a + z\right) \]
                                                                                              2. Taylor expanded in b around 0

                                                                                                \[\leadsto a + z \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites32.6%

                                                                                                  \[\leadsto a + z \]
                                                                                              4. Recombined 2 regimes into one program.
                                                                                              5. Final simplification33.7%

                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.6 \cdot 10^{+167}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+65}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
                                                                                              6. Add Preprocessing

                                                                                              Alternative 19: 20.4% accurate, 9.3× speedup?

                                                                                              \[\begin{array}{l} \\ z + a \end{array} \]
                                                                                              (FPCore (x y z t a b) :precision binary64 (+ z a))
                                                                                              double code(double x, double y, double z, double t, double a, double b) {
                                                                                              	return z + a;
                                                                                              }
                                                                                              
                                                                                              real(8) function code(x, y, z, t, a, b)
                                                                                                  real(8), intent (in) :: x
                                                                                                  real(8), intent (in) :: y
                                                                                                  real(8), intent (in) :: z
                                                                                                  real(8), intent (in) :: t
                                                                                                  real(8), intent (in) :: a
                                                                                                  real(8), intent (in) :: b
                                                                                                  code = z + a
                                                                                              end function
                                                                                              
                                                                                              public static double code(double x, double y, double z, double t, double a, double b) {
                                                                                              	return z + a;
                                                                                              }
                                                                                              
                                                                                              def code(x, y, z, t, a, b):
                                                                                              	return z + a
                                                                                              
                                                                                              function code(x, y, z, t, a, b)
                                                                                              	return Float64(z + a)
                                                                                              end
                                                                                              
                                                                                              function tmp = code(x, y, z, t, a, b)
                                                                                              	tmp = z + a;
                                                                                              end
                                                                                              
                                                                                              code[x_, y_, z_, t_, a_, b_] := N[(z + a), $MachinePrecision]
                                                                                              
                                                                                              \begin{array}{l}
                                                                                              
                                                                                              \\
                                                                                              z + a
                                                                                              \end{array}
                                                                                              
                                                                                              Derivation
                                                                                              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 0

                                                                                                \[\leadsto \color{blue}{\left(x + b \cdot \left(y - 2\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)} \]
                                                                                              4. Step-by-step derivation
                                                                                                1. +-commutativeN/A

                                                                                                  \[\leadsto \color{blue}{\left(b \cdot \left(y - 2\right) + x\right)} - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right) \]
                                                                                                2. associate--l+N/A

                                                                                                  \[\leadsto \color{blue}{b \cdot \left(y - 2\right) + \left(x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
                                                                                                3. lower-fma.f64N/A

                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(b, y - 2, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)} \]
                                                                                                4. sub-negN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, \color{blue}{y + \left(\mathsf{neg}\left(2\right)\right)}, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
                                                                                                5. lower-+.f64N/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, \color{blue}{y + \left(\mathsf{neg}\left(2\right)\right)}, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
                                                                                                6. metadata-evalN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + \color{blue}{-2}, x - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right) \]
                                                                                                7. sub-negN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{x + \left(\mathsf{neg}\left(\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)\right)}\right) \]
                                                                                                8. +-commutativeN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot a + z \cdot \left(y - 1\right)\right)\right)\right) + x}\right) \]
                                                                                                9. distribute-neg-inN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{\left(\left(\mathsf{neg}\left(-1 \cdot a\right)\right) + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)} + x\right) \]
                                                                                                10. mul-1-negN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, \left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right) + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right) + x\right) \]
                                                                                                11. remove-double-negN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, \left(\color{blue}{a} + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right) + x\right) \]
                                                                                                12. associate-+l+N/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{a + \left(\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x\right)}\right) \]
                                                                                                13. +-commutativeN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)}\right) \]
                                                                                                14. sub-negN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(x - z \cdot \left(y - 1\right)\right)}\right) \]
                                                                                                15. lower-+.f64N/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, \color{blue}{a + \left(x - z \cdot \left(y - 1\right)\right)}\right) \]
                                                                                                16. sub-negN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)\right)}\right) \]
                                                                                                17. +-commutativeN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\left(\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x\right)}\right) \]
                                                                                                18. distribute-rgt-neg-inN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, a + \left(\color{blue}{z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right)} + x\right)\right) \]
                                                                                                19. mul-1-negN/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, a + \left(z \cdot \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} + x\right)\right) \]
                                                                                                20. lower-fma.f64N/A

                                                                                                  \[\leadsto \mathsf{fma}\left(b, y + -2, a + \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(y - 1\right), x\right)}\right) \]
                                                                                              5. Applied rewrites70.2%

                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(b, y + -2, a + \mathsf{fma}\left(z, 1 - y, x\right)\right)} \]
                                                                                              6. Taylor expanded in y around 0

                                                                                                \[\leadsto a + \color{blue}{\left(x + \left(z + -2 \cdot b\right)\right)} \]
                                                                                              7. Step-by-step derivation
                                                                                                1. Applied rewrites40.8%

                                                                                                  \[\leadsto x + \color{blue}{\left(a + \mathsf{fma}\left(b, -2, z\right)\right)} \]
                                                                                                2. Taylor expanded in x around 0

                                                                                                  \[\leadsto a + \left(z + \color{blue}{-2 \cdot b}\right) \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites28.6%

                                                                                                    \[\leadsto \mathsf{fma}\left(b, -2, a + z\right) \]
                                                                                                  2. Taylor expanded in b around 0

                                                                                                    \[\leadsto a + z \]
                                                                                                  3. Step-by-step derivation
                                                                                                    1. Applied rewrites22.7%

                                                                                                      \[\leadsto a + z \]
                                                                                                    2. Final simplification22.7%

                                                                                                      \[\leadsto z + a \]
                                                                                                    3. Add Preprocessing

                                                                                                    Reproduce

                                                                                                    ?
                                                                                                    herbie shell --seed 2024222 
                                                                                                    (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)))