Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A

Percentage Accurate: 95.6% → 98.4%
Time: 11.0s
Alternatives: 19
Speedup: 0.9×

Specification

?
\[\begin{array}{l} \\ \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.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 * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\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.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.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 * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 98.4% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(b \cdot 27, a, 2 \cdot x\right)\\ \mathbf{if}\;y \cdot 9 \leq -5 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot z, -9 \cdot y, t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(t \cdot y\right) \cdot 9, -z, t\_1\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (fma (* b 27.0) a (* 2.0 x))))
   (if (<= (* y 9.0) -5e+54)
     (fma (* t z) (* -9.0 y) t_1)
     (fma (* (* t y) 9.0) (- z) t_1))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma((b * 27.0), a, (2.0 * x));
	double tmp;
	if ((y * 9.0) <= -5e+54) {
		tmp = fma((t * z), (-9.0 * y), t_1);
	} else {
		tmp = fma(((t * y) * 9.0), -z, t_1);
	}
	return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = fma(Float64(b * 27.0), a, Float64(2.0 * x))
	tmp = 0.0
	if (Float64(y * 9.0) <= -5e+54)
		tmp = fma(Float64(t * z), Float64(-9.0 * y), t_1);
	else
		tmp = fma(Float64(Float64(t * y) * 9.0), Float64(-z), t_1);
	end
	return tmp
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * 27.0), $MachinePrecision] * a + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(y * 9.0), $MachinePrecision], -5e+54], N[(N[(t * z), $MachinePrecision] * N[(-9.0 * y), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(N[(t * y), $MachinePrecision] * 9.0), $MachinePrecision] * (-z) + t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b \cdot 27, a, 2 \cdot x\right)\\
\mathbf{if}\;y \cdot 9 \leq -5 \cdot 10^{+54}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot z, -9 \cdot y, t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(t \cdot y\right) \cdot 9, -z, t\_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 y #s(literal 9 binary64)) < -5.00000000000000005e54

    1. Initial program 85.4%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
      2. lift--.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
      3. lift-*.f64N/A

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(\left(y \cdot 9\right) \cdot z\right) \cdot t}\right) + \left(a \cdot 27\right) \cdot b \]
      4. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y \cdot 9\right) \cdot z\right)\right) \cdot t + \left(x \cdot 2 + \left(a \cdot 27\right) \cdot b\right)} \]
      7. lift-*.f64N/A

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot t, \mathsf{neg}\left(y \cdot 9\right), \left(a \cdot 27\right) \cdot b + x \cdot 2\right)} \]
    4. Applied rewrites99.8%

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

    if -5.00000000000000005e54 < (*.f64 y #s(literal 9 binary64))

    1. Initial program 97.4%

      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
      2. lift--.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
      3. lift-*.f64N/A

        \[\leadsto \left(x \cdot 2 - \color{blue}{\left(\left(y \cdot 9\right) \cdot z\right) \cdot t}\right) + \left(a \cdot 27\right) \cdot b \]
      4. fp-cancel-sub-sign-invN/A

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(\left(y \cdot 9\right) \cdot z\right)\right)} + \left(x \cdot 2 + \left(a \cdot 27\right) \cdot b\right) \]
      8. lift-*.f64N/A

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

        \[\leadsto t \cdot \color{blue}{\left(\left(y \cdot 9\right) \cdot \left(\mathsf{neg}\left(z\right)\right)\right)} + \left(x \cdot 2 + \left(a \cdot 27\right) \cdot b\right) \]
      10. associate-*r*N/A

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot \left(y \cdot 9\right), \mathsf{neg}\left(z\right), \left(a \cdot 27\right) \cdot b + x \cdot 2\right)} \]
      13. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t \cdot \color{blue}{\left(y \cdot 9\right)}, \mathsf{neg}\left(z\right), \left(a \cdot 27\right) \cdot b + x \cdot 2\right) \]
      14. associate-*r*N/A

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

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

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

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

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

Alternative 2: 85.9% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+303}:\\ \;\;\;\;\mathsf{fma}\left(b \cdot a, 27, \left(\left(-9 \cdot y\right) \cdot t\right) \cdot z\right)\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+90}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot z, t \cdot -9, \left(27 \cdot a\right) \cdot b\right)\\ \mathbf{elif}\;t\_1 \leq 0.74:\\ \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (* (* y 9.0) z) t)))
   (if (<= t_1 -4e+303)
     (fma (* b a) 27.0 (* (* (* -9.0 y) t) z))
     (if (<= t_1 -1e+90)
       (fma (* y z) (* t -9.0) (* (* 27.0 a) b))
       (if (<= t_1 0.74)
         (fma 2.0 x (* (* b a) 27.0))
         (+ x (fma (* t (* -9.0 y)) z x)))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((y * 9.0) * z) * t;
	double tmp;
	if (t_1 <= -4e+303) {
		tmp = fma((b * a), 27.0, (((-9.0 * y) * t) * z));
	} else if (t_1 <= -1e+90) {
		tmp = fma((y * z), (t * -9.0), ((27.0 * a) * b));
	} else if (t_1 <= 0.74) {
		tmp = fma(2.0, x, ((b * a) * 27.0));
	} else {
		tmp = x + fma((t * (-9.0 * y)), z, x);
	}
	return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b])
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(y * 9.0) * z) * t)
	tmp = 0.0
	if (t_1 <= -4e+303)
		tmp = fma(Float64(b * a), 27.0, Float64(Float64(Float64(-9.0 * y) * t) * z));
	elseif (t_1 <= -1e+90)
		tmp = fma(Float64(y * z), Float64(t * -9.0), Float64(Float64(27.0 * a) * b));
	elseif (t_1 <= 0.74)
		tmp = fma(2.0, x, Float64(Float64(b * a) * 27.0));
	else
		tmp = Float64(x + fma(Float64(t * Float64(-9.0 * y)), z, x));
	end
	return tmp
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+303], N[(N[(b * a), $MachinePrecision] * 27.0 + N[(N[(N[(-9.0 * y), $MachinePrecision] * t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e+90], N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision] + N[(N[(27.0 * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.74], N[(2.0 * x + N[(N[(b * a), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+303}:\\
\;\;\;\;\mathsf{fma}\left(b \cdot a, 27, \left(\left(-9 \cdot y\right) \cdot t\right) \cdot z\right)\\

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+90}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot z, t \cdot -9, \left(27 \cdot a\right) \cdot b\right)\\

\mathbf{elif}\;t\_1 \leq 0.74:\\
\;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -4e303

    1. Initial program 70.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-9 \cdot \left(y \cdot z\right)\right)} \cdot t + \left(a \cdot 27\right) \cdot b \]
      5. *-commutativeN/A

        \[\leadsto \left(-9 \cdot \color{blue}{\left(z \cdot y\right)}\right) \cdot t + \left(a \cdot 27\right) \cdot b \]
      6. lower-*.f6470.1

        \[\leadsto \left(-9 \cdot \color{blue}{\left(z \cdot y\right)}\right) \cdot t + \left(a \cdot 27\right) \cdot b \]
    5. Applied rewrites70.1%

      \[\leadsto \color{blue}{\left(-9 \cdot \left(z \cdot y\right)\right) \cdot t} + \left(a \cdot 27\right) \cdot b \]
    6. Step-by-step derivation
      1. lift-+.f64N/A

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

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t} \]
      3. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b} + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{b \cdot \left(a \cdot 27\right)} + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t \]
      5. lift-*.f64N/A

        \[\leadsto b \cdot \color{blue}{\left(a \cdot 27\right)} + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t \]
      6. associate-*l*N/A

        \[\leadsto \color{blue}{\left(b \cdot a\right) \cdot 27} + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t \]
      7. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(b \cdot a\right)} \cdot 27 + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t \]
      8. lower-fma.f6470.1

        \[\leadsto \color{blue}{\mathsf{fma}\left(b \cdot a, 27, \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t\right)} \]
    7. Applied rewrites99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(b \cdot a, 27, \left(\left(-9 \cdot y\right) \cdot t\right) \cdot z\right)} \]

    if -4e303 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999966e89

    1. Initial program 99.4%

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

      \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

        \[\leadsto 27 \cdot \left(a \cdot b\right) + \color{blue}{-9} \cdot \left(t \cdot \left(y \cdot z\right)\right) \]
      3. +-commutativeN/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(-9, t \cdot \left(y \cdot z\right), 27 \cdot \left(a \cdot b\right)\right)} \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(y \cdot z\right) \cdot t}, 27 \cdot \left(a \cdot b\right)\right) \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(y \cdot z\right) \cdot t}, 27 \cdot \left(a \cdot b\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(z \cdot y\right)} \cdot t, 27 \cdot \left(a \cdot b\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(z \cdot y\right)} \cdot t, 27 \cdot \left(a \cdot b\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
      12. lower-*.f6490.9

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \left(b \cdot a\right) \cdot 27\right)} \]
    6. Step-by-step derivation
      1. Applied rewrites90.8%

        \[\leadsto \mathsf{fma}\left(y \cdot z, \color{blue}{t \cdot -9}, \left(27 \cdot a\right) \cdot b\right) \]

      if -9.99999999999999966e89 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 0.73999999999999999

      1. Initial program 99.8%

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

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

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

          \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
        3. lower-*.f64N/A

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

          \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
        5. lower-*.f6493.4

          \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
      5. Applied rewrites93.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)} \]

      if 0.73999999999999999 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)

      1. Initial program 90.6%

        \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-+.f64N/A

          \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
        2. lift--.f64N/A

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

          \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
        4. lift-*.f64N/A

          \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
        5. *-commutativeN/A

          \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
        6. count-2-revN/A

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

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

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

          \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
        10. lift-*.f64N/A

          \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
        11. fp-cancel-sub-sign-invN/A

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

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

          \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
        14. lift-*.f64N/A

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

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

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

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

          \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
        19. lift-*.f64N/A

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

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

          \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
        22. lift-*.f64N/A

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

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

          \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
        25. lift-*.f64N/A

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

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

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

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

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

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

          \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
        3. +-commutativeN/A

          \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
        4. *-commutativeN/A

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

          \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
        6. *-commutativeN/A

          \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
        7. lower-*.f64N/A

          \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
        8. *-commutativeN/A

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

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

          \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
        11. *-commutativeN/A

          \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
        12. lower-*.f6489.0

          \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
      7. Applied rewrites89.0%

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

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

          \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
        2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

          \[\leadsto x + \left(\color{blue}{\left(z \cdot -9\right) \cdot \left(t \cdot y\right)} + x\right) \]
        8. *-commutativeN/A

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

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

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

          \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
        12. lower-*.f6482.8

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

        \[\leadsto x + \color{blue}{\mathsf{fma}\left(-9 \cdot z, y \cdot t, x\right)} \]
      11. Step-by-step derivation
        1. Applied rewrites82.8%

          \[\leadsto x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), \color{blue}{z}, x\right) \]
      12. Recombined 4 regimes into one program.
      13. Add Preprocessing

      Alternative 3: 85.4% accurate, 0.6× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90} \lor \neg \left(t\_1 \leq 0.74\right):\\ \;\;\;\;x + \mathsf{fma}\left(y, t \cdot \left(-9 \cdot z\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* (* (* y 9.0) z) t)))
         (if (or (<= t_1 -1e+90) (not (<= t_1 0.74)))
           (+ x (fma y (* t (* -9.0 z)) x))
           (fma 2.0 x (* (* b a) 27.0)))))
      assert(x < y && y < z && z < t && t < a && a < b);
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = ((y * 9.0) * z) * t;
      	double tmp;
      	if ((t_1 <= -1e+90) || !(t_1 <= 0.74)) {
      		tmp = x + fma(y, (t * (-9.0 * z)), x);
      	} else {
      		tmp = fma(2.0, x, ((b * a) * 27.0));
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b = sort([x, y, z, t, a, b])
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(Float64(y * 9.0) * z) * t)
      	tmp = 0.0
      	if ((t_1 <= -1e+90) || !(t_1 <= 0.74))
      		tmp = Float64(x + fma(y, Float64(t * Float64(-9.0 * z)), x));
      	else
      		tmp = fma(2.0, x, Float64(Float64(b * a) * 27.0));
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+90], N[Not[LessEqual[t$95$1, 0.74]], $MachinePrecision]], N[(x + N[(y * N[(t * N[(-9.0 * z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(2.0 * x + N[(N[(b * a), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
      \\
      \begin{array}{l}
      t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90} \lor \neg \left(t\_1 \leq 0.74\right):\\
      \;\;\;\;x + \mathsf{fma}\left(y, t \cdot \left(-9 \cdot z\right), x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999966e89 or 0.73999999999999999 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)

        1. Initial program 88.3%

          \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
          2. lift--.f64N/A

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

            \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
          4. lift-*.f64N/A

            \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
          5. *-commutativeN/A

            \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
          6. count-2-revN/A

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

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

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

            \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
          10. lift-*.f64N/A

            \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
          11. fp-cancel-sub-sign-invN/A

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

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

            \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
          14. lift-*.f64N/A

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

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

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

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

            \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
          19. lift-*.f64N/A

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

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

            \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
          22. lift-*.f64N/A

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

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

            \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
          25. lift-*.f64N/A

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

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

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

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

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

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

            \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
          3. +-commutativeN/A

            \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
          4. *-commutativeN/A

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

            \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
          6. *-commutativeN/A

            \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
          7. lower-*.f64N/A

            \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
          8. *-commutativeN/A

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

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

            \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
          11. *-commutativeN/A

            \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
          12. lower-*.f6489.2

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

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

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

            \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
          2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

            \[\leadsto x + \left(\color{blue}{\left(z \cdot -9\right) \cdot \left(t \cdot y\right)} + x\right) \]
          8. *-commutativeN/A

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

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

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

            \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
          12. lower-*.f6481.1

            \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
        10. Applied rewrites81.1%

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

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

          if -9.99999999999999966e89 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 0.73999999999999999

          1. Initial program 99.8%

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

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

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

              \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
            3. lower-*.f64N/A

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

              \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
            5. lower-*.f6493.4

              \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
          5. Applied rewrites93.4%

            \[\leadsto \color{blue}{\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)} \]
        12. Recombined 2 regimes into one program.
        13. Final simplification87.9%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(y \cdot 9\right) \cdot z\right) \cdot t \leq -1 \cdot 10^{+90} \lor \neg \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t \leq 0.74\right):\\ \;\;\;\;x + \mathsf{fma}\left(y, t \cdot \left(-9 \cdot z\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\ \end{array} \]
        14. Add Preprocessing

        Alternative 4: 84.8% accurate, 0.6× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90}:\\ \;\;\;\;\left(t \cdot \left(-9 \cdot z\right)\right) \cdot y + \left(a \cdot 27\right) \cdot b\\ \mathbf{elif}\;t\_1 \leq 0.74:\\ \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (* (* (* y 9.0) z) t)))
           (if (<= t_1 -1e+90)
             (+ (* (* t (* -9.0 z)) y) (* (* a 27.0) b))
             (if (<= t_1 0.74)
               (fma 2.0 x (* (* b a) 27.0))
               (+ x (fma (* t (* -9.0 y)) z x))))))
        assert(x < y && y < z && z < t && t < a && a < b);
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = ((y * 9.0) * z) * t;
        	double tmp;
        	if (t_1 <= -1e+90) {
        		tmp = ((t * (-9.0 * z)) * y) + ((a * 27.0) * b);
        	} else if (t_1 <= 0.74) {
        		tmp = fma(2.0, x, ((b * a) * 27.0));
        	} else {
        		tmp = x + fma((t * (-9.0 * y)), z, x);
        	}
        	return tmp;
        }
        
        x, y, z, t, a, b = sort([x, y, z, t, a, b])
        function code(x, y, z, t, a, b)
        	t_1 = Float64(Float64(Float64(y * 9.0) * z) * t)
        	tmp = 0.0
        	if (t_1 <= -1e+90)
        		tmp = Float64(Float64(Float64(t * Float64(-9.0 * z)) * y) + Float64(Float64(a * 27.0) * b));
        	elseif (t_1 <= 0.74)
        		tmp = fma(2.0, x, Float64(Float64(b * a) * 27.0));
        	else
        		tmp = Float64(x + fma(Float64(t * Float64(-9.0 * y)), z, x));
        	end
        	return tmp
        end
        
        NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+90], N[(N[(N[(t * N[(-9.0 * z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.74], N[(2.0 * x + N[(N[(b * a), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
        \\
        \begin{array}{l}
        t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90}:\\
        \;\;\;\;\left(t \cdot \left(-9 \cdot z\right)\right) \cdot y + \left(a \cdot 27\right) \cdot b\\
        
        \mathbf{elif}\;t\_1 \leq 0.74:\\
        \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999966e89

          1. Initial program 85.1%

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

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

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

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

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

              \[\leadsto \color{blue}{\left(-9 \cdot \left(y \cdot z\right)\right)} \cdot t + \left(a \cdot 27\right) \cdot b \]
            5. *-commutativeN/A

              \[\leadsto \left(-9 \cdot \color{blue}{\left(z \cdot y\right)}\right) \cdot t + \left(a \cdot 27\right) \cdot b \]
            6. lower-*.f6480.8

              \[\leadsto \left(-9 \cdot \color{blue}{\left(z \cdot y\right)}\right) \cdot t + \left(a \cdot 27\right) \cdot b \]
          5. Applied rewrites80.8%

            \[\leadsto \color{blue}{\left(-9 \cdot \left(z \cdot y\right)\right) \cdot t} + \left(a \cdot 27\right) \cdot b \]
          6. Step-by-step derivation
            1. Applied rewrites85.0%

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

            if -9.99999999999999966e89 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 0.73999999999999999

            1. Initial program 99.8%

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

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

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

                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
              3. lower-*.f64N/A

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

                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
              5. lower-*.f6493.4

                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
            5. Applied rewrites93.4%

              \[\leadsto \color{blue}{\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)} \]

            if 0.73999999999999999 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)

            1. Initial program 90.6%

              \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
              2. lift--.f64N/A

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

                \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
              4. lift-*.f64N/A

                \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
              5. *-commutativeN/A

                \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
              6. count-2-revN/A

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

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

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

                \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
              10. lift-*.f64N/A

                \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
              11. fp-cancel-sub-sign-invN/A

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

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

                \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
              14. lift-*.f64N/A

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

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

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

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

                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
              19. lift-*.f64N/A

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

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

                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
              22. lift-*.f64N/A

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

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

                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
              25. lift-*.f64N/A

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

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

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

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

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

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

                \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
              3. +-commutativeN/A

                \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
              4. *-commutativeN/A

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

                \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
              6. *-commutativeN/A

                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
              7. lower-*.f64N/A

                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
              8. *-commutativeN/A

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

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

                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
              11. *-commutativeN/A

                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
              12. lower-*.f6489.0

                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
            7. Applied rewrites89.0%

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

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

                \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
              2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                \[\leadsto x + \left(\color{blue}{\left(z \cdot -9\right) \cdot \left(t \cdot y\right)} + x\right) \]
              8. *-commutativeN/A

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

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

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

                \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
              12. lower-*.f6482.8

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

              \[\leadsto x + \color{blue}{\mathsf{fma}\left(-9 \cdot z, y \cdot t, x\right)} \]
            11. Step-by-step derivation
              1. Applied rewrites82.8%

                \[\leadsto x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), \color{blue}{z}, x\right) \]
            12. Recombined 3 regimes into one program.
            13. Add Preprocessing

            Alternative 5: 85.1% accurate, 0.6× speedup?

            \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot z, t \cdot -9, \left(27 \cdot a\right) \cdot b\right)\\ \mathbf{elif}\;t\_1 \leq 0.74:\\ \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\ \end{array} \end{array} \]
            NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (* (* (* y 9.0) z) t)))
               (if (<= t_1 -1e+90)
                 (fma (* y z) (* t -9.0) (* (* 27.0 a) b))
                 (if (<= t_1 0.74)
                   (fma 2.0 x (* (* b a) 27.0))
                   (+ x (fma (* t (* -9.0 y)) z x))))))
            assert(x < y && y < z && z < t && t < a && a < b);
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = ((y * 9.0) * z) * t;
            	double tmp;
            	if (t_1 <= -1e+90) {
            		tmp = fma((y * z), (t * -9.0), ((27.0 * a) * b));
            	} else if (t_1 <= 0.74) {
            		tmp = fma(2.0, x, ((b * a) * 27.0));
            	} else {
            		tmp = x + fma((t * (-9.0 * y)), z, x);
            	}
            	return tmp;
            }
            
            x, y, z, t, a, b = sort([x, y, z, t, a, b])
            function code(x, y, z, t, a, b)
            	t_1 = Float64(Float64(Float64(y * 9.0) * z) * t)
            	tmp = 0.0
            	if (t_1 <= -1e+90)
            		tmp = fma(Float64(y * z), Float64(t * -9.0), Float64(Float64(27.0 * a) * b));
            	elseif (t_1 <= 0.74)
            		tmp = fma(2.0, x, Float64(Float64(b * a) * 27.0));
            	else
            		tmp = Float64(x + fma(Float64(t * Float64(-9.0 * y)), z, x));
            	end
            	return tmp
            end
            
            NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+90], N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision] + N[(N[(27.0 * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.74], N[(2.0 * x + N[(N[(b * a), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
            \\
            \begin{array}{l}
            t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
            \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90}:\\
            \;\;\;\;\mathsf{fma}\left(y \cdot z, t \cdot -9, \left(27 \cdot a\right) \cdot b\right)\\
            
            \mathbf{elif}\;t\_1 \leq 0.74:\\
            \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999966e89

              1. Initial program 85.1%

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

                \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
              4. Step-by-step derivation
                1. fp-cancel-sub-sign-invN/A

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

                  \[\leadsto 27 \cdot \left(a \cdot b\right) + \color{blue}{-9} \cdot \left(t \cdot \left(y \cdot z\right)\right) \]
                3. +-commutativeN/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(-9, t \cdot \left(y \cdot z\right), 27 \cdot \left(a \cdot b\right)\right)} \]
                5. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(y \cdot z\right) \cdot t}, 27 \cdot \left(a \cdot b\right)\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(y \cdot z\right) \cdot t}, 27 \cdot \left(a \cdot b\right)\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(z \cdot y\right)} \cdot t, 27 \cdot \left(a \cdot b\right)\right) \]
                8. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(z \cdot y\right)} \cdot t, 27 \cdot \left(a \cdot b\right)\right) \]
                9. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                10. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                11. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                12. lower-*.f6480.7

                  \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
              5. Applied rewrites80.7%

                \[\leadsto \color{blue}{\mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \left(b \cdot a\right) \cdot 27\right)} \]
              6. Step-by-step derivation
                1. Applied rewrites80.6%

                  \[\leadsto \mathsf{fma}\left(y \cdot z, \color{blue}{t \cdot -9}, \left(27 \cdot a\right) \cdot b\right) \]

                if -9.99999999999999966e89 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 0.73999999999999999

                1. Initial program 99.8%

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

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

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

                    \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                  3. lower-*.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                  5. lower-*.f6493.4

                    \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                5. Applied rewrites93.4%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)} \]

                if 0.73999999999999999 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)

                1. Initial program 90.6%

                  \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-+.f64N/A

                    \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                  2. lift--.f64N/A

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

                    \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                  4. lift-*.f64N/A

                    \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                  6. count-2-revN/A

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

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

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

                    \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                  10. lift-*.f64N/A

                    \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                  11. fp-cancel-sub-sign-invN/A

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

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

                    \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                  14. lift-*.f64N/A

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

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

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

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

                    \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                  19. lift-*.f64N/A

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

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

                    \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                  22. lift-*.f64N/A

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

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

                    \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                  25. lift-*.f64N/A

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

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

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

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

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

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

                    \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
                  3. +-commutativeN/A

                    \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                  4. *-commutativeN/A

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

                    \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                  6. *-commutativeN/A

                    \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                  7. lower-*.f64N/A

                    \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                  8. *-commutativeN/A

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

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

                    \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
                  11. *-commutativeN/A

                    \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                  12. lower-*.f6489.0

                    \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                7. Applied rewrites89.0%

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

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

                    \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
                  2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                    \[\leadsto x + \left(\color{blue}{\left(z \cdot -9\right) \cdot \left(t \cdot y\right)} + x\right) \]
                  8. *-commutativeN/A

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

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

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

                    \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
                  12. lower-*.f6482.8

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

                  \[\leadsto x + \color{blue}{\mathsf{fma}\left(-9 \cdot z, y \cdot t, x\right)} \]
                11. Step-by-step derivation
                  1. Applied rewrites82.8%

                    \[\leadsto x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), \color{blue}{z}, x\right) \]
                12. Recombined 3 regimes into one program.
                13. Add Preprocessing

                Alternative 6: 85.0% accurate, 0.6× speedup?

                \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(b \cdot a\right) \cdot 27\\ t_2 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+90}:\\ \;\;\;\;\mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, t\_1\right)\\ \mathbf{elif}\;t\_2 \leq 0.74:\\ \;\;\;\;\mathsf{fma}\left(2, x, t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\ \end{array} \end{array} \]
                NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                (FPCore (x y z t a b)
                 :precision binary64
                 (let* ((t_1 (* (* b a) 27.0)) (t_2 (* (* (* y 9.0) z) t)))
                   (if (<= t_2 -1e+90)
                     (fma -9.0 (* (* z y) t) t_1)
                     (if (<= t_2 0.74) (fma 2.0 x t_1) (+ x (fma (* t (* -9.0 y)) z x))))))
                assert(x < y && y < z && z < t && t < a && a < b);
                double code(double x, double y, double z, double t, double a, double b) {
                	double t_1 = (b * a) * 27.0;
                	double t_2 = ((y * 9.0) * z) * t;
                	double tmp;
                	if (t_2 <= -1e+90) {
                		tmp = fma(-9.0, ((z * y) * t), t_1);
                	} else if (t_2 <= 0.74) {
                		tmp = fma(2.0, x, t_1);
                	} else {
                		tmp = x + fma((t * (-9.0 * y)), z, x);
                	}
                	return tmp;
                }
                
                x, y, z, t, a, b = sort([x, y, z, t, a, b])
                function code(x, y, z, t, a, b)
                	t_1 = Float64(Float64(b * a) * 27.0)
                	t_2 = Float64(Float64(Float64(y * 9.0) * z) * t)
                	tmp = 0.0
                	if (t_2 <= -1e+90)
                		tmp = fma(-9.0, Float64(Float64(z * y) * t), t_1);
                	elseif (t_2 <= 0.74)
                		tmp = fma(2.0, x, t_1);
                	else
                		tmp = Float64(x + fma(Float64(t * Float64(-9.0 * y)), z, x));
                	end
                	return tmp
                end
                
                NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * 27.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+90], N[(-9.0 * N[(N[(z * y), $MachinePrecision] * t), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 0.74], N[(2.0 * x + t$95$1), $MachinePrecision], N[(x + N[(N[(t * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision]]]]]
                
                \begin{array}{l}
                [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                \\
                \begin{array}{l}
                t_1 := \left(b \cdot a\right) \cdot 27\\
                t_2 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
                \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+90}:\\
                \;\;\;\;\mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, t\_1\right)\\
                
                \mathbf{elif}\;t\_2 \leq 0.74:\\
                \;\;\;\;\mathsf{fma}\left(2, x, t\_1\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999966e89

                  1. Initial program 85.1%

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

                    \[\leadsto \color{blue}{27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)} \]
                  4. Step-by-step derivation
                    1. fp-cancel-sub-sign-invN/A

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

                      \[\leadsto 27 \cdot \left(a \cdot b\right) + \color{blue}{-9} \cdot \left(t \cdot \left(y \cdot z\right)\right) \]
                    3. +-commutativeN/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(-9, t \cdot \left(y \cdot z\right), 27 \cdot \left(a \cdot b\right)\right)} \]
                    5. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(y \cdot z\right) \cdot t}, 27 \cdot \left(a \cdot b\right)\right) \]
                    6. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(y \cdot z\right) \cdot t}, 27 \cdot \left(a \cdot b\right)\right) \]
                    7. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(z \cdot y\right)} \cdot t, 27 \cdot \left(a \cdot b\right)\right) \]
                    8. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(-9, \color{blue}{\left(z \cdot y\right)} \cdot t, 27 \cdot \left(a \cdot b\right)\right) \]
                    9. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                    10. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                    11. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                    12. lower-*.f6480.7

                      \[\leadsto \mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                  5. Applied rewrites80.7%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(-9, \left(z \cdot y\right) \cdot t, \left(b \cdot a\right) \cdot 27\right)} \]

                  if -9.99999999999999966e89 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 0.73999999999999999

                  1. Initial program 99.8%

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

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

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

                      \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                    3. lower-*.f64N/A

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

                      \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                    5. lower-*.f6493.4

                      \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                  5. Applied rewrites93.4%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)} \]

                  if 0.73999999999999999 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)

                  1. Initial program 90.6%

                    \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-+.f64N/A

                      \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                    2. lift--.f64N/A

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

                      \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                    5. *-commutativeN/A

                      \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                    6. count-2-revN/A

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

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

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

                      \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                    10. lift-*.f64N/A

                      \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                    11. fp-cancel-sub-sign-invN/A

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

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

                      \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                    14. lift-*.f64N/A

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

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

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

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

                      \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                    19. lift-*.f64N/A

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

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

                      \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                    22. lift-*.f64N/A

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

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

                      \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                    25. lift-*.f64N/A

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

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

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

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

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

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

                      \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
                    3. +-commutativeN/A

                      \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                    4. *-commutativeN/A

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

                      \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                    6. *-commutativeN/A

                      \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                    7. lower-*.f64N/A

                      \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                    8. *-commutativeN/A

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

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

                      \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
                    11. *-commutativeN/A

                      \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                    12. lower-*.f6489.0

                      \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                  7. Applied rewrites89.0%

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

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

                      \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
                    2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                      \[\leadsto x + \left(\color{blue}{\left(z \cdot -9\right) \cdot \left(t \cdot y\right)} + x\right) \]
                    8. *-commutativeN/A

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

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

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

                      \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
                    12. lower-*.f6482.8

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

                    \[\leadsto x + \color{blue}{\mathsf{fma}\left(-9 \cdot z, y \cdot t, x\right)} \]
                  11. Step-by-step derivation
                    1. Applied rewrites82.8%

                      \[\leadsto x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), \color{blue}{z}, x\right) \]
                  12. Recombined 3 regimes into one program.
                  13. Add Preprocessing

                  Alternative 7: 84.6% accurate, 0.6× speedup?

                  \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90}:\\ \;\;\;\;x + \mathsf{fma}\left(\left(z \cdot t\right) \cdot -9, y, x\right)\\ \mathbf{elif}\;t\_1 \leq 0.74:\\ \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\ \end{array} \end{array} \]
                  NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                  (FPCore (x y z t a b)
                   :precision binary64
                   (let* ((t_1 (* (* (* y 9.0) z) t)))
                     (if (<= t_1 -1e+90)
                       (+ x (fma (* (* z t) -9.0) y x))
                       (if (<= t_1 0.74)
                         (fma 2.0 x (* (* b a) 27.0))
                         (+ x (fma (* t (* -9.0 y)) z x))))))
                  assert(x < y && y < z && z < t && t < a && a < b);
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = ((y * 9.0) * z) * t;
                  	double tmp;
                  	if (t_1 <= -1e+90) {
                  		tmp = x + fma(((z * t) * -9.0), y, x);
                  	} else if (t_1 <= 0.74) {
                  		tmp = fma(2.0, x, ((b * a) * 27.0));
                  	} else {
                  		tmp = x + fma((t * (-9.0 * y)), z, x);
                  	}
                  	return tmp;
                  }
                  
                  x, y, z, t, a, b = sort([x, y, z, t, a, b])
                  function code(x, y, z, t, a, b)
                  	t_1 = Float64(Float64(Float64(y * 9.0) * z) * t)
                  	tmp = 0.0
                  	if (t_1 <= -1e+90)
                  		tmp = Float64(x + fma(Float64(Float64(z * t) * -9.0), y, x));
                  	elseif (t_1 <= 0.74)
                  		tmp = fma(2.0, x, Float64(Float64(b * a) * 27.0));
                  	else
                  		tmp = Float64(x + fma(Float64(t * Float64(-9.0 * y)), z, x));
                  	end
                  	return tmp
                  end
                  
                  NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+90], N[(x + N[(N[(N[(z * t), $MachinePrecision] * -9.0), $MachinePrecision] * y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.74], N[(2.0 * x + N[(N[(b * a), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                  \\
                  \begin{array}{l}
                  t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
                  \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90}:\\
                  \;\;\;\;x + \mathsf{fma}\left(\left(z \cdot t\right) \cdot -9, y, x\right)\\
                  
                  \mathbf{elif}\;t\_1 \leq 0.74:\\
                  \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999966e89

                    1. Initial program 85.1%

                      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                      2. lift--.f64N/A

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

                        \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                      4. lift-*.f64N/A

                        \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                      5. *-commutativeN/A

                        \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                      6. count-2-revN/A

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

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

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

                        \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                      10. lift-*.f64N/A

                        \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                      11. fp-cancel-sub-sign-invN/A

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

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

                        \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                      14. lift-*.f64N/A

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

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

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

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

                        \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                      19. lift-*.f64N/A

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

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

                        \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                      22. lift-*.f64N/A

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

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

                        \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                      25. lift-*.f64N/A

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

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

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

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

                      \[\leadsto x + \color{blue}{\left(x - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
                    6. Step-by-step derivation
                      1. metadata-evalN/A

                        \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
                      2. fp-cancel-sign-sub-invN/A

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

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

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

                        \[\leadsto x + \left(-9 \cdot \color{blue}{\left(\left(t \cdot z\right) \cdot y\right)} + x\right) \]
                      6. associate-*l*N/A

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

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

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

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

                        \[\leadsto x + \mathsf{fma}\left(\color{blue}{\left(z \cdot t\right)} \cdot -9, y, x\right) \]
                      11. lower-*.f6474.7

                        \[\leadsto x + \mathsf{fma}\left(\color{blue}{\left(z \cdot t\right)} \cdot -9, y, x\right) \]
                    7. Applied rewrites74.7%

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

                    if -9.99999999999999966e89 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 0.73999999999999999

                    1. Initial program 99.8%

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

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

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

                        \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                      3. lower-*.f64N/A

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

                        \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                      5. lower-*.f6493.4

                        \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                    5. Applied rewrites93.4%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)} \]

                    if 0.73999999999999999 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)

                    1. Initial program 90.6%

                      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                      2. lift--.f64N/A

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

                        \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                      4. lift-*.f64N/A

                        \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                      5. *-commutativeN/A

                        \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                      6. count-2-revN/A

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

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

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

                        \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                      10. lift-*.f64N/A

                        \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                      11. fp-cancel-sub-sign-invN/A

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

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

                        \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                      14. lift-*.f64N/A

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

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

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

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

                        \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                      19. lift-*.f64N/A

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

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

                        \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                      22. lift-*.f64N/A

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

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

                        \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                      25. lift-*.f64N/A

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

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

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

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

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

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

                        \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
                      3. +-commutativeN/A

                        \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                      4. *-commutativeN/A

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

                        \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                      6. *-commutativeN/A

                        \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                      7. lower-*.f64N/A

                        \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                      8. *-commutativeN/A

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

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

                        \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
                      11. *-commutativeN/A

                        \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                      12. lower-*.f6489.0

                        \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                    7. Applied rewrites89.0%

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

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

                        \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
                      2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                        \[\leadsto x + \left(\color{blue}{\left(z \cdot -9\right) \cdot \left(t \cdot y\right)} + x\right) \]
                      8. *-commutativeN/A

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

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

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

                        \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
                      12. lower-*.f6482.8

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

                      \[\leadsto x + \color{blue}{\mathsf{fma}\left(-9 \cdot z, y \cdot t, x\right)} \]
                    11. Step-by-step derivation
                      1. Applied rewrites82.8%

                        \[\leadsto x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), \color{blue}{z}, x\right) \]
                    12. Recombined 3 regimes into one program.
                    13. Add Preprocessing

                    Alternative 8: 84.6% accurate, 0.6× speedup?

                    \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90}:\\ \;\;\;\;x + \mathsf{fma}\left(y, t \cdot \left(-9 \cdot z\right), x\right)\\ \mathbf{elif}\;t\_1 \leq 0.74:\\ \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\ \end{array} \end{array} \]
                    NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                    (FPCore (x y z t a b)
                     :precision binary64
                     (let* ((t_1 (* (* (* y 9.0) z) t)))
                       (if (<= t_1 -1e+90)
                         (+ x (fma y (* t (* -9.0 z)) x))
                         (if (<= t_1 0.74)
                           (fma 2.0 x (* (* b a) 27.0))
                           (+ x (fma (* t (* -9.0 y)) z x))))))
                    assert(x < y && y < z && z < t && t < a && a < b);
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = ((y * 9.0) * z) * t;
                    	double tmp;
                    	if (t_1 <= -1e+90) {
                    		tmp = x + fma(y, (t * (-9.0 * z)), x);
                    	} else if (t_1 <= 0.74) {
                    		tmp = fma(2.0, x, ((b * a) * 27.0));
                    	} else {
                    		tmp = x + fma((t * (-9.0 * y)), z, x);
                    	}
                    	return tmp;
                    }
                    
                    x, y, z, t, a, b = sort([x, y, z, t, a, b])
                    function code(x, y, z, t, a, b)
                    	t_1 = Float64(Float64(Float64(y * 9.0) * z) * t)
                    	tmp = 0.0
                    	if (t_1 <= -1e+90)
                    		tmp = Float64(x + fma(y, Float64(t * Float64(-9.0 * z)), x));
                    	elseif (t_1 <= 0.74)
                    		tmp = fma(2.0, x, Float64(Float64(b * a) * 27.0));
                    	else
                    		tmp = Float64(x + fma(Float64(t * Float64(-9.0 * y)), z, x));
                    	end
                    	return tmp
                    end
                    
                    NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+90], N[(x + N[(y * N[(t * N[(-9.0 * z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.74], N[(2.0 * x + N[(N[(b * a), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(-9.0 * y), $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                    \\
                    \begin{array}{l}
                    t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
                    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90}:\\
                    \;\;\;\;x + \mathsf{fma}\left(y, t \cdot \left(-9 \cdot z\right), x\right)\\
                    
                    \mathbf{elif}\;t\_1 \leq 0.74:\\
                    \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), z, x\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999966e89

                      1. Initial program 85.1%

                        \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                        2. lift--.f64N/A

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

                          \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                        4. lift-*.f64N/A

                          \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                        5. *-commutativeN/A

                          \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                        6. count-2-revN/A

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

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

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

                          \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                        10. lift-*.f64N/A

                          \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                        11. fp-cancel-sub-sign-invN/A

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

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

                          \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                        14. lift-*.f64N/A

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

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

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

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

                          \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                        19. lift-*.f64N/A

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

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

                          \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                        22. lift-*.f64N/A

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

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

                          \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                        25. lift-*.f64N/A

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

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

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

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

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

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

                          \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
                        3. +-commutativeN/A

                          \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                        4. *-commutativeN/A

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

                          \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                        6. *-commutativeN/A

                          \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                        7. lower-*.f64N/A

                          \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                        8. *-commutativeN/A

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

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

                          \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
                        11. *-commutativeN/A

                          \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                        12. lower-*.f6489.4

                          \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                      7. Applied rewrites89.4%

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

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

                          \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
                        2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                          \[\leadsto x + \left(\color{blue}{\left(z \cdot -9\right) \cdot \left(t \cdot y\right)} + x\right) \]
                        8. *-commutativeN/A

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

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

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

                          \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
                        12. lower-*.f6478.8

                          \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
                      10. Applied rewrites78.8%

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

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

                        if -9.99999999999999966e89 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 0.73999999999999999

                        1. Initial program 99.8%

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

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

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

                            \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                          3. lower-*.f64N/A

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

                            \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                          5. lower-*.f6493.4

                            \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                        5. Applied rewrites93.4%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)} \]

                        if 0.73999999999999999 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)

                        1. Initial program 90.6%

                          \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. lift-+.f64N/A

                            \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                          2. lift--.f64N/A

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

                            \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                          4. lift-*.f64N/A

                            \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                          5. *-commutativeN/A

                            \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                          6. count-2-revN/A

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

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

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

                            \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                          10. lift-*.f64N/A

                            \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                          11. fp-cancel-sub-sign-invN/A

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

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

                            \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                          14. lift-*.f64N/A

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

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

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

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

                            \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                          19. lift-*.f64N/A

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

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

                            \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                          22. lift-*.f64N/A

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

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

                            \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                          25. lift-*.f64N/A

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

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

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

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

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

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

                            \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
                          3. +-commutativeN/A

                            \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                          4. *-commutativeN/A

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

                            \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                          6. *-commutativeN/A

                            \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                          7. lower-*.f64N/A

                            \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                          8. *-commutativeN/A

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

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

                            \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
                          11. *-commutativeN/A

                            \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                          12. lower-*.f6489.0

                            \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                        7. Applied rewrites89.0%

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

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

                            \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
                          2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                            \[\leadsto x + \left(\color{blue}{\left(z \cdot -9\right) \cdot \left(t \cdot y\right)} + x\right) \]
                          8. *-commutativeN/A

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

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

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

                            \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
                          12. lower-*.f6482.8

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

                          \[\leadsto x + \color{blue}{\mathsf{fma}\left(-9 \cdot z, y \cdot t, x\right)} \]
                        11. Step-by-step derivation
                          1. Applied rewrites82.8%

                            \[\leadsto x + \mathsf{fma}\left(t \cdot \left(-9 \cdot y\right), \color{blue}{z}, x\right) \]
                        12. Recombined 3 regimes into one program.
                        13. Add Preprocessing

                        Alternative 9: 84.7% accurate, 0.6× speedup?

                        \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90}:\\ \;\;\;\;x + \mathsf{fma}\left(y, t \cdot \left(-9 \cdot z\right), x\right)\\ \mathbf{elif}\;t\_1 \leq 0.74:\\ \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(-9 \cdot z, y \cdot t, x\right)\\ \end{array} \end{array} \]
                        NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                        (FPCore (x y z t a b)
                         :precision binary64
                         (let* ((t_1 (* (* (* y 9.0) z) t)))
                           (if (<= t_1 -1e+90)
                             (+ x (fma y (* t (* -9.0 z)) x))
                             (if (<= t_1 0.74)
                               (fma 2.0 x (* (* b a) 27.0))
                               (+ x (fma (* -9.0 z) (* y t) x))))))
                        assert(x < y && y < z && z < t && t < a && a < b);
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = ((y * 9.0) * z) * t;
                        	double tmp;
                        	if (t_1 <= -1e+90) {
                        		tmp = x + fma(y, (t * (-9.0 * z)), x);
                        	} else if (t_1 <= 0.74) {
                        		tmp = fma(2.0, x, ((b * a) * 27.0));
                        	} else {
                        		tmp = x + fma((-9.0 * z), (y * t), x);
                        	}
                        	return tmp;
                        }
                        
                        x, y, z, t, a, b = sort([x, y, z, t, a, b])
                        function code(x, y, z, t, a, b)
                        	t_1 = Float64(Float64(Float64(y * 9.0) * z) * t)
                        	tmp = 0.0
                        	if (t_1 <= -1e+90)
                        		tmp = Float64(x + fma(y, Float64(t * Float64(-9.0 * z)), x));
                        	elseif (t_1 <= 0.74)
                        		tmp = fma(2.0, x, Float64(Float64(b * a) * 27.0));
                        	else
                        		tmp = Float64(x + fma(Float64(-9.0 * z), Float64(y * t), x));
                        	end
                        	return tmp
                        end
                        
                        NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+90], N[(x + N[(y * N[(t * N[(-9.0 * z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.74], N[(2.0 * x + N[(N[(b * a), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-9.0 * z), $MachinePrecision] * N[(y * t), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]]
                        
                        \begin{array}{l}
                        [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                        \\
                        \begin{array}{l}
                        t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
                        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90}:\\
                        \;\;\;\;x + \mathsf{fma}\left(y, t \cdot \left(-9 \cdot z\right), x\right)\\
                        
                        \mathbf{elif}\;t\_1 \leq 0.74:\\
                        \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;x + \mathsf{fma}\left(-9 \cdot z, y \cdot t, x\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999966e89

                          1. Initial program 85.1%

                            \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. lift-+.f64N/A

                              \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                            2. lift--.f64N/A

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

                              \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                            4. lift-*.f64N/A

                              \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                            5. *-commutativeN/A

                              \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                            6. count-2-revN/A

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

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

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

                              \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                            10. lift-*.f64N/A

                              \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                            11. fp-cancel-sub-sign-invN/A

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

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

                              \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                            14. lift-*.f64N/A

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

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

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

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

                              \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                            19. lift-*.f64N/A

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

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

                              \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                            22. lift-*.f64N/A

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

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

                              \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                            25. lift-*.f64N/A

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

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

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

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

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

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

                              \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
                            3. +-commutativeN/A

                              \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                            4. *-commutativeN/A

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

                              \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                            6. *-commutativeN/A

                              \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                            7. lower-*.f64N/A

                              \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                            8. *-commutativeN/A

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

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

                              \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
                            11. *-commutativeN/A

                              \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                            12. lower-*.f6489.4

                              \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                          7. Applied rewrites89.4%

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

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

                              \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
                            2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                              \[\leadsto x + \left(\color{blue}{\left(z \cdot -9\right) \cdot \left(t \cdot y\right)} + x\right) \]
                            8. *-commutativeN/A

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

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

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

                              \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
                            12. lower-*.f6478.8

                              \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
                          10. Applied rewrites78.8%

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

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

                            if -9.99999999999999966e89 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 0.73999999999999999

                            1. Initial program 99.8%

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

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

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

                                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                              3. lower-*.f64N/A

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

                                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                              5. lower-*.f6493.4

                                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                            5. Applied rewrites93.4%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)} \]

                            if 0.73999999999999999 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)

                            1. Initial program 90.6%

                              \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                              2. lift--.f64N/A

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

                                \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                              4. lift-*.f64N/A

                                \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                              5. *-commutativeN/A

                                \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                              6. count-2-revN/A

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

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

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

                                \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                              10. lift-*.f64N/A

                                \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                              11. fp-cancel-sub-sign-invN/A

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

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

                                \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                              14. lift-*.f64N/A

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

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

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

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                              19. lift-*.f64N/A

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

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                              22. lift-*.f64N/A

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

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                              25. lift-*.f64N/A

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

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

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

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

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

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

                                \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
                              3. +-commutativeN/A

                                \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                              4. *-commutativeN/A

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

                                \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                              6. *-commutativeN/A

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                              7. lower-*.f64N/A

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                              8. *-commutativeN/A

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

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
                              11. *-commutativeN/A

                                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                              12. lower-*.f6489.0

                                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                            7. Applied rewrites89.0%

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

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

                                \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(-9\right)\right)} \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \]
                              2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                                \[\leadsto x + \left(\color{blue}{\left(z \cdot -9\right) \cdot \left(t \cdot y\right)} + x\right) \]
                              8. *-commutativeN/A

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

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

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

                                \[\leadsto x + \mathsf{fma}\left(-9 \cdot z, \color{blue}{y \cdot t}, x\right) \]
                              12. lower-*.f6482.8

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

                              \[\leadsto x + \color{blue}{\mathsf{fma}\left(-9 \cdot z, y \cdot t, x\right)} \]
                          12. Recombined 3 regimes into one program.
                          13. Add Preprocessing

                          Alternative 10: 82.5% accurate, 0.6× speedup?

                          \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90} \lor \neg \left(t\_1 \leq 10^{+82}\right):\\ \;\;\;\;-9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\ \end{array} \end{array} \]
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          (FPCore (x y z t a b)
                           :precision binary64
                           (let* ((t_1 (* (* (* y 9.0) z) t)))
                             (if (or (<= t_1 -1e+90) (not (<= t_1 1e+82)))
                               (* -9.0 (* (* y z) t))
                               (fma 2.0 x (* (* b a) 27.0)))))
                          assert(x < y && y < z && z < t && t < a && a < b);
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double t_1 = ((y * 9.0) * z) * t;
                          	double tmp;
                          	if ((t_1 <= -1e+90) || !(t_1 <= 1e+82)) {
                          		tmp = -9.0 * ((y * z) * t);
                          	} else {
                          		tmp = fma(2.0, x, ((b * a) * 27.0));
                          	}
                          	return tmp;
                          }
                          
                          x, y, z, t, a, b = sort([x, y, z, t, a, b])
                          function code(x, y, z, t, a, b)
                          	t_1 = Float64(Float64(Float64(y * 9.0) * z) * t)
                          	tmp = 0.0
                          	if ((t_1 <= -1e+90) || !(t_1 <= 1e+82))
                          		tmp = Float64(-9.0 * Float64(Float64(y * z) * t));
                          	else
                          		tmp = fma(2.0, x, Float64(Float64(b * a) * 27.0));
                          	end
                          	return tmp
                          end
                          
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+90], N[Not[LessEqual[t$95$1, 1e+82]], $MachinePrecision]], N[(-9.0 * N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 * x + N[(N[(b * a), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                          \\
                          \begin{array}{l}
                          t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
                          \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90} \lor \neg \left(t\_1 \leq 10^{+82}\right):\\
                          \;\;\;\;-9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999966e89 or 9.9999999999999996e81 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)

                            1. Initial program 86.8%

                              \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                              2. lift--.f64N/A

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

                                \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                              4. lift-*.f64N/A

                                \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                              5. *-commutativeN/A

                                \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                              6. count-2-revN/A

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

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

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

                                \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                              10. lift-*.f64N/A

                                \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                              11. fp-cancel-sub-sign-invN/A

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

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

                                \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                              14. lift-*.f64N/A

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

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

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot a}, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                              18. metadata-eval87.9

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                              19. lift-*.f64N/A

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                              21. lower-*.f6487.9

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                              22. lift-*.f64N/A

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                              24. lower-*.f6487.9

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                              25. lift-*.f64N/A

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \left(z \cdot \color{blue}{\left(9 \cdot y\right)}\right)\right)\right) \]
                              27. lower-*.f6487.9

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

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

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

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

                                \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
                              3. +-commutativeN/A

                                \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                              4. *-commutativeN/A

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

                                \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                              6. *-commutativeN/A

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                              7. lower-*.f64N/A

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                              8. *-commutativeN/A

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

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
                              11. *-commutativeN/A

                                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                              12. lower-*.f6488.9

                                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                            7. Applied rewrites88.9%

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

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

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

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

                                \[\leadsto -9 \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \]
                              4. lower-*.f6476.6

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

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

                            if -9.99999999999999966e89 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 9.9999999999999996e81

                            1. Initial program 99.8%

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

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

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

                                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                              3. lower-*.f64N/A

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

                                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                              5. lower-*.f6490.3

                                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                            5. Applied rewrites90.3%

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

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

                          Alternative 11: 82.5% accurate, 0.6× speedup?

                          \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90} \lor \neg \left(t\_1 \leq 10^{+82}\right):\\ \;\;\;\;-9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(b \cdot a, 27, x\right)\\ \end{array} \end{array} \]
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          (FPCore (x y z t a b)
                           :precision binary64
                           (let* ((t_1 (* (* (* y 9.0) z) t)))
                             (if (or (<= t_1 -1e+90) (not (<= t_1 1e+82)))
                               (* -9.0 (* (* y z) t))
                               (+ x (fma (* b a) 27.0 x)))))
                          assert(x < y && y < z && z < t && t < a && a < b);
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double t_1 = ((y * 9.0) * z) * t;
                          	double tmp;
                          	if ((t_1 <= -1e+90) || !(t_1 <= 1e+82)) {
                          		tmp = -9.0 * ((y * z) * t);
                          	} else {
                          		tmp = x + fma((b * a), 27.0, x);
                          	}
                          	return tmp;
                          }
                          
                          x, y, z, t, a, b = sort([x, y, z, t, a, b])
                          function code(x, y, z, t, a, b)
                          	t_1 = Float64(Float64(Float64(y * 9.0) * z) * t)
                          	tmp = 0.0
                          	if ((t_1 <= -1e+90) || !(t_1 <= 1e+82))
                          		tmp = Float64(-9.0 * Float64(Float64(y * z) * t));
                          	else
                          		tmp = Float64(x + fma(Float64(b * a), 27.0, x));
                          	end
                          	return tmp
                          end
                          
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+90], N[Not[LessEqual[t$95$1, 1e+82]], $MachinePrecision]], N[(-9.0 * N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(b * a), $MachinePrecision] * 27.0 + x), $MachinePrecision]), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                          \\
                          \begin{array}{l}
                          t_1 := \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\\
                          \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+90} \lor \neg \left(t\_1 \leq 10^{+82}\right):\\
                          \;\;\;\;-9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x + \mathsf{fma}\left(b \cdot a, 27, x\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < -9.99999999999999966e89 or 9.9999999999999996e81 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t)

                            1. Initial program 86.8%

                              \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                              2. lift--.f64N/A

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

                                \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                              4. lift-*.f64N/A

                                \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                              5. *-commutativeN/A

                                \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                              6. count-2-revN/A

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

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

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

                                \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                              10. lift-*.f64N/A

                                \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                              11. fp-cancel-sub-sign-invN/A

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

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

                                \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                              14. lift-*.f64N/A

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

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

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot a}, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                              18. metadata-eval87.9

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                              19. lift-*.f64N/A

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                              21. lower-*.f6487.9

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                              22. lift-*.f64N/A

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                              24. lower-*.f6487.9

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                              25. lift-*.f64N/A

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \left(z \cdot \color{blue}{\left(9 \cdot y\right)}\right)\right)\right) \]
                              27. lower-*.f6487.9

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

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

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

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

                                \[\leadsto x + \left(x - \color{blue}{\left(-27 \cdot \frac{a \cdot b}{y} + 9 \cdot \left(t \cdot z\right)\right) \cdot y}\right) \]
                              3. +-commutativeN/A

                                \[\leadsto x + \left(x - \color{blue}{\left(9 \cdot \left(t \cdot z\right) + -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                              4. *-commutativeN/A

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

                                \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(t \cdot z, 9, -27 \cdot \frac{a \cdot b}{y}\right)} \cdot y\right) \]
                              6. *-commutativeN/A

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                              7. lower-*.f64N/A

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{z \cdot t}, 9, -27 \cdot \frac{a \cdot b}{y}\right) \cdot y\right) \]
                              8. *-commutativeN/A

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

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \color{blue}{\frac{a \cdot b}{y}} \cdot -27\right) \cdot y\right) \]
                              11. *-commutativeN/A

                                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                              12. lower-*.f6488.9

                                \[\leadsto x + \left(x - \mathsf{fma}\left(z \cdot t, 9, \frac{\color{blue}{b \cdot a}}{y} \cdot -27\right) \cdot y\right) \]
                            7. Applied rewrites88.9%

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

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

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

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

                                \[\leadsto -9 \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \]
                              4. lower-*.f6476.6

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

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

                            if -9.99999999999999966e89 < (*.f64 (*.f64 (*.f64 y #s(literal 9 binary64)) z) t) < 9.9999999999999996e81

                            1. Initial program 99.8%

                              \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                              2. lift--.f64N/A

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

                                \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                              4. lift-*.f64N/A

                                \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                              5. *-commutativeN/A

                                \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                              6. count-2-revN/A

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

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

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

                                \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                              10. lift-*.f64N/A

                                \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                              11. fp-cancel-sub-sign-invN/A

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

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

                                \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                              14. lift-*.f64N/A

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

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

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

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                              19. lift-*.f64N/A

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                              21. lower-*.f6499.8

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                              22. lift-*.f64N/A

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                              24. lower-*.f6499.8

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                              25. lift-*.f64N/A

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

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

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

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

                              \[\leadsto x + \color{blue}{\left(x - -27 \cdot \left(a \cdot b\right)\right)} \]
                            6. Step-by-step derivation
                              1. metadata-evalN/A

                                \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(27\right)\right)} \cdot \left(a \cdot b\right)\right) \]
                              2. fp-cancel-sign-sub-invN/A

                                \[\leadsto x + \color{blue}{\left(x + 27 \cdot \left(a \cdot b\right)\right)} \]
                              3. +-commutativeN/A

                                \[\leadsto x + \color{blue}{\left(27 \cdot \left(a \cdot b\right) + x\right)} \]
                              4. *-commutativeN/A

                                \[\leadsto x + \left(\color{blue}{\left(a \cdot b\right) \cdot 27} + x\right) \]
                              5. lower-fma.f64N/A

                                \[\leadsto x + \color{blue}{\mathsf{fma}\left(a \cdot b, 27, x\right)} \]
                              6. *-commutativeN/A

                                \[\leadsto x + \mathsf{fma}\left(\color{blue}{b \cdot a}, 27, x\right) \]
                              7. lower-*.f6490.3

                                \[\leadsto x + \mathsf{fma}\left(\color{blue}{b \cdot a}, 27, x\right) \]
                            7. Applied rewrites90.3%

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(y \cdot 9\right) \cdot z\right) \cdot t \leq -1 \cdot 10^{+90} \lor \neg \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t \leq 10^{+82}\right):\\ \;\;\;\;-9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(b \cdot a, 27, x\right)\\ \end{array} \]
                          5. Add Preprocessing

                          Alternative 12: 97.9% accurate, 0.8× speedup?

                          \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 5 \cdot 10^{+283}:\\ \;\;\;\;x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \left(z \cdot \left(9 \cdot y\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b \cdot a, 27, \left(\left(-9 \cdot y\right) \cdot t\right) \cdot z\right)\\ \end{array} \end{array} \]
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          (FPCore (x y z t a b)
                           :precision binary64
                           (if (<= (* (* y 9.0) z) 5e+283)
                             (+ x (- x (fma (* -27.0 a) b (* t (* z (* 9.0 y))))))
                             (fma (* b a) 27.0 (* (* (* -9.0 y) t) z))))
                          assert(x < y && y < z && z < t && t < a && a < b);
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if (((y * 9.0) * z) <= 5e+283) {
                          		tmp = x + (x - fma((-27.0 * a), b, (t * (z * (9.0 * y)))));
                          	} else {
                          		tmp = fma((b * a), 27.0, (((-9.0 * y) * t) * z));
                          	}
                          	return tmp;
                          }
                          
                          x, y, z, t, a, b = sort([x, y, z, t, a, b])
                          function code(x, y, z, t, a, b)
                          	tmp = 0.0
                          	if (Float64(Float64(y * 9.0) * z) <= 5e+283)
                          		tmp = Float64(x + Float64(x - fma(Float64(-27.0 * a), b, Float64(t * Float64(z * Float64(9.0 * y))))));
                          	else
                          		tmp = fma(Float64(b * a), 27.0, Float64(Float64(Float64(-9.0 * y) * t) * z));
                          	end
                          	return tmp
                          end
                          
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision], 5e+283], N[(x + N[(x - N[(N[(-27.0 * a), $MachinePrecision] * b + N[(t * N[(z * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * 27.0 + N[(N[(N[(-9.0 * y), $MachinePrecision] * t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 5 \cdot 10^{+283}:\\
                          \;\;\;\;x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \left(z \cdot \left(9 \cdot y\right)\right)\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(b \cdot a, 27, \left(\left(-9 \cdot y\right) \cdot t\right) \cdot z\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 5.0000000000000004e283

                            1. Initial program 97.4%

                              \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                              2. lift--.f64N/A

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

                                \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                              4. lift-*.f64N/A

                                \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                              5. *-commutativeN/A

                                \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                              6. count-2-revN/A

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

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

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

                                \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                              10. lift-*.f64N/A

                                \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                              11. fp-cancel-sub-sign-invN/A

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

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

                                \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                              14. lift-*.f64N/A

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

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

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

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                              19. lift-*.f64N/A

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                              21. lower-*.f6497.8

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                              22. lift-*.f64N/A

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

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                              24. lower-*.f6497.8

                                \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                              25. lift-*.f64N/A

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

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

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

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

                            if 5.0000000000000004e283 < (*.f64 (*.f64 y #s(literal 9 binary64)) z)

                            1. Initial program 46.0%

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

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

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

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

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

                                \[\leadsto \color{blue}{\left(-9 \cdot \left(y \cdot z\right)\right)} \cdot t + \left(a \cdot 27\right) \cdot b \]
                              5. *-commutativeN/A

                                \[\leadsto \left(-9 \cdot \color{blue}{\left(z \cdot y\right)}\right) \cdot t + \left(a \cdot 27\right) \cdot b \]
                              6. lower-*.f6438.2

                                \[\leadsto \left(-9 \cdot \color{blue}{\left(z \cdot y\right)}\right) \cdot t + \left(a \cdot 27\right) \cdot b \]
                            5. Applied rewrites38.2%

                              \[\leadsto \color{blue}{\left(-9 \cdot \left(z \cdot y\right)\right) \cdot t} + \left(a \cdot 27\right) \cdot b \]
                            6. Step-by-step derivation
                              1. lift-+.f64N/A

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

                                \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t} \]
                              3. lift-*.f64N/A

                                \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b} + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t \]
                              4. *-commutativeN/A

                                \[\leadsto \color{blue}{b \cdot \left(a \cdot 27\right)} + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t \]
                              5. lift-*.f64N/A

                                \[\leadsto b \cdot \color{blue}{\left(a \cdot 27\right)} + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t \]
                              6. associate-*l*N/A

                                \[\leadsto \color{blue}{\left(b \cdot a\right) \cdot 27} + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t \]
                              7. lift-*.f64N/A

                                \[\leadsto \color{blue}{\left(b \cdot a\right)} \cdot 27 + \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t \]
                              8. lower-fma.f6438.2

                                \[\leadsto \color{blue}{\mathsf{fma}\left(b \cdot a, 27, \left(-9 \cdot \left(z \cdot y\right)\right) \cdot t\right)} \]
                            7. Applied rewrites92.0%

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

                          Alternative 13: 98.4% accurate, 0.8× speedup?

                          \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;y \cdot 9 \leq -5 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot z, -9 \cdot y, \mathsf{fma}\left(b \cdot 27, a, 2 \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b \cdot 27, a, \mathsf{fma}\left(\left(-9 \cdot y\right) \cdot t, z, 2 \cdot x\right)\right)\\ \end{array} \end{array} \]
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          (FPCore (x y z t a b)
                           :precision binary64
                           (if (<= (* y 9.0) -5e+54)
                             (fma (* t z) (* -9.0 y) (fma (* b 27.0) a (* 2.0 x)))
                             (fma (* b 27.0) a (fma (* (* -9.0 y) t) z (* 2.0 x)))))
                          assert(x < y && y < z && z < t && t < a && a < b);
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if ((y * 9.0) <= -5e+54) {
                          		tmp = fma((t * z), (-9.0 * y), fma((b * 27.0), a, (2.0 * x)));
                          	} else {
                          		tmp = fma((b * 27.0), a, fma(((-9.0 * y) * t), z, (2.0 * x)));
                          	}
                          	return tmp;
                          }
                          
                          x, y, z, t, a, b = sort([x, y, z, t, a, b])
                          function code(x, y, z, t, a, b)
                          	tmp = 0.0
                          	if (Float64(y * 9.0) <= -5e+54)
                          		tmp = fma(Float64(t * z), Float64(-9.0 * y), fma(Float64(b * 27.0), a, Float64(2.0 * x)));
                          	else
                          		tmp = fma(Float64(b * 27.0), a, fma(Float64(Float64(-9.0 * y) * t), z, Float64(2.0 * x)));
                          	end
                          	return tmp
                          end
                          
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y * 9.0), $MachinePrecision], -5e+54], N[(N[(t * z), $MachinePrecision] * N[(-9.0 * y), $MachinePrecision] + N[(N[(b * 27.0), $MachinePrecision] * a + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * 27.0), $MachinePrecision] * a + N[(N[(N[(-9.0 * y), $MachinePrecision] * t), $MachinePrecision] * z + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;y \cdot 9 \leq -5 \cdot 10^{+54}:\\
                          \;\;\;\;\mathsf{fma}\left(t \cdot z, -9 \cdot y, \mathsf{fma}\left(b \cdot 27, a, 2 \cdot x\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(b \cdot 27, a, \mathsf{fma}\left(\left(-9 \cdot y\right) \cdot t, z, 2 \cdot x\right)\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if (*.f64 y #s(literal 9 binary64)) < -5.00000000000000005e54

                            1. Initial program 85.4%

                              \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                              2. lift--.f64N/A

                                \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
                              3. lift-*.f64N/A

                                \[\leadsto \left(x \cdot 2 - \color{blue}{\left(\left(y \cdot 9\right) \cdot z\right) \cdot t}\right) + \left(a \cdot 27\right) \cdot b \]
                              4. fp-cancel-sub-sign-invN/A

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

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

                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y \cdot 9\right) \cdot z\right)\right) \cdot t + \left(x \cdot 2 + \left(a \cdot 27\right) \cdot b\right)} \]
                              7. lift-*.f64N/A

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

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

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

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

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

                                \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot t, \mathsf{neg}\left(y \cdot 9\right), \left(a \cdot 27\right) \cdot b + x \cdot 2\right)} \]
                            4. Applied rewrites99.8%

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

                            if -5.00000000000000005e54 < (*.f64 y #s(literal 9 binary64))

                            1. Initial program 97.4%

                              \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. lift-+.f64N/A

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

                                \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} \]
                              3. lift-*.f64N/A

                                \[\leadsto \color{blue}{\left(a \cdot 27\right) \cdot b} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) \]
                              4. lift-*.f64N/A

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

                                \[\leadsto \color{blue}{a \cdot \left(27 \cdot b\right)} + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) \]
                              6. *-commutativeN/A

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

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

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

                                \[\leadsto \mathsf{fma}\left(\color{blue}{b \cdot 27}, a, x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) \]
                              10. lift--.f64N/A

                                \[\leadsto \mathsf{fma}\left(b \cdot 27, a, \color{blue}{x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t}\right) \]
                              11. lift-*.f64N/A

                                \[\leadsto \mathsf{fma}\left(b \cdot 27, a, x \cdot 2 - \color{blue}{\left(\left(y \cdot 9\right) \cdot z\right) \cdot t}\right) \]
                              12. fp-cancel-sub-sign-invN/A

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

                                \[\leadsto \mathsf{fma}\left(b \cdot 27, a, \color{blue}{\left(\mathsf{neg}\left(\left(y \cdot 9\right) \cdot z\right)\right) \cdot t + x \cdot 2}\right) \]
                              14. lift-*.f64N/A

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

                                \[\leadsto \mathsf{fma}\left(b \cdot 27, a, \color{blue}{\left(\left(\mathsf{neg}\left(y \cdot 9\right)\right) \cdot z\right)} \cdot t + x \cdot 2\right) \]
                              16. associate-*r*N/A

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

                                \[\leadsto \mathsf{fma}\left(b \cdot 27, a, \left(\mathsf{neg}\left(y \cdot 9\right)\right) \cdot \color{blue}{\left(t \cdot z\right)} + x \cdot 2\right) \]
                              18. associate-*r*N/A

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

                                \[\leadsto \mathsf{fma}\left(b \cdot 27, a, \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(y \cdot 9\right)\right) \cdot t, z, x \cdot 2\right)}\right) \]
                            4. Applied rewrites95.2%

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

                          Alternative 14: 54.0% accurate, 0.9× speedup?

                          \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} t_1 := \left(a \cdot 27\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+63} \lor \neg \left(t\_1 \leq 10^{+44}\right):\\ \;\;\;\;\left(b \cdot a\right) \cdot 27\\ \mathbf{else}:\\ \;\;\;\;x + x\\ \end{array} \end{array} \]
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          (FPCore (x y z t a b)
                           :precision binary64
                           (let* ((t_1 (* (* a 27.0) b)))
                             (if (or (<= t_1 -1e+63) (not (<= t_1 1e+44))) (* (* b a) 27.0) (+ x x))))
                          assert(x < y && y < z && z < t && t < a && a < b);
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double t_1 = (a * 27.0) * b;
                          	double tmp;
                          	if ((t_1 <= -1e+63) || !(t_1 <= 1e+44)) {
                          		tmp = (b * a) * 27.0;
                          	} else {
                          		tmp = x + x;
                          	}
                          	return tmp;
                          }
                          
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          real(8) function code(x, y, z, t, a, b)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8), intent (in) :: b
                              real(8) :: t_1
                              real(8) :: tmp
                              t_1 = (a * 27.0d0) * b
                              if ((t_1 <= (-1d+63)) .or. (.not. (t_1 <= 1d+44))) then
                                  tmp = (b * a) * 27.0d0
                              else
                                  tmp = x + x
                              end if
                              code = tmp
                          end function
                          
                          assert x < y && y < z && z < t && t < a && a < b;
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	double t_1 = (a * 27.0) * b;
                          	double tmp;
                          	if ((t_1 <= -1e+63) || !(t_1 <= 1e+44)) {
                          		tmp = (b * a) * 27.0;
                          	} else {
                          		tmp = x + x;
                          	}
                          	return tmp;
                          }
                          
                          [x, y, z, t, a, b] = sort([x, y, z, t, a, b])
                          def code(x, y, z, t, a, b):
                          	t_1 = (a * 27.0) * b
                          	tmp = 0
                          	if (t_1 <= -1e+63) or not (t_1 <= 1e+44):
                          		tmp = (b * a) * 27.0
                          	else:
                          		tmp = x + x
                          	return tmp
                          
                          x, y, z, t, a, b = sort([x, y, z, t, a, b])
                          function code(x, y, z, t, a, b)
                          	t_1 = Float64(Float64(a * 27.0) * b)
                          	tmp = 0.0
                          	if ((t_1 <= -1e+63) || !(t_1 <= 1e+44))
                          		tmp = Float64(Float64(b * a) * 27.0);
                          	else
                          		tmp = Float64(x + x);
                          	end
                          	return tmp
                          end
                          
                          x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
                          function tmp_2 = code(x, y, z, t, a, b)
                          	t_1 = (a * 27.0) * b;
                          	tmp = 0.0;
                          	if ((t_1 <= -1e+63) || ~((t_1 <= 1e+44)))
                          		tmp = (b * a) * 27.0;
                          	else
                          		tmp = x + x;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+63], N[Not[LessEqual[t$95$1, 1e+44]], $MachinePrecision]], N[(N[(b * a), $MachinePrecision] * 27.0), $MachinePrecision], N[(x + x), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                          \\
                          \begin{array}{l}
                          t_1 := \left(a \cdot 27\right) \cdot b\\
                          \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+63} \lor \neg \left(t\_1 \leq 10^{+44}\right):\\
                          \;\;\;\;\left(b \cdot a\right) \cdot 27\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x + x\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1.00000000000000006e63 or 1.0000000000000001e44 < (*.f64 (*.f64 a #s(literal 27 binary64)) b)

                            1. Initial program 95.4%

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

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

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

                                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                              3. lower-*.f64N/A

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

                                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                              5. lower-*.f6474.7

                                \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                            5. Applied rewrites74.7%

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

                              \[\leadsto 27 \cdot \color{blue}{\left(a \cdot b\right)} \]
                            7. Step-by-step derivation
                              1. Applied rewrites69.3%

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

                              if -1.00000000000000006e63 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1.0000000000000001e44

                              1. Initial program 94.7%

                                \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                              2. Add Preprocessing
                              3. Step-by-step derivation
                                1. lift-+.f64N/A

                                  \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                                2. lift--.f64N/A

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

                                  \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                                4. lift-*.f64N/A

                                  \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                                5. *-commutativeN/A

                                  \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                                6. count-2-revN/A

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

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

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

                                  \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                                10. lift-*.f64N/A

                                  \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                                11. fp-cancel-sub-sign-invN/A

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

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

                                  \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                                14. lift-*.f64N/A

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

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

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

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot a}, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                                18. metadata-eval94.7

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                                19. lift-*.f64N/A

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

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                                21. lower-*.f6494.7

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                                22. lift-*.f64N/A

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

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                                24. lower-*.f6494.7

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                                25. lift-*.f64N/A

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

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

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \left(z \cdot \color{blue}{\left(9 \cdot y\right)}\right)\right)\right) \]
                              4. Applied rewrites94.7%

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

                                \[\leadsto \color{blue}{2 \cdot x} \]
                              6. Step-by-step derivation
                                1. lower-*.f6446.5

                                  \[\leadsto \color{blue}{2 \cdot x} \]
                              7. Applied rewrites46.5%

                                \[\leadsto \color{blue}{2 \cdot x} \]
                              8. Step-by-step derivation
                                1. Applied rewrites46.5%

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\left(a \cdot 27\right) \cdot b \leq -1 \cdot 10^{+63} \lor \neg \left(\left(a \cdot 27\right) \cdot b \leq 10^{+44}\right):\\ \;\;\;\;\left(b \cdot a\right) \cdot 27\\ \mathbf{else}:\\ \;\;\;\;x + x\\ \end{array} \]
                              11. Add Preprocessing

                              Alternative 15: 98.8% accurate, 0.9× speedup?

                              \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 4 \cdot 10^{-16}:\\ \;\;\;\;\mathsf{fma}\left(y, \left(-9 \cdot z\right) \cdot t, \mathsf{fma}\left(b \cdot 27, a, 2 \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \left(z \cdot \left(9 \cdot y\right)\right)\right)\right)\\ \end{array} \end{array} \]
                              NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                              (FPCore (x y z t a b)
                               :precision binary64
                               (if (<= z 4e-16)
                                 (fma y (* (* -9.0 z) t) (fma (* b 27.0) a (* 2.0 x)))
                                 (+ x (- x (fma (* -27.0 a) b (* t (* z (* 9.0 y))))))))
                              assert(x < y && y < z && z < t && t < a && a < b);
                              double code(double x, double y, double z, double t, double a, double b) {
                              	double tmp;
                              	if (z <= 4e-16) {
                              		tmp = fma(y, ((-9.0 * z) * t), fma((b * 27.0), a, (2.0 * x)));
                              	} else {
                              		tmp = x + (x - fma((-27.0 * a), b, (t * (z * (9.0 * y)))));
                              	}
                              	return tmp;
                              }
                              
                              x, y, z, t, a, b = sort([x, y, z, t, a, b])
                              function code(x, y, z, t, a, b)
                              	tmp = 0.0
                              	if (z <= 4e-16)
                              		tmp = fma(y, Float64(Float64(-9.0 * z) * t), fma(Float64(b * 27.0), a, Float64(2.0 * x)));
                              	else
                              		tmp = Float64(x + Float64(x - fma(Float64(-27.0 * a), b, Float64(t * Float64(z * Float64(9.0 * y))))));
                              	end
                              	return tmp
                              end
                              
                              NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 4e-16], N[(y * N[(N[(-9.0 * z), $MachinePrecision] * t), $MachinePrecision] + N[(N[(b * 27.0), $MachinePrecision] * a + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(x - N[(N[(-27.0 * a), $MachinePrecision] * b + N[(t * N[(z * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;z \leq 4 \cdot 10^{-16}:\\
                              \;\;\;\;\mathsf{fma}\left(y, \left(-9 \cdot z\right) \cdot t, \mathsf{fma}\left(b \cdot 27, a, 2 \cdot x\right)\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \left(z \cdot \left(9 \cdot y\right)\right)\right)\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if z < 3.9999999999999999e-16

                                1. Initial program 95.7%

                                  \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                                2. Add Preprocessing
                                3. Step-by-step derivation
                                  1. lift-+.f64N/A

                                    \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                                  2. lift--.f64N/A

                                    \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)} + \left(a \cdot 27\right) \cdot b \]
                                  3. lift-*.f64N/A

                                    \[\leadsto \left(x \cdot 2 - \color{blue}{\left(\left(y \cdot 9\right) \cdot z\right) \cdot t}\right) + \left(a \cdot 27\right) \cdot b \]
                                  4. fp-cancel-sub-sign-invN/A

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

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

                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y \cdot 9\right) \cdot z\right)\right) \cdot t + \left(x \cdot 2 + \left(a \cdot 27\right) \cdot b\right)} \]
                                  7. lift-*.f64N/A

                                    \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y \cdot 9\right) \cdot z}\right)\right) \cdot t + \left(x \cdot 2 + \left(a \cdot 27\right) \cdot b\right) \]
                                  8. lift-*.f64N/A

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

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

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

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

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

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(y, \left(\mathsf{neg}\left(9 \cdot z\right)\right) \cdot t, \left(a \cdot 27\right) \cdot b + x \cdot 2\right)} \]
                                4. Applied rewrites98.3%

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

                                if 3.9999999999999999e-16 < z

                                1. Initial program 92.9%

                                  \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                                2. Add Preprocessing
                                3. Step-by-step derivation
                                  1. lift-+.f64N/A

                                    \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                                  2. lift--.f64N/A

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

                                    \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                                  4. lift-*.f64N/A

                                    \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                                  5. *-commutativeN/A

                                    \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                                  6. count-2-revN/A

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

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

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

                                    \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                                  10. lift-*.f64N/A

                                    \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                                  11. fp-cancel-sub-sign-invN/A

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

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

                                    \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                                  14. lift-*.f64N/A

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

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

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

                                    \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot a}, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                                  18. metadata-eval93.0

                                    \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                                  19. lift-*.f64N/A

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

                                    \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                                  21. lower-*.f6493.0

                                    \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                                  22. lift-*.f64N/A

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

                                    \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                                  24. lower-*.f6493.0

                                    \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                                  25. lift-*.f64N/A

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

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

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

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

                              Alternative 16: 65.1% accurate, 2.5× speedup?

                              \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ x + \mathsf{fma}\left(b \cdot a, 27, x\right) \end{array} \]
                              NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                              (FPCore (x y z t a b) :precision binary64 (+ x (fma (* b a) 27.0 x)))
                              assert(x < y && y < z && z < t && t < a && a < b);
                              double code(double x, double y, double z, double t, double a, double b) {
                              	return x + fma((b * a), 27.0, x);
                              }
                              
                              x, y, z, t, a, b = sort([x, y, z, t, a, b])
                              function code(x, y, z, t, a, b)
                              	return Float64(x + fma(Float64(b * a), 27.0, x))
                              end
                              
                              NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                              code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(b * a), $MachinePrecision] * 27.0 + x), $MachinePrecision]), $MachinePrecision]
                              
                              \begin{array}{l}
                              [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                              \\
                              x + \mathsf{fma}\left(b \cdot a, 27, x\right)
                              \end{array}
                              
                              Derivation
                              1. Initial program 95.0%

                                \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                              2. Add Preprocessing
                              3. Step-by-step derivation
                                1. lift-+.f64N/A

                                  \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                                2. lift--.f64N/A

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

                                  \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                                4. lift-*.f64N/A

                                  \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                                5. *-commutativeN/A

                                  \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                                6. count-2-revN/A

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

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

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

                                  \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                                10. lift-*.f64N/A

                                  \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                                11. fp-cancel-sub-sign-invN/A

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

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

                                  \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                                14. lift-*.f64N/A

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

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

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

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot a}, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                                18. metadata-eval95.4

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                                19. lift-*.f64N/A

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

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                                21. lower-*.f6495.4

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                                22. lift-*.f64N/A

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

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                                24. lower-*.f6495.4

                                  \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                                25. lift-*.f64N/A

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

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

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

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

                                \[\leadsto x + \color{blue}{\left(x - -27 \cdot \left(a \cdot b\right)\right)} \]
                              6. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto x + \left(x - \color{blue}{\left(\mathsf{neg}\left(27\right)\right)} \cdot \left(a \cdot b\right)\right) \]
                                2. fp-cancel-sign-sub-invN/A

                                  \[\leadsto x + \color{blue}{\left(x + 27 \cdot \left(a \cdot b\right)\right)} \]
                                3. +-commutativeN/A

                                  \[\leadsto x + \color{blue}{\left(27 \cdot \left(a \cdot b\right) + x\right)} \]
                                4. *-commutativeN/A

                                  \[\leadsto x + \left(\color{blue}{\left(a \cdot b\right) \cdot 27} + x\right) \]
                                5. lower-fma.f64N/A

                                  \[\leadsto x + \color{blue}{\mathsf{fma}\left(a \cdot b, 27, x\right)} \]
                                6. *-commutativeN/A

                                  \[\leadsto x + \mathsf{fma}\left(\color{blue}{b \cdot a}, 27, x\right) \]
                                7. lower-*.f6463.3

                                  \[\leadsto x + \mathsf{fma}\left(\color{blue}{b \cdot a}, 27, x\right) \]
                              7. Applied rewrites63.3%

                                \[\leadsto x + \color{blue}{\mathsf{fma}\left(b \cdot a, 27, x\right)} \]
                              8. Add Preprocessing

                              Alternative 17: 65.0% accurate, 2.5× speedup?

                              \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \mathsf{fma}\left(27 \cdot a, b, x + x\right) \end{array} \]
                              NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                              (FPCore (x y z t a b) :precision binary64 (fma (* 27.0 a) b (+ x x)))
                              assert(x < y && y < z && z < t && t < a && a < b);
                              double code(double x, double y, double z, double t, double a, double b) {
                              	return fma((27.0 * a), b, (x + x));
                              }
                              
                              x, y, z, t, a, b = sort([x, y, z, t, a, b])
                              function code(x, y, z, t, a, b)
                              	return fma(Float64(27.0 * a), b, Float64(x + x))
                              end
                              
                              NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                              code[x_, y_, z_, t_, a_, b_] := N[(N[(27.0 * a), $MachinePrecision] * b + N[(x + x), $MachinePrecision]), $MachinePrecision]
                              
                              \begin{array}{l}
                              [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                              \\
                              \mathsf{fma}\left(27 \cdot a, b, x + x\right)
                              \end{array}
                              
                              Derivation
                              1. Initial program 95.0%

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

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

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

                                  \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                                3. lower-*.f64N/A

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

                                  \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                                5. lower-*.f6463.3

                                  \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                              5. Applied rewrites63.3%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)} \]
                              6. Step-by-step derivation
                                1. Applied rewrites63.3%

                                  \[\leadsto \mathsf{fma}\left(27 \cdot a, \color{blue}{b}, 2 \cdot x\right) \]
                                2. Step-by-step derivation
                                  1. Applied rewrites63.3%

                                    \[\leadsto \mathsf{fma}\left(27 \cdot a, b, x + x\right) \]
                                  2. Add Preprocessing

                                  Alternative 18: 65.0% accurate, 2.5× speedup?

                                  \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ \mathsf{fma}\left(27 \cdot b, a, x\right) + x \end{array} \]
                                  NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                                  (FPCore (x y z t a b) :precision binary64 (+ (fma (* 27.0 b) a x) x))
                                  assert(x < y && y < z && z < t && t < a && a < b);
                                  double code(double x, double y, double z, double t, double a, double b) {
                                  	return fma((27.0 * b), a, x) + x;
                                  }
                                  
                                  x, y, z, t, a, b = sort([x, y, z, t, a, b])
                                  function code(x, y, z, t, a, b)
                                  	return Float64(fma(Float64(27.0 * b), a, x) + x)
                                  end
                                  
                                  NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                                  code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(27.0 * b), $MachinePrecision] * a + x), $MachinePrecision] + x), $MachinePrecision]
                                  
                                  \begin{array}{l}
                                  [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                                  \\
                                  \mathsf{fma}\left(27 \cdot b, a, x\right) + x
                                  \end{array}
                                  
                                  Derivation
                                  1. Initial program 95.0%

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

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

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

                                      \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(a \cdot b\right) \cdot 27}\right) \]
                                    3. lower-*.f64N/A

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

                                      \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                                    5. lower-*.f6463.3

                                      \[\leadsto \mathsf{fma}\left(2, x, \color{blue}{\left(b \cdot a\right)} \cdot 27\right) \]
                                  5. Applied rewrites63.3%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(2, x, \left(b \cdot a\right) \cdot 27\right)} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites63.3%

                                      \[\leadsto \mathsf{fma}\left(27 \cdot b, a, x\right) + \color{blue}{x} \]
                                    2. Add Preprocessing

                                    Alternative 19: 31.6% accurate, 9.3× speedup?

                                    \[\begin{array}{l} [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\ \\ x + x \end{array} \]
                                    NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                                    (FPCore (x y z t a b) :precision binary64 (+ x x))
                                    assert(x < y && y < z && z < t && t < a && a < b);
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	return x + x;
                                    }
                                    
                                    NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                                    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 + x
                                    end function
                                    
                                    assert x < y && y < z && z < t && t < a && a < b;
                                    public static double code(double x, double y, double z, double t, double a, double b) {
                                    	return x + x;
                                    }
                                    
                                    [x, y, z, t, a, b] = sort([x, y, z, t, a, b])
                                    def code(x, y, z, t, a, b):
                                    	return x + x
                                    
                                    x, y, z, t, a, b = sort([x, y, z, t, a, b])
                                    function code(x, y, z, t, a, b)
                                    	return Float64(x + x)
                                    end
                                    
                                    x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
                                    function tmp = code(x, y, z, t, a, b)
                                    	tmp = x + x;
                                    end
                                    
                                    NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
                                    code[x_, y_, z_, t_, a_, b_] := N[(x + x), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    [x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
                                    \\
                                    x + x
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 95.0%

                                      \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b \]
                                    2. Add Preprocessing
                                    3. Step-by-step derivation
                                      1. lift-+.f64N/A

                                        \[\leadsto \color{blue}{\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b} \]
                                      2. lift--.f64N/A

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

                                        \[\leadsto \color{blue}{x \cdot 2 - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)} \]
                                      4. lift-*.f64N/A

                                        \[\leadsto \color{blue}{x \cdot 2} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                                      5. *-commutativeN/A

                                        \[\leadsto \color{blue}{2 \cdot x} - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right) \]
                                      6. count-2-revN/A

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

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

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

                                        \[\leadsto x + \color{blue}{\left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \left(a \cdot 27\right) \cdot b\right)\right)} \]
                                      10. lift-*.f64N/A

                                        \[\leadsto x + \left(x - \left(\left(\left(y \cdot 9\right) \cdot z\right) \cdot t - \color{blue}{\left(a \cdot 27\right) \cdot b}\right)\right) \]
                                      11. fp-cancel-sub-sign-invN/A

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

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

                                        \[\leadsto x + \left(x - \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a \cdot 27\right), b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)}\right) \]
                                      14. lift-*.f64N/A

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

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

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

                                        \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot a}, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                                      18. metadata-eval95.4

                                        \[\leadsto x + \left(x - \mathsf{fma}\left(\color{blue}{-27} \cdot a, b, \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\right) \]
                                      19. lift-*.f64N/A

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

                                        \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                                      21. lower-*.f6495.4

                                        \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, \color{blue}{t \cdot \left(\left(y \cdot 9\right) \cdot z\right)}\right)\right) \]
                                      22. lift-*.f64N/A

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

                                        \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                                      24. lower-*.f6495.4

                                        \[\leadsto x + \left(x - \mathsf{fma}\left(-27 \cdot a, b, t \cdot \color{blue}{\left(z \cdot \left(y \cdot 9\right)\right)}\right)\right) \]
                                      25. lift-*.f64N/A

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

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

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

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

                                      \[\leadsto \color{blue}{2 \cdot x} \]
                                    6. Step-by-step derivation
                                      1. lower-*.f6433.1

                                        \[\leadsto \color{blue}{2 \cdot x} \]
                                    7. Applied rewrites33.1%

                                      \[\leadsto \color{blue}{2 \cdot x} \]
                                    8. Step-by-step derivation
                                      1. Applied rewrites33.1%

                                        \[\leadsto x + \color{blue}{x} \]
                                      2. Add Preprocessing

                                      Developer Target 1: 95.2% accurate, 0.9× speedup?

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

                                      Reproduce

                                      ?
                                      herbie shell --seed 2024326 
                                      (FPCore (x y z t a b)
                                        :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, A"
                                        :precision binary64
                                      
                                        :alt
                                        (! :herbie-platform default (if (< y 7590524218811189/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b))))
                                      
                                        (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))