Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 71.1% → 99.1%
Time: 16.9s
Alternatives: 21
Speedup: 8.3×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* (* 3.0 x1) x1))
        (t_1 (+ (* x1 x1) 1.0))
        (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
   (+
    x1
    (+
     (+
      (+
       (+
        (*
         (+
          (* (* (* 2.0 x1) t_2) (- t_2 3.0))
          (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
         t_1)
        (* t_0 t_2))
       (* (* x1 x1) x1))
      x1)
     (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    t_0 = (3.0d0 * x1) * x1
    t_1 = (x1 * x1) + 1.0d0
    t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
    code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2):
	t_0 = (3.0 * x1) * x1
	t_1 = (x1 * x1) + 1.0
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2)
	t_0 = Float64(Float64(3.0 * x1) * x1)
	t_1 = Float64(Float64(x1 * x1) + 1.0)
	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
	return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
end
function tmp = code(x1, x2)
	t_0 = (3.0 * x1) * x1;
	t_1 = (x1 * x1) + 1.0;
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\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 21 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: 71.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* (* 3.0 x1) x1))
        (t_1 (+ (* x1 x1) 1.0))
        (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
   (+
    x1
    (+
     (+
      (+
       (+
        (*
         (+
          (* (* (* 2.0 x1) t_2) (- t_2 3.0))
          (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
         t_1)
        (* t_0 t_2))
       (* (* x1 x1) x1))
      x1)
     (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    t_0 = (3.0d0 * x1) * x1
    t_1 = (x1 * x1) + 1.0d0
    t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
    code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2):
	t_0 = (3.0 * x1) * x1
	t_1 = (x1 * x1) + 1.0
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2)
	t_0 = Float64(Float64(3.0 * x1) * x1)
	t_1 = Float64(Float64(x1 * x1) + 1.0)
	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
	return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
end
function tmp = code(x1, x2)
	t_0 = (3.0 * x1) * x1;
	t_1 = (x1 * x1) + 1.0;
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}

Alternative 1: 99.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ t_3 := \mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1\\ t_4 := \frac{t\_3}{\mathsf{fma}\left(x1, x1, 1\right)}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\ \;\;\;\;x1 + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_4, 4, -6\right), x1 \cdot x1, \left(t\_4 - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot t\_4\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \mathsf{fma}\left(\frac{x1 \cdot t\_3}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1 \cdot x1\right), \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\mathsf{fma}\left(\mathsf{fma}\left(6, x1, -3\right), x1, \mathsf{fma}\left(2, x2, -3\right) \cdot 4\right) + 9\right) \cdot \left(x1 \cdot x1\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* (* 3.0 x1) x1))
        (t_1 (+ (* x1 x1) 1.0))
        (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
        (t_3 (- (fma (* 3.0 x1) x1 (* 2.0 x2)) x1))
        (t_4 (/ t_3 (fma x1 x1 1.0))))
   (if (<=
        (+
         x1
         (+
          (+
           (+
            (+
             (*
              (+
               (* (* (* 2.0 x1) t_2) (- t_2 3.0))
               (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
              t_1)
             (* t_0 t_2))
            (* (* x1 x1) x1))
           x1)
          (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
        INFINITY)
     (+
      x1
      (fma
       (fma (fma t_4 4.0 -6.0) (* x1 x1) (* (- t_4 3.0) (* (* 2.0 x1) t_4)))
       (fma x1 x1 1.0)
       (fma
        x1
        (fma (/ (* x1 t_3) (fma x1 x1 1.0)) 3.0 (* x1 x1))
        (fma
         (/ 3.0 (fma x1 x1 1.0))
         (fma -2.0 x2 (fma (* 3.0 x1) x1 (- x1)))
         x1))))
     (+
      x1
      (*
       (+ (fma (fma 6.0 x1 -3.0) x1 (* (fma 2.0 x2 -3.0) 4.0)) 9.0)
       (* x1 x1))))))
double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	double t_3 = fma((3.0 * x1), x1, (2.0 * x2)) - x1;
	double t_4 = t_3 / fma(x1, x1, 1.0);
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
		tmp = x1 + fma(fma(fma(t_4, 4.0, -6.0), (x1 * x1), ((t_4 - 3.0) * ((2.0 * x1) * t_4))), fma(x1, x1, 1.0), fma(x1, fma(((x1 * t_3) / fma(x1, x1, 1.0)), 3.0, (x1 * x1)), fma((3.0 / fma(x1, x1, 1.0)), fma(-2.0, x2, fma((3.0 * x1), x1, -x1)), x1)));
	} else {
		tmp = x1 + ((fma(fma(6.0, x1, -3.0), x1, (fma(2.0, x2, -3.0) * 4.0)) + 9.0) * (x1 * x1));
	}
	return tmp;
}
function code(x1, x2)
	t_0 = Float64(Float64(3.0 * x1) * x1)
	t_1 = Float64(Float64(x1 * x1) + 1.0)
	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
	t_3 = Float64(fma(Float64(3.0 * x1), x1, Float64(2.0 * x2)) - x1)
	t_4 = Float64(t_3 / fma(x1, x1, 1.0))
	tmp = 0.0
	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf)
		tmp = Float64(x1 + fma(fma(fma(t_4, 4.0, -6.0), Float64(x1 * x1), Float64(Float64(t_4 - 3.0) * Float64(Float64(2.0 * x1) * t_4))), fma(x1, x1, 1.0), fma(x1, fma(Float64(Float64(x1 * t_3) / fma(x1, x1, 1.0)), 3.0, Float64(x1 * x1)), fma(Float64(3.0 / fma(x1, x1, 1.0)), fma(-2.0, x2, fma(Float64(3.0 * x1), x1, Float64(-x1))), x1))));
	else
		tmp = Float64(x1 + Float64(Float64(fma(fma(6.0, x1, -3.0), x1, Float64(fma(2.0, x2, -3.0) * 4.0)) + 9.0) * Float64(x1 * x1)));
	end
	return tmp
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(3.0 * x1), $MachinePrecision] * x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(N[(t$95$4 * 4.0 + -6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision] + N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(2.0 * x1), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x1 * t$95$3), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(-2.0 * x2 + N[(N[(3.0 * x1), $MachinePrecision] * x1 + (-x1)), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(N[(6.0 * x1 + -3.0), $MachinePrecision] * x1 + N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := \mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_4, 4, -6\right), x1 \cdot x1, \left(t\_4 - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot t\_4\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \mathsf{fma}\left(\frac{x1 \cdot t\_3}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1 \cdot x1\right), \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x1 + \left(\mathsf{fma}\left(\mathsf{fma}\left(6, x1, -3\right), x1, \mathsf{fma}\left(2, x2, -3\right) \cdot 4\right) + 9\right) \cdot \left(x1 \cdot x1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

    1. Initial program 99.4%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Add Preprocessing
    3. Applied rewrites99.7%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x1 \cdot x1, x1, \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(4, \frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot 2\right)\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(\left(3 \cdot x1\right) \cdot x1\right)\right) + \mathsf{fma}\left(\frac{\mathsf{fma}\left(-2, x2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1\right)\right)} \]
    4. Applied rewrites99.7%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \mathsf{fma}\left(\frac{x1 \cdot \left(\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1 \cdot x1\right), \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right)} \]

    if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

    1. Initial program 0.0%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x1 around -inf

      \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
      2. lower-*.f64N/A

        \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
    5. Applied rewrites100.0%

      \[\leadsto x1 + \color{blue}{\left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
    6. Taylor expanded in x1 around 0

      \[\leadsto x1 + {x1}^{2} \cdot \color{blue}{\left(9 + \left(4 \cdot \left(2 \cdot x2 - 3\right) + x1 \cdot \left(6 \cdot x1 - 3\right)\right)\right)} \]
    7. Step-by-step derivation
      1. Applied rewrites100.0%

        \[\leadsto x1 + \left(\mathsf{fma}\left(\mathsf{fma}\left(6, x1, -3\right), x1, \mathsf{fma}\left(2, x2, -3\right) \cdot 4\right) + 9\right) \cdot \color{blue}{\left(x1 \cdot x1\right)} \]
    8. Recombined 2 regimes into one program.
    9. Add Preprocessing

    Alternative 2: 65.0% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ t_3 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\ t_4 := \mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right) \cdot x1, x2, -x1\right)\\ \mathbf{if}\;t\_3 \leq -4 \cdot 10^{+192}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 \leq 10^{+171}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right)\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 8\\ \end{array} \end{array} \]
    (FPCore (x1 x2)
     :precision binary64
     (let* ((t_0 (* (* 3.0 x1) x1))
            (t_1 (+ (* x1 x1) 1.0))
            (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
            (t_3
             (+
              x1
              (+
               (+
                (+
                 (+
                  (*
                   (+
                    (* (* (* 2.0 x1) t_2) (- t_2 3.0))
                    (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
                   t_1)
                  (* t_0 t_2))
                 (* (* x1 x1) x1))
                x1)
               (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))))
            (t_4 (fma (* (fma 8.0 x2 -12.0) x1) x2 (- x1))))
       (if (<= t_3 -4e+192)
         t_4
         (if (<= t_3 1e+171)
           (fma (fma -12.0 x1 -6.0) x2 (- x1))
           (if (<= t_3 INFINITY) t_4 (+ x1 (* (* (* x1 x1) x2) 8.0)))))))
    double code(double x1, double x2) {
    	double t_0 = (3.0 * x1) * x1;
    	double t_1 = (x1 * x1) + 1.0;
    	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
    	double t_3 = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
    	double t_4 = fma((fma(8.0, x2, -12.0) * x1), x2, -x1);
    	double tmp;
    	if (t_3 <= -4e+192) {
    		tmp = t_4;
    	} else if (t_3 <= 1e+171) {
    		tmp = fma(fma(-12.0, x1, -6.0), x2, -x1);
    	} else if (t_3 <= ((double) INFINITY)) {
    		tmp = t_4;
    	} else {
    		tmp = x1 + (((x1 * x1) * x2) * 8.0);
    	}
    	return tmp;
    }
    
    function code(x1, x2)
    	t_0 = Float64(Float64(3.0 * x1) * x1)
    	t_1 = Float64(Float64(x1 * x1) + 1.0)
    	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
    	t_3 = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
    	t_4 = fma(Float64(fma(8.0, x2, -12.0) * x1), x2, Float64(-x1))
    	tmp = 0.0
    	if (t_3 <= -4e+192)
    		tmp = t_4;
    	elseif (t_3 <= 1e+171)
    		tmp = fma(fma(-12.0, x1, -6.0), x2, Float64(-x1));
    	elseif (t_3 <= Inf)
    		tmp = t_4;
    	else
    		tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * x2) * 8.0));
    	end
    	return tmp
    end
    
    code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x1), $MachinePrecision] * x2 + (-x1)), $MachinePrecision]}, If[LessEqual[t$95$3, -4e+192], t$95$4, If[LessEqual[t$95$3, 1e+171], N[(N[(-12.0 * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \left(3 \cdot x1\right) \cdot x1\\
    t_1 := x1 \cdot x1 + 1\\
    t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
    t_3 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
    t_4 := \mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right) \cdot x1, x2, -x1\right)\\
    \mathbf{if}\;t\_3 \leq -4 \cdot 10^{+192}:\\
    \;\;\;\;t\_4\\
    
    \mathbf{elif}\;t\_3 \leq 10^{+171}:\\
    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right)\\
    
    \mathbf{elif}\;t\_3 \leq \infty:\\
    \;\;\;\;t\_4\\
    
    \mathbf{else}:\\
    \;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 8\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -4.00000000000000016e192 or 9.99999999999999954e170 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

      1. Initial program 99.8%

        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in x1 around 0

        \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
      4. Step-by-step derivation
        1. lower-*.f645.4

          \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
      5. Applied rewrites5.4%

        \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
      6. Taylor expanded in x1 around 0

        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
        3. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
        4. sub-negN/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
        7. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
        8. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
        9. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
        10. sub-negN/A

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
        12. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
        13. lower-*.f6441.1

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
      8. Applied rewrites41.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
      9. Taylor expanded in x1 around inf

        \[\leadsto x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
      10. Step-by-step derivation
        1. Applied rewrites41.1%

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right) \cdot \color{blue}{x1} \]
        2. Taylor expanded in x2 around 0

          \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} \]
        3. Step-by-step derivation
          1. Applied rewrites46.6%

            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right) \cdot x1, x2, -x1\right) \]

          if -4.00000000000000016e192 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 9.99999999999999954e170

          1. Initial program 99.1%

            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in x1 around 0

            \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
          4. Step-by-step derivation
            1. lower-*.f6457.1

              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
          5. Applied rewrites57.1%

            \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
          6. Taylor expanded in x1 around 0

            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
            2. *-commutativeN/A

              \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
            3. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
            4. sub-negN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
            6. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
            7. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
            9. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
            10. sub-negN/A

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
            11. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
            12. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
            13. lower-*.f6487.2

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
          8. Applied rewrites87.2%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
          9. Taylor expanded in x2 around 0

            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
          10. Step-by-step derivation
            1. Applied rewrites86.3%

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), \color{blue}{x2}, -x1\right) \]

            if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

            1. Initial program 0.0%

              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
            2. Add Preprocessing
            3. Taylor expanded in x1 around -inf

              \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
              2. lower-*.f64N/A

                \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
            5. Applied rewrites100.0%

              \[\leadsto x1 + \color{blue}{\left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
            6. Taylor expanded in x2 around inf

              \[\leadsto x1 + 8 \cdot \color{blue}{\left({x1}^{2} \cdot x2\right)} \]
            7. Step-by-step derivation
              1. Applied rewrites45.2%

                \[\leadsto x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot \color{blue}{8} \]
            8. Recombined 3 regimes into one program.
            9. Add Preprocessing

            Alternative 3: 62.4% accurate, 0.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ t_3 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\ \mathbf{if}\;t\_3 \leq -2 \cdot 10^{+199}:\\ \;\;\;\;\left(\left(x2 \cdot x2\right) \cdot x1\right) \cdot 8\\ \mathbf{elif}\;t\_3 \leq 10^{+171}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right)\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x2, -1\right) \cdot x1\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 8\\ \end{array} \end{array} \]
            (FPCore (x1 x2)
             :precision binary64
             (let* ((t_0 (* (* 3.0 x1) x1))
                    (t_1 (+ (* x1 x1) 1.0))
                    (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
                    (t_3
                     (+
                      x1
                      (+
                       (+
                        (+
                         (+
                          (*
                           (+
                            (* (* (* 2.0 x1) t_2) (- t_2 3.0))
                            (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
                           t_1)
                          (* t_0 t_2))
                         (* (* x1 x1) x1))
                        x1)
                       (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
               (if (<= t_3 -2e+199)
                 (* (* (* x2 x2) x1) 8.0)
                 (if (<= t_3 1e+171)
                   (fma (fma -12.0 x1 -6.0) x2 (- x1))
                   (if (<= t_3 INFINITY)
                     (* (fma (fma 8.0 x2 -12.0) x2 -1.0) x1)
                     (+ x1 (* (* (* x1 x1) x2) 8.0)))))))
            double code(double x1, double x2) {
            	double t_0 = (3.0 * x1) * x1;
            	double t_1 = (x1 * x1) + 1.0;
            	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
            	double t_3 = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
            	double tmp;
            	if (t_3 <= -2e+199) {
            		tmp = ((x2 * x2) * x1) * 8.0;
            	} else if (t_3 <= 1e+171) {
            		tmp = fma(fma(-12.0, x1, -6.0), x2, -x1);
            	} else if (t_3 <= ((double) INFINITY)) {
            		tmp = fma(fma(8.0, x2, -12.0), x2, -1.0) * x1;
            	} else {
            		tmp = x1 + (((x1 * x1) * x2) * 8.0);
            	}
            	return tmp;
            }
            
            function code(x1, x2)
            	t_0 = Float64(Float64(3.0 * x1) * x1)
            	t_1 = Float64(Float64(x1 * x1) + 1.0)
            	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
            	t_3 = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
            	tmp = 0.0
            	if (t_3 <= -2e+199)
            		tmp = Float64(Float64(Float64(x2 * x2) * x1) * 8.0);
            	elseif (t_3 <= 1e+171)
            		tmp = fma(fma(-12.0, x1, -6.0), x2, Float64(-x1));
            	elseif (t_3 <= Inf)
            		tmp = Float64(fma(fma(8.0, x2, -12.0), x2, -1.0) * x1);
            	else
            		tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * x2) * 8.0));
            	end
            	return tmp
            end
            
            code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+199], N[(N[(N[(x2 * x2), $MachinePrecision] * x1), $MachinePrecision] * 8.0), $MachinePrecision], If[LessEqual[t$95$3, 1e+171], N[(N[(-12.0 * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x2 + -1.0), $MachinePrecision] * x1), $MachinePrecision], N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \left(3 \cdot x1\right) \cdot x1\\
            t_1 := x1 \cdot x1 + 1\\
            t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
            t_3 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
            \mathbf{if}\;t\_3 \leq -2 \cdot 10^{+199}:\\
            \;\;\;\;\left(\left(x2 \cdot x2\right) \cdot x1\right) \cdot 8\\
            
            \mathbf{elif}\;t\_3 \leq 10^{+171}:\\
            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right)\\
            
            \mathbf{elif}\;t\_3 \leq \infty:\\
            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x2, -1\right) \cdot x1\\
            
            \mathbf{else}:\\
            \;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 8\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -2.00000000000000019e199

              1. Initial program 99.9%

                \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in x1 around 0

                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
              4. Step-by-step derivation
                1. lower-*.f641.8

                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
              5. Applied rewrites1.8%

                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
              6. Taylor expanded in x1 around 0

                \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
              7. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                3. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                4. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                5. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                6. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                7. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                8. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                9. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                10. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                11. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                12. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                13. lower-*.f6480.7

                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
              8. Applied rewrites80.7%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
              9. Taylor expanded in x2 around inf

                \[\leadsto 8 \cdot \color{blue}{\left(x1 \cdot {x2}^{2}\right)} \]
              10. Step-by-step derivation
                1. Applied rewrites80.7%

                  \[\leadsto \left(\left(x2 \cdot x2\right) \cdot x1\right) \cdot \color{blue}{8} \]

                if -2.00000000000000019e199 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 9.99999999999999954e170

                1. Initial program 99.1%

                  \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in x1 around 0

                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                4. Step-by-step derivation
                  1. lower-*.f6456.7

                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                5. Applied rewrites56.7%

                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                6. Taylor expanded in x1 around 0

                  \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                7. Step-by-step derivation
                  1. +-commutativeN/A

                    \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                  2. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                  3. lower-fma.f64N/A

                    \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                  4. sub-negN/A

                    \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                  6. metadata-evalN/A

                    \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                  7. lower-fma.f64N/A

                    \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                  8. *-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                  9. lower-*.f64N/A

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                  10. sub-negN/A

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                  11. metadata-evalN/A

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                  12. lower-fma.f64N/A

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                  13. lower-*.f6486.6

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                8. Applied rewrites86.6%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                9. Taylor expanded in x2 around 0

                  \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                10. Step-by-step derivation
                  1. Applied rewrites85.7%

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), \color{blue}{x2}, -x1\right) \]

                  if 9.99999999999999954e170 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

                  1. Initial program 99.7%

                    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in x1 around 0

                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                  4. Step-by-step derivation
                    1. lower-*.f646.4

                      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                  5. Applied rewrites6.4%

                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                  6. Taylor expanded in x1 around 0

                    \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                  7. Step-by-step derivation
                    1. +-commutativeN/A

                      \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                    2. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                    3. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                    4. sub-negN/A

                      \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                    5. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                    6. metadata-evalN/A

                      \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                    7. lower-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                    8. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                    9. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                    10. sub-negN/A

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                    11. metadata-evalN/A

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                    12. lower-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                    13. lower-*.f6430.5

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                  8. Applied rewrites30.5%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                  9. Taylor expanded in x1 around inf

                    \[\leadsto x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                  10. Step-by-step derivation
                    1. Applied rewrites30.5%

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right) \cdot \color{blue}{x1} \]
                    2. Taylor expanded in x2 around 0

                      \[\leadsto \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \cdot x1 \]
                    3. Step-by-step derivation
                      1. Applied rewrites30.5%

                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x2, -1\right) \cdot x1 \]

                      if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

                      1. Initial program 0.0%

                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                      2. Add Preprocessing
                      3. Taylor expanded in x1 around -inf

                        \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                        2. lower-*.f64N/A

                          \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                      5. Applied rewrites100.0%

                        \[\leadsto x1 + \color{blue}{\left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                      6. Taylor expanded in x2 around inf

                        \[\leadsto x1 + 8 \cdot \color{blue}{\left({x1}^{2} \cdot x2\right)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites45.2%

                          \[\leadsto x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot \color{blue}{8} \]
                      8. Recombined 4 regimes into one program.
                      9. Add Preprocessing

                      Alternative 4: 54.9% accurate, 0.5× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ t_3 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\ \mathbf{if}\;t\_3 \leq -2 \cdot 10^{+199}:\\ \;\;\;\;\left(\left(x2 \cdot x2\right) \cdot x1\right) \cdot 8\\ \mathbf{elif}\;t\_3 \leq 10^{+171}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x2, -1\right) \cdot x1\\ \end{array} \end{array} \]
                      (FPCore (x1 x2)
                       :precision binary64
                       (let* ((t_0 (* (* 3.0 x1) x1))
                              (t_1 (+ (* x1 x1) 1.0))
                              (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
                              (t_3
                               (+
                                x1
                                (+
                                 (+
                                  (+
                                   (+
                                    (*
                                     (+
                                      (* (* (* 2.0 x1) t_2) (- t_2 3.0))
                                      (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
                                     t_1)
                                    (* t_0 t_2))
                                   (* (* x1 x1) x1))
                                  x1)
                                 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
                         (if (<= t_3 -2e+199)
                           (* (* (* x2 x2) x1) 8.0)
                           (if (<= t_3 1e+171)
                             (fma (fma -12.0 x1 -6.0) x2 (- x1))
                             (* (fma (fma 8.0 x2 -12.0) x2 -1.0) x1)))))
                      double code(double x1, double x2) {
                      	double t_0 = (3.0 * x1) * x1;
                      	double t_1 = (x1 * x1) + 1.0;
                      	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                      	double t_3 = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
                      	double tmp;
                      	if (t_3 <= -2e+199) {
                      		tmp = ((x2 * x2) * x1) * 8.0;
                      	} else if (t_3 <= 1e+171) {
                      		tmp = fma(fma(-12.0, x1, -6.0), x2, -x1);
                      	} else {
                      		tmp = fma(fma(8.0, x2, -12.0), x2, -1.0) * x1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x1, x2)
                      	t_0 = Float64(Float64(3.0 * x1) * x1)
                      	t_1 = Float64(Float64(x1 * x1) + 1.0)
                      	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
                      	t_3 = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
                      	tmp = 0.0
                      	if (t_3 <= -2e+199)
                      		tmp = Float64(Float64(Float64(x2 * x2) * x1) * 8.0);
                      	elseif (t_3 <= 1e+171)
                      		tmp = fma(fma(-12.0, x1, -6.0), x2, Float64(-x1));
                      	else
                      		tmp = Float64(fma(fma(8.0, x2, -12.0), x2, -1.0) * x1);
                      	end
                      	return tmp
                      end
                      
                      code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+199], N[(N[(N[(x2 * x2), $MachinePrecision] * x1), $MachinePrecision] * 8.0), $MachinePrecision], If[LessEqual[t$95$3, 1e+171], N[(N[(-12.0 * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x2 + -1.0), $MachinePrecision] * x1), $MachinePrecision]]]]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := \left(3 \cdot x1\right) \cdot x1\\
                      t_1 := x1 \cdot x1 + 1\\
                      t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
                      t_3 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
                      \mathbf{if}\;t\_3 \leq -2 \cdot 10^{+199}:\\
                      \;\;\;\;\left(\left(x2 \cdot x2\right) \cdot x1\right) \cdot 8\\
                      
                      \mathbf{elif}\;t\_3 \leq 10^{+171}:\\
                      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x2, -1\right) \cdot x1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -2.00000000000000019e199

                        1. Initial program 99.9%

                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                        2. Add Preprocessing
                        3. Taylor expanded in x1 around 0

                          \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                        4. Step-by-step derivation
                          1. lower-*.f641.8

                            \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                        5. Applied rewrites1.8%

                          \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                        6. Taylor expanded in x1 around 0

                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                        7. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                          2. *-commutativeN/A

                            \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                          3. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                          4. sub-negN/A

                            \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                          5. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                          6. metadata-evalN/A

                            \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                          7. lower-fma.f64N/A

                            \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                          8. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                          9. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                          10. sub-negN/A

                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                          11. metadata-evalN/A

                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                          12. lower-fma.f64N/A

                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                          13. lower-*.f6480.7

                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                        8. Applied rewrites80.7%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                        9. Taylor expanded in x2 around inf

                          \[\leadsto 8 \cdot \color{blue}{\left(x1 \cdot {x2}^{2}\right)} \]
                        10. Step-by-step derivation
                          1. Applied rewrites80.7%

                            \[\leadsto \left(\left(x2 \cdot x2\right) \cdot x1\right) \cdot \color{blue}{8} \]

                          if -2.00000000000000019e199 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 9.99999999999999954e170

                          1. Initial program 99.1%

                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                          2. Add Preprocessing
                          3. Taylor expanded in x1 around 0

                            \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                          4. Step-by-step derivation
                            1. lower-*.f6456.7

                              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                          5. Applied rewrites56.7%

                            \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                          6. Taylor expanded in x1 around 0

                            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                          7. Step-by-step derivation
                            1. +-commutativeN/A

                              \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                            2. *-commutativeN/A

                              \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                            3. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                            4. sub-negN/A

                              \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                            5. *-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                            6. metadata-evalN/A

                              \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                            7. lower-fma.f64N/A

                              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                            8. *-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                            9. lower-*.f64N/A

                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                            10. sub-negN/A

                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                            11. metadata-evalN/A

                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                            12. lower-fma.f64N/A

                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                            13. lower-*.f6486.6

                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                          8. Applied rewrites86.6%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                          9. Taylor expanded in x2 around 0

                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                          10. Step-by-step derivation
                            1. Applied rewrites85.7%

                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), \color{blue}{x2}, -x1\right) \]

                            if 9.99999999999999954e170 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

                            1. Initial program 44.0%

                              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in x1 around 0

                              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                            4. Step-by-step derivation
                              1. lower-*.f644.2

                                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                            5. Applied rewrites4.2%

                              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                            6. Taylor expanded in x1 around 0

                              \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                            7. Step-by-step derivation
                              1. +-commutativeN/A

                                \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                              2. *-commutativeN/A

                                \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                              3. lower-fma.f64N/A

                                \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                              4. sub-negN/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                              5. *-commutativeN/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                              6. metadata-evalN/A

                                \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                              7. lower-fma.f64N/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                              8. *-commutativeN/A

                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                              9. lower-*.f64N/A

                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                              10. sub-negN/A

                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                              11. metadata-evalN/A

                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                              12. lower-fma.f64N/A

                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                              13. lower-*.f6419.2

                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                            8. Applied rewrites19.2%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                            9. Taylor expanded in x1 around inf

                              \[\leadsto x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                            10. Step-by-step derivation
                              1. Applied rewrites20.1%

                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right) \cdot \color{blue}{x1} \]
                              2. Taylor expanded in x2 around 0

                                \[\leadsto \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \cdot x1 \]
                              3. Step-by-step derivation
                                1. Applied rewrites20.1%

                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x2, -1\right) \cdot x1 \]
                              4. Recombined 3 regimes into one program.
                              5. Add Preprocessing

                              Alternative 5: 54.6% accurate, 0.5× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ t_3 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\ \mathbf{if}\;t\_3 \leq -2 \cdot 10^{+199} \lor \neg \left(t\_3 \leq 2 \cdot 10^{+175}\right):\\ \;\;\;\;\left(\left(x2 \cdot x2\right) \cdot x1\right) \cdot 8\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right)\\ \end{array} \end{array} \]
                              (FPCore (x1 x2)
                               :precision binary64
                               (let* ((t_0 (* (* 3.0 x1) x1))
                                      (t_1 (+ (* x1 x1) 1.0))
                                      (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
                                      (t_3
                                       (+
                                        x1
                                        (+
                                         (+
                                          (+
                                           (+
                                            (*
                                             (+
                                              (* (* (* 2.0 x1) t_2) (- t_2 3.0))
                                              (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
                                             t_1)
                                            (* t_0 t_2))
                                           (* (* x1 x1) x1))
                                          x1)
                                         (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
                                 (if (or (<= t_3 -2e+199) (not (<= t_3 2e+175)))
                                   (* (* (* x2 x2) x1) 8.0)
                                   (fma (fma -12.0 x1 -6.0) x2 (- x1)))))
                              double code(double x1, double x2) {
                              	double t_0 = (3.0 * x1) * x1;
                              	double t_1 = (x1 * x1) + 1.0;
                              	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                              	double t_3 = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
                              	double tmp;
                              	if ((t_3 <= -2e+199) || !(t_3 <= 2e+175)) {
                              		tmp = ((x2 * x2) * x1) * 8.0;
                              	} else {
                              		tmp = fma(fma(-12.0, x1, -6.0), x2, -x1);
                              	}
                              	return tmp;
                              }
                              
                              function code(x1, x2)
                              	t_0 = Float64(Float64(3.0 * x1) * x1)
                              	t_1 = Float64(Float64(x1 * x1) + 1.0)
                              	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
                              	t_3 = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
                              	tmp = 0.0
                              	if ((t_3 <= -2e+199) || !(t_3 <= 2e+175))
                              		tmp = Float64(Float64(Float64(x2 * x2) * x1) * 8.0);
                              	else
                              		tmp = fma(fma(-12.0, x1, -6.0), x2, Float64(-x1));
                              	end
                              	return tmp
                              end
                              
                              code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$3, -2e+199], N[Not[LessEqual[t$95$3, 2e+175]], $MachinePrecision]], N[(N[(N[(x2 * x2), $MachinePrecision] * x1), $MachinePrecision] * 8.0), $MachinePrecision], N[(N[(-12.0 * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision]]]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_0 := \left(3 \cdot x1\right) \cdot x1\\
                              t_1 := x1 \cdot x1 + 1\\
                              t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
                              t_3 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
                              \mathbf{if}\;t\_3 \leq -2 \cdot 10^{+199} \lor \neg \left(t\_3 \leq 2 \cdot 10^{+175}\right):\\
                              \;\;\;\;\left(\left(x2 \cdot x2\right) \cdot x1\right) \cdot 8\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -2.00000000000000019e199 or 1.9999999999999999e175 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

                                1. Initial program 49.9%

                                  \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                2. Add Preprocessing
                                3. Taylor expanded in x1 around 0

                                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                4. Step-by-step derivation
                                  1. lower-*.f644.0

                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                5. Applied rewrites4.0%

                                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                6. Taylor expanded in x1 around 0

                                  \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                7. Step-by-step derivation
                                  1. +-commutativeN/A

                                    \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                  2. *-commutativeN/A

                                    \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                  3. lower-fma.f64N/A

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                  4. sub-negN/A

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                  5. *-commutativeN/A

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                  6. metadata-evalN/A

                                    \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                  7. lower-fma.f64N/A

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                  8. *-commutativeN/A

                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                  9. lower-*.f64N/A

                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                  10. sub-negN/A

                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                  11. metadata-evalN/A

                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                  12. lower-fma.f64N/A

                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                  13. lower-*.f6426.3

                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                8. Applied rewrites26.3%

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                9. Taylor expanded in x2 around inf

                                  \[\leadsto 8 \cdot \color{blue}{\left(x1 \cdot {x2}^{2}\right)} \]
                                10. Step-by-step derivation
                                  1. Applied rewrites26.6%

                                    \[\leadsto \left(\left(x2 \cdot x2\right) \cdot x1\right) \cdot \color{blue}{8} \]

                                  if -2.00000000000000019e199 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 1.9999999999999999e175

                                  1. Initial program 99.2%

                                    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in x1 around 0

                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                  4. Step-by-step derivation
                                    1. lower-*.f6456.3

                                      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                  5. Applied rewrites56.3%

                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                  6. Taylor expanded in x1 around 0

                                    \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                  7. Step-by-step derivation
                                    1. +-commutativeN/A

                                      \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                    2. *-commutativeN/A

                                      \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                    3. lower-fma.f64N/A

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                    4. sub-negN/A

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                    5. *-commutativeN/A

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                    6. metadata-evalN/A

                                      \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                    7. lower-fma.f64N/A

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                    8. *-commutativeN/A

                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                    9. lower-*.f64N/A

                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                    10. sub-negN/A

                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                    11. metadata-evalN/A

                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                    12. lower-fma.f64N/A

                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                    13. lower-*.f6486.0

                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                  8. Applied rewrites86.0%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                  9. Taylor expanded in x2 around 0

                                    \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                  10. Step-by-step derivation
                                    1. Applied rewrites85.1%

                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), \color{blue}{x2}, -x1\right) \]
                                  11. Recombined 2 regimes into one program.
                                  12. Final simplification56.7%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq -2 \cdot 10^{+199} \lor \neg \left(x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq 2 \cdot 10^{+175}\right):\\ \;\;\;\;\left(\left(x2 \cdot x2\right) \cdot x1\right) \cdot 8\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right)\\ \end{array} \]
                                  13. Add Preprocessing

                                  Alternative 6: 99.2% accurate, 0.6× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ t_3 := \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\ \;\;\;\;x1 + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_3, 4, -6\right), x1 \cdot x1, \left(t\_3 - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot t\_3\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot x1, \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\mathsf{fma}\left(\mathsf{fma}\left(6, x1, -3\right), x1, \mathsf{fma}\left(2, x2, -3\right) \cdot 4\right) + 9\right) \cdot \left(x1 \cdot x1\right)\\ \end{array} \end{array} \]
                                  (FPCore (x1 x2)
                                   :precision binary64
                                   (let* ((t_0 (* (* 3.0 x1) x1))
                                          (t_1 (+ (* x1 x1) 1.0))
                                          (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
                                          (t_3 (/ (- (fma (* 3.0 x1) x1 (* 2.0 x2)) x1) (fma x1 x1 1.0))))
                                     (if (<=
                                          (+
                                           x1
                                           (+
                                            (+
                                             (+
                                              (+
                                               (*
                                                (+
                                                 (* (* (* 2.0 x1) t_2) (- t_2 3.0))
                                                 (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
                                                t_1)
                                               (* t_0 t_2))
                                              (* (* x1 x1) x1))
                                             x1)
                                            (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
                                          INFINITY)
                                       (+
                                        x1
                                        (fma
                                         (fma (fma t_3 4.0 -6.0) (* x1 x1) (* (- t_3 3.0) (* (* 2.0 x1) t_3)))
                                         (fma x1 x1 1.0)
                                         (fma
                                          x1
                                          (* x1 x1)
                                          (fma
                                           (/ 3.0 (fma x1 x1 1.0))
                                           (fma -2.0 x2 (fma (* 3.0 x1) x1 (- x1)))
                                           x1))))
                                       (+
                                        x1
                                        (*
                                         (+ (fma (fma 6.0 x1 -3.0) x1 (* (fma 2.0 x2 -3.0) 4.0)) 9.0)
                                         (* x1 x1))))))
                                  double code(double x1, double x2) {
                                  	double t_0 = (3.0 * x1) * x1;
                                  	double t_1 = (x1 * x1) + 1.0;
                                  	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                  	double t_3 = (fma((3.0 * x1), x1, (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
                                  	double tmp;
                                  	if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
                                  		tmp = x1 + fma(fma(fma(t_3, 4.0, -6.0), (x1 * x1), ((t_3 - 3.0) * ((2.0 * x1) * t_3))), fma(x1, x1, 1.0), fma(x1, (x1 * x1), fma((3.0 / fma(x1, x1, 1.0)), fma(-2.0, x2, fma((3.0 * x1), x1, -x1)), x1)));
                                  	} else {
                                  		tmp = x1 + ((fma(fma(6.0, x1, -3.0), x1, (fma(2.0, x2, -3.0) * 4.0)) + 9.0) * (x1 * x1));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x1, x2)
                                  	t_0 = Float64(Float64(3.0 * x1) * x1)
                                  	t_1 = Float64(Float64(x1 * x1) + 1.0)
                                  	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
                                  	t_3 = Float64(Float64(fma(Float64(3.0 * x1), x1, Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0))
                                  	tmp = 0.0
                                  	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf)
                                  		tmp = Float64(x1 + fma(fma(fma(t_3, 4.0, -6.0), Float64(x1 * x1), Float64(Float64(t_3 - 3.0) * Float64(Float64(2.0 * x1) * t_3))), fma(x1, x1, 1.0), fma(x1, Float64(x1 * x1), fma(Float64(3.0 / fma(x1, x1, 1.0)), fma(-2.0, x2, fma(Float64(3.0 * x1), x1, Float64(-x1))), x1))));
                                  	else
                                  		tmp = Float64(x1 + Float64(Float64(fma(fma(6.0, x1, -3.0), x1, Float64(fma(2.0, x2, -3.0) * 4.0)) + 9.0) * Float64(x1 * x1)));
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(3.0 * x1), $MachinePrecision] * x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(N[(t$95$3 * 4.0 + -6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision] + N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(N[(2.0 * x1), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + N[(N[(3.0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(-2.0 * x2 + N[(N[(3.0 * x1), $MachinePrecision] * x1 + (-x1)), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(N[(6.0 * x1 + -3.0), $MachinePrecision] * x1 + N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_0 := \left(3 \cdot x1\right) \cdot x1\\
                                  t_1 := x1 \cdot x1 + 1\\
                                  t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
                                  t_3 := \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
                                  \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\
                                  \;\;\;\;x1 + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_3, 4, -6\right), x1 \cdot x1, \left(t\_3 - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot t\_3\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot x1, \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;x1 + \left(\mathsf{fma}\left(\mathsf{fma}\left(6, x1, -3\right), x1, \mathsf{fma}\left(2, x2, -3\right) \cdot 4\right) + 9\right) \cdot \left(x1 \cdot x1\right)\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

                                    1. Initial program 99.4%

                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                    2. Add Preprocessing
                                    3. Applied rewrites99.7%

                                      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x1 \cdot x1, x1, \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(4, \frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot 2\right)\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(\left(3 \cdot x1\right) \cdot x1\right)\right) + \mathsf{fma}\left(\frac{\mathsf{fma}\left(-2, x2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1\right)\right)} \]
                                    4. Applied rewrites99.7%

                                      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \mathsf{fma}\left(\frac{x1 \cdot \left(\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1 \cdot x1\right), \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right)} \]
                                    5. Taylor expanded in x1 around inf

                                      \[\leadsto x1 + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \color{blue}{{x1}^{2}}, \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right) \]
                                    6. Step-by-step derivation
                                      1. unpow2N/A

                                        \[\leadsto x1 + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \color{blue}{x1 \cdot x1}, \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right) \]
                                      2. lower-*.f6499.1

                                        \[\leadsto x1 + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \color{blue}{x1 \cdot x1}, \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right) \]
                                    7. Applied rewrites99.1%

                                      \[\leadsto x1 + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \color{blue}{x1 \cdot x1}, \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right) \]

                                    if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

                                    1. Initial program 0.0%

                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in x1 around -inf

                                      \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right)} \]
                                    4. Step-by-step derivation
                                      1. *-commutativeN/A

                                        \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                      2. lower-*.f64N/A

                                        \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                    5. Applied rewrites100.0%

                                      \[\leadsto x1 + \color{blue}{\left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                    6. Taylor expanded in x1 around 0

                                      \[\leadsto x1 + {x1}^{2} \cdot \color{blue}{\left(9 + \left(4 \cdot \left(2 \cdot x2 - 3\right) + x1 \cdot \left(6 \cdot x1 - 3\right)\right)\right)} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites100.0%

                                        \[\leadsto x1 + \left(\mathsf{fma}\left(\mathsf{fma}\left(6, x1, -3\right), x1, \mathsf{fma}\left(2, x2, -3\right) \cdot 4\right) + 9\right) \cdot \color{blue}{\left(x1 \cdot x1\right)} \]
                                    8. Recombined 2 regimes into one program.
                                    9. Add Preprocessing

                                    Alternative 7: 69.3% accurate, 0.9× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 8\\ \end{array} \end{array} \]
                                    (FPCore (x1 x2)
                                     :precision binary64
                                     (let* ((t_0 (* (* 3.0 x1) x1))
                                            (t_1 (+ (* x1 x1) 1.0))
                                            (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
                                       (if (<=
                                            (+
                                             x1
                                             (+
                                              (+
                                               (+
                                                (+
                                                 (*
                                                  (+
                                                   (* (* (* 2.0 x1) t_2) (- t_2 3.0))
                                                   (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
                                                  t_1)
                                                 (* t_0 t_2))
                                                (* (* x1 x1) x1))
                                               x1)
                                              (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
                                            INFINITY)
                                         (fma (fma (fma 8.0 x2 -12.0) x1 -6.0) x2 (- x1))
                                         (+ x1 (* (* (* x1 x1) x2) 8.0)))))
                                    double code(double x1, double x2) {
                                    	double t_0 = (3.0 * x1) * x1;
                                    	double t_1 = (x1 * x1) + 1.0;
                                    	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                    	double tmp;
                                    	if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
                                    		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, -x1);
                                    	} else {
                                    		tmp = x1 + (((x1 * x1) * x2) * 8.0);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x1, x2)
                                    	t_0 = Float64(Float64(3.0 * x1) * x1)
                                    	t_1 = Float64(Float64(x1 * x1) + 1.0)
                                    	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
                                    	tmp = 0.0
                                    	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf)
                                    		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, Float64(-x1));
                                    	else
                                    		tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * x2) * 8.0));
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision], N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_0 := \left(3 \cdot x1\right) \cdot x1\\
                                    t_1 := x1 \cdot x1 + 1\\
                                    t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
                                    \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\
                                    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 8\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

                                      1. Initial program 99.4%

                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in x1 around 0

                                        \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                      4. Step-by-step derivation
                                        1. lower-*.f6440.0

                                          \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                      5. Applied rewrites40.0%

                                        \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                      6. Taylor expanded in x1 around 0

                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                      7. Step-by-step derivation
                                        1. +-commutativeN/A

                                          \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                        2. *-commutativeN/A

                                          \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                        3. lower-fma.f64N/A

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                        4. sub-negN/A

                                          \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                        5. *-commutativeN/A

                                          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                        6. metadata-evalN/A

                                          \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                        7. lower-fma.f64N/A

                                          \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                        8. *-commutativeN/A

                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                        9. lower-*.f64N/A

                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                        10. sub-negN/A

                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                        11. metadata-evalN/A

                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                        12. lower-fma.f64N/A

                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                        13. lower-*.f6472.0

                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                      8. Applied rewrites72.0%

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                      9. Taylor expanded in x2 around 0

                                        \[\leadsto -1 \cdot \color{blue}{x1} \]
                                      10. Step-by-step derivation
                                        1. Applied rewrites20.1%

                                          \[\leadsto -x1 \]
                                        2. Taylor expanded in x2 around 0

                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites77.5%

                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), \color{blue}{x2}, -x1\right) \]

                                          if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

                                          1. Initial program 0.0%

                                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in x1 around -inf

                                            \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right)} \]
                                          4. Step-by-step derivation
                                            1. *-commutativeN/A

                                              \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                            2. lower-*.f64N/A

                                              \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                          5. Applied rewrites100.0%

                                            \[\leadsto x1 + \color{blue}{\left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                          6. Taylor expanded in x2 around inf

                                            \[\leadsto x1 + 8 \cdot \color{blue}{\left({x1}^{2} \cdot x2\right)} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites45.2%

                                              \[\leadsto x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot \color{blue}{8} \]
                                          8. Recombined 2 regimes into one program.
                                          9. Add Preprocessing

                                          Alternative 8: 43.9% accurate, 0.9× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq 10^{+237}:\\ \;\;\;\;\mathsf{fma}\left(-1, x1, -6 \cdot x2\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-12, x2, -1\right) \cdot x1\\ \end{array} \end{array} \]
                                          (FPCore (x1 x2)
                                           :precision binary64
                                           (let* ((t_0 (* (* 3.0 x1) x1))
                                                  (t_1 (+ (* x1 x1) 1.0))
                                                  (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
                                             (if (<=
                                                  (+
                                                   x1
                                                   (+
                                                    (+
                                                     (+
                                                      (+
                                                       (*
                                                        (+
                                                         (* (* (* 2.0 x1) t_2) (- t_2 3.0))
                                                         (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
                                                        t_1)
                                                       (* t_0 t_2))
                                                      (* (* x1 x1) x1))
                                                     x1)
                                                    (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
                                                  1e+237)
                                               (fma -1.0 x1 (* -6.0 x2))
                                               (* (fma -12.0 x2 -1.0) x1))))
                                          double code(double x1, double x2) {
                                          	double t_0 = (3.0 * x1) * x1;
                                          	double t_1 = (x1 * x1) + 1.0;
                                          	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                          	double tmp;
                                          	if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= 1e+237) {
                                          		tmp = fma(-1.0, x1, (-6.0 * x2));
                                          	} else {
                                          		tmp = fma(-12.0, x2, -1.0) * x1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(x1, x2)
                                          	t_0 = Float64(Float64(3.0 * x1) * x1)
                                          	t_1 = Float64(Float64(x1 * x1) + 1.0)
                                          	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
                                          	tmp = 0.0
                                          	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= 1e+237)
                                          		tmp = fma(-1.0, x1, Float64(-6.0 * x2));
                                          	else
                                          		tmp = Float64(fma(-12.0, x2, -1.0) * x1);
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+237], N[(-1.0 * x1 + N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision], N[(N[(-12.0 * x2 + -1.0), $MachinePrecision] * x1), $MachinePrecision]]]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_0 := \left(3 \cdot x1\right) \cdot x1\\
                                          t_1 := x1 \cdot x1 + 1\\
                                          t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
                                          \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq 10^{+237}:\\
                                          \;\;\;\;\mathsf{fma}\left(-1, x1, -6 \cdot x2\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\mathsf{fma}\left(-12, x2, -1\right) \cdot x1\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 9.9999999999999994e236

                                            1. Initial program 99.3%

                                              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in x1 around 0

                                              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                            4. Step-by-step derivation
                                              1. lower-*.f6449.3

                                                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                            5. Applied rewrites49.3%

                                              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                            6. Taylor expanded in x1 around 0

                                              \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                            7. Step-by-step derivation
                                              1. +-commutativeN/A

                                                \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                              2. *-commutativeN/A

                                                \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                              3. lower-fma.f64N/A

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                              4. sub-negN/A

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                              5. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                              6. metadata-evalN/A

                                                \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                              7. lower-fma.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                              8. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                              9. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                              10. sub-negN/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                              11. metadata-evalN/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                              12. lower-fma.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                              13. lower-*.f6482.1

                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                            8. Applied rewrites82.1%

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                            9. Taylor expanded in x2 around 0

                                              \[\leadsto \mathsf{fma}\left(-1, x1, -6 \cdot x2\right) \]
                                            10. Step-by-step derivation
                                              1. Applied rewrites73.4%

                                                \[\leadsto \mathsf{fma}\left(-1, x1, -6 \cdot x2\right) \]

                                              if 9.9999999999999994e236 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

                                              1. Initial program 37.9%

                                                \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in x1 around 0

                                                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                              4. Step-by-step derivation
                                                1. lower-*.f642.4

                                                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                              5. Applied rewrites2.4%

                                                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                              6. Taylor expanded in x1 around 0

                                                \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                              7. Step-by-step derivation
                                                1. +-commutativeN/A

                                                  \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                2. *-commutativeN/A

                                                  \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                3. lower-fma.f64N/A

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                4. sub-negN/A

                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                5. *-commutativeN/A

                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                6. metadata-evalN/A

                                                  \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                7. lower-fma.f64N/A

                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                8. *-commutativeN/A

                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                9. lower-*.f64N/A

                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                10. sub-negN/A

                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                11. metadata-evalN/A

                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                12. lower-fma.f64N/A

                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                13. lower-*.f6418.1

                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                              8. Applied rewrites18.1%

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                              9. Taylor expanded in x1 around inf

                                                \[\leadsto x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                              10. Step-by-step derivation
                                                1. Applied rewrites19.1%

                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right) \cdot \color{blue}{x1} \]
                                                2. Taylor expanded in x2 around 0

                                                  \[\leadsto \left(-12 \cdot x2 - 1\right) \cdot x1 \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites11.4%

                                                    \[\leadsto \mathsf{fma}\left(-12, x2, -1\right) \cdot x1 \]
                                                4. Recombined 2 regimes into one program.
                                                5. Add Preprocessing

                                                Alternative 9: 95.5% accurate, 1.8× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -28.5 \lor \neg \left(x1 \leq 1.4\right):\\ \;\;\;\;x1 + \left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \end{array} \]
                                                (FPCore (x1 x2)
                                                 :precision binary64
                                                 (if (or (<= x1 -28.5) (not (<= x1 1.4)))
                                                   (+
                                                    x1
                                                    (*
                                                     (- 6.0 (/ (- 3.0 (/ (fma (fma 2.0 x2 -3.0) 4.0 9.0) x1)) x1))
                                                     (pow x1 4.0)))
                                                   (fma (fma (fma 8.0 x2 -12.0) x1 -6.0) x2 (- x1))))
                                                double code(double x1, double x2) {
                                                	double tmp;
                                                	if ((x1 <= -28.5) || !(x1 <= 1.4)) {
                                                		tmp = x1 + ((6.0 - ((3.0 - (fma(fma(2.0, x2, -3.0), 4.0, 9.0) / x1)) / x1)) * pow(x1, 4.0));
                                                	} else {
                                                		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, -x1);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(x1, x2)
                                                	tmp = 0.0
                                                	if ((x1 <= -28.5) || !(x1 <= 1.4))
                                                		tmp = Float64(x1 + Float64(Float64(6.0 - Float64(Float64(3.0 - Float64(fma(fma(2.0, x2, -3.0), 4.0, 9.0) / x1)) / x1)) * (x1 ^ 4.0)));
                                                	else
                                                		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, Float64(-x1));
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[x1_, x2_] := If[Or[LessEqual[x1, -28.5], N[Not[LessEqual[x1, 1.4]], $MachinePrecision]], N[(x1 + N[(N[(6.0 - N[(N[(3.0 - N[(N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * 4.0 + 9.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;x1 \leq -28.5 \lor \neg \left(x1 \leq 1.4\right):\\
                                                \;\;\;\;x1 + \left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if x1 < -28.5 or 1.3999999999999999 < x1

                                                  1. Initial program 43.4%

                                                    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in x1 around -inf

                                                    \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right)} \]
                                                  4. Step-by-step derivation
                                                    1. *-commutativeN/A

                                                      \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                    2. lower-*.f64N/A

                                                      \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                  5. Applied rewrites98.0%

                                                    \[\leadsto x1 + \color{blue}{\left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]

                                                  if -28.5 < x1 < 1.3999999999999999

                                                  1. Initial program 99.3%

                                                    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in x1 around 0

                                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                  4. Step-by-step derivation
                                                    1. lower-*.f6452.3

                                                      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                  5. Applied rewrites52.3%

                                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                  6. Taylor expanded in x1 around 0

                                                    \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                  7. Step-by-step derivation
                                                    1. +-commutativeN/A

                                                      \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                    2. *-commutativeN/A

                                                      \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                    3. lower-fma.f64N/A

                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                    4. sub-negN/A

                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                    5. *-commutativeN/A

                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                    6. metadata-evalN/A

                                                      \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                    7. lower-fma.f64N/A

                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                    8. *-commutativeN/A

                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                    9. lower-*.f64N/A

                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                    10. sub-negN/A

                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                    11. metadata-evalN/A

                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                    12. lower-fma.f64N/A

                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                    13. lower-*.f6490.6

                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                  8. Applied rewrites90.6%

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                  9. Taylor expanded in x2 around 0

                                                    \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                  10. Step-by-step derivation
                                                    1. Applied rewrites26.0%

                                                      \[\leadsto -x1 \]
                                                    2. Taylor expanded in x2 around 0

                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites97.9%

                                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), \color{blue}{x2}, -x1\right) \]
                                                    4. Recombined 2 regimes into one program.
                                                    5. Final simplification97.9%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -28.5 \lor \neg \left(x1 \leq 1.4\right):\\ \;\;\;\;x1 + \left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \]
                                                    6. Add Preprocessing

                                                    Alternative 10: 95.5% accurate, 1.8× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)\\ \mathbf{if}\;x1 \leq -28.5:\\ \;\;\;\;x1 + \left(\frac{t\_0}{x1 \cdot x1} + \left(6 - \frac{3}{x1}\right)\right) \cdot {x1}^{4}\\ \mathbf{elif}\;x1 \leq 1.4:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(6 - \frac{3 - \frac{t\_0}{x1}}{x1}\right) \cdot {x1}^{4}\\ \end{array} \end{array} \]
                                                    (FPCore (x1 x2)
                                                     :precision binary64
                                                     (let* ((t_0 (fma (fma 2.0 x2 -3.0) 4.0 9.0)))
                                                       (if (<= x1 -28.5)
                                                         (+ x1 (* (+ (/ t_0 (* x1 x1)) (- 6.0 (/ 3.0 x1))) (pow x1 4.0)))
                                                         (if (<= x1 1.4)
                                                           (fma (fma (fma 8.0 x2 -12.0) x1 -6.0) x2 (- x1))
                                                           (+ x1 (* (- 6.0 (/ (- 3.0 (/ t_0 x1)) x1)) (pow x1 4.0)))))))
                                                    double code(double x1, double x2) {
                                                    	double t_0 = fma(fma(2.0, x2, -3.0), 4.0, 9.0);
                                                    	double tmp;
                                                    	if (x1 <= -28.5) {
                                                    		tmp = x1 + (((t_0 / (x1 * x1)) + (6.0 - (3.0 / x1))) * pow(x1, 4.0));
                                                    	} else if (x1 <= 1.4) {
                                                    		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, -x1);
                                                    	} else {
                                                    		tmp = x1 + ((6.0 - ((3.0 - (t_0 / x1)) / x1)) * pow(x1, 4.0));
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    function code(x1, x2)
                                                    	t_0 = fma(fma(2.0, x2, -3.0), 4.0, 9.0)
                                                    	tmp = 0.0
                                                    	if (x1 <= -28.5)
                                                    		tmp = Float64(x1 + Float64(Float64(Float64(t_0 / Float64(x1 * x1)) + Float64(6.0 - Float64(3.0 / x1))) * (x1 ^ 4.0)));
                                                    	elseif (x1 <= 1.4)
                                                    		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, Float64(-x1));
                                                    	else
                                                    		tmp = Float64(x1 + Float64(Float64(6.0 - Float64(Float64(3.0 - Float64(t_0 / x1)) / x1)) * (x1 ^ 4.0)));
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * 4.0 + 9.0), $MachinePrecision]}, If[LessEqual[x1, -28.5], N[(x1 + N[(N[(N[(t$95$0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision], N[(x1 + N[(N[(6.0 - N[(N[(3.0 - N[(t$95$0 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    t_0 := \mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)\\
                                                    \mathbf{if}\;x1 \leq -28.5:\\
                                                    \;\;\;\;x1 + \left(\frac{t\_0}{x1 \cdot x1} + \left(6 - \frac{3}{x1}\right)\right) \cdot {x1}^{4}\\
                                                    
                                                    \mathbf{elif}\;x1 \leq 1.4:\\
                                                    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;x1 + \left(6 - \frac{3 - \frac{t\_0}{x1}}{x1}\right) \cdot {x1}^{4}\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 3 regimes
                                                    2. if x1 < -28.5

                                                      1. Initial program 33.7%

                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in x1 around inf

                                                        \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(\left(6 + \left(4 \cdot \frac{2 \cdot x2 - 3}{{x1}^{2}} + \frac{9}{{x1}^{2}}\right)\right) - 3 \cdot \frac{1}{x1}\right)} \]
                                                      4. Step-by-step derivation
                                                        1. *-commutativeN/A

                                                          \[\leadsto x1 + \color{blue}{\left(\left(6 + \left(4 \cdot \frac{2 \cdot x2 - 3}{{x1}^{2}} + \frac{9}{{x1}^{2}}\right)\right) - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                        2. lower-*.f64N/A

                                                          \[\leadsto x1 + \color{blue}{\left(\left(6 + \left(4 \cdot \frac{2 \cdot x2 - 3}{{x1}^{2}} + \frac{9}{{x1}^{2}}\right)\right) - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                      5. Applied rewrites96.5%

                                                        \[\leadsto x1 + \color{blue}{\left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1 \cdot x1} + \left(6 - \frac{3}{x1}\right)\right) \cdot {x1}^{4}} \]

                                                      if -28.5 < x1 < 1.3999999999999999

                                                      1. Initial program 99.3%

                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in x1 around 0

                                                        \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                      4. Step-by-step derivation
                                                        1. lower-*.f6452.3

                                                          \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                      5. Applied rewrites52.3%

                                                        \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                      6. Taylor expanded in x1 around 0

                                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                      7. Step-by-step derivation
                                                        1. +-commutativeN/A

                                                          \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                        2. *-commutativeN/A

                                                          \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                        3. lower-fma.f64N/A

                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                        4. sub-negN/A

                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                        5. *-commutativeN/A

                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                        6. metadata-evalN/A

                                                          \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                        7. lower-fma.f64N/A

                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                        8. *-commutativeN/A

                                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                        9. lower-*.f64N/A

                                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                        10. sub-negN/A

                                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                        11. metadata-evalN/A

                                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                        12. lower-fma.f64N/A

                                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                        13. lower-*.f6490.6

                                                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                      8. Applied rewrites90.6%

                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                      9. Taylor expanded in x2 around 0

                                                        \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                      10. Step-by-step derivation
                                                        1. Applied rewrites26.0%

                                                          \[\leadsto -x1 \]
                                                        2. Taylor expanded in x2 around 0

                                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites97.9%

                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), \color{blue}{x2}, -x1\right) \]

                                                          if 1.3999999999999999 < x1

                                                          1. Initial program 53.5%

                                                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in x1 around -inf

                                                            \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right)} \]
                                                          4. Step-by-step derivation
                                                            1. *-commutativeN/A

                                                              \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                            2. lower-*.f64N/A

                                                              \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                          5. Applied rewrites99.6%

                                                            \[\leadsto x1 + \color{blue}{\left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                        4. Recombined 3 regimes into one program.
                                                        5. Add Preprocessing

                                                        Alternative 11: 95.5% accurate, 5.7× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -28.5 \lor \neg \left(x1 \leq 1.4\right):\\ \;\;\;\;x1 + \left(\mathsf{fma}\left(\mathsf{fma}\left(6, x1, -3\right), x1, \mathsf{fma}\left(2, x2, -3\right) \cdot 4\right) + 9\right) \cdot \left(x1 \cdot x1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \end{array} \]
                                                        (FPCore (x1 x2)
                                                         :precision binary64
                                                         (if (or (<= x1 -28.5) (not (<= x1 1.4)))
                                                           (+
                                                            x1
                                                            (* (+ (fma (fma 6.0 x1 -3.0) x1 (* (fma 2.0 x2 -3.0) 4.0)) 9.0) (* x1 x1)))
                                                           (fma (fma (fma 8.0 x2 -12.0) x1 -6.0) x2 (- x1))))
                                                        double code(double x1, double x2) {
                                                        	double tmp;
                                                        	if ((x1 <= -28.5) || !(x1 <= 1.4)) {
                                                        		tmp = x1 + ((fma(fma(6.0, x1, -3.0), x1, (fma(2.0, x2, -3.0) * 4.0)) + 9.0) * (x1 * x1));
                                                        	} else {
                                                        		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, -x1);
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        function code(x1, x2)
                                                        	tmp = 0.0
                                                        	if ((x1 <= -28.5) || !(x1 <= 1.4))
                                                        		tmp = Float64(x1 + Float64(Float64(fma(fma(6.0, x1, -3.0), x1, Float64(fma(2.0, x2, -3.0) * 4.0)) + 9.0) * Float64(x1 * x1)));
                                                        	else
                                                        		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, Float64(-x1));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        code[x1_, x2_] := If[Or[LessEqual[x1, -28.5], N[Not[LessEqual[x1, 1.4]], $MachinePrecision]], N[(x1 + N[(N[(N[(N[(6.0 * x1 + -3.0), $MachinePrecision] * x1 + N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;x1 \leq -28.5 \lor \neg \left(x1 \leq 1.4\right):\\
                                                        \;\;\;\;x1 + \left(\mathsf{fma}\left(\mathsf{fma}\left(6, x1, -3\right), x1, \mathsf{fma}\left(2, x2, -3\right) \cdot 4\right) + 9\right) \cdot \left(x1 \cdot x1\right)\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if x1 < -28.5 or 1.3999999999999999 < x1

                                                          1. Initial program 43.4%

                                                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in x1 around -inf

                                                            \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right)} \]
                                                          4. Step-by-step derivation
                                                            1. *-commutativeN/A

                                                              \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                            2. lower-*.f64N/A

                                                              \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                          5. Applied rewrites98.0%

                                                            \[\leadsto x1 + \color{blue}{\left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                          6. Taylor expanded in x1 around 0

                                                            \[\leadsto x1 + {x1}^{2} \cdot \color{blue}{\left(9 + \left(4 \cdot \left(2 \cdot x2 - 3\right) + x1 \cdot \left(6 \cdot x1 - 3\right)\right)\right)} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites98.0%

                                                              \[\leadsto x1 + \left(\mathsf{fma}\left(\mathsf{fma}\left(6, x1, -3\right), x1, \mathsf{fma}\left(2, x2, -3\right) \cdot 4\right) + 9\right) \cdot \color{blue}{\left(x1 \cdot x1\right)} \]

                                                            if -28.5 < x1 < 1.3999999999999999

                                                            1. Initial program 99.3%

                                                              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in x1 around 0

                                                              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                            4. Step-by-step derivation
                                                              1. lower-*.f6452.3

                                                                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                            5. Applied rewrites52.3%

                                                              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                            6. Taylor expanded in x1 around 0

                                                              \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                            7. Step-by-step derivation
                                                              1. +-commutativeN/A

                                                                \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                              2. *-commutativeN/A

                                                                \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                              3. lower-fma.f64N/A

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                              4. sub-negN/A

                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                              5. *-commutativeN/A

                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                              6. metadata-evalN/A

                                                                \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                              7. lower-fma.f64N/A

                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                              8. *-commutativeN/A

                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                              9. lower-*.f64N/A

                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                              10. sub-negN/A

                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                              11. metadata-evalN/A

                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                              12. lower-fma.f64N/A

                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                              13. lower-*.f6490.6

                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                            8. Applied rewrites90.6%

                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                            9. Taylor expanded in x2 around 0

                                                              \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                            10. Step-by-step derivation
                                                              1. Applied rewrites26.0%

                                                                \[\leadsto -x1 \]
                                                              2. Taylor expanded in x2 around 0

                                                                \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites97.9%

                                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), \color{blue}{x2}, -x1\right) \]
                                                              4. Recombined 2 regimes into one program.
                                                              5. Final simplification97.9%

                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -28.5 \lor \neg \left(x1 \leq 1.4\right):\\ \;\;\;\;x1 + \left(\mathsf{fma}\left(\mathsf{fma}\left(6, x1, -3\right), x1, \mathsf{fma}\left(2, x2, -3\right) \cdot 4\right) + 9\right) \cdot \left(x1 \cdot x1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \]
                                                              6. Add Preprocessing

                                                              Alternative 12: 93.0% accurate, 6.0× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -72 \lor \neg \left(x1 \leq 10000000000\right):\\ \;\;\;\;x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot x1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \end{array} \]
                                                              (FPCore (x1 x2)
                                                               :precision binary64
                                                               (if (or (<= x1 -72.0) (not (<= x1 10000000000.0)))
                                                                 (+ x1 (* (* (- 6.0 (/ 3.0 x1)) (* x1 x1)) (* x1 x1)))
                                                                 (fma (fma (fma 8.0 x2 -12.0) x1 -6.0) x2 (- x1))))
                                                              double code(double x1, double x2) {
                                                              	double tmp;
                                                              	if ((x1 <= -72.0) || !(x1 <= 10000000000.0)) {
                                                              		tmp = x1 + (((6.0 - (3.0 / x1)) * (x1 * x1)) * (x1 * x1));
                                                              	} else {
                                                              		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, -x1);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              function code(x1, x2)
                                                              	tmp = 0.0
                                                              	if ((x1 <= -72.0) || !(x1 <= 10000000000.0))
                                                              		tmp = Float64(x1 + Float64(Float64(Float64(6.0 - Float64(3.0 / x1)) * Float64(x1 * x1)) * Float64(x1 * x1)));
                                                              	else
                                                              		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, Float64(-x1));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              code[x1_, x2_] := If[Or[LessEqual[x1, -72.0], N[Not[LessEqual[x1, 10000000000.0]], $MachinePrecision]], N[(x1 + N[(N[(N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;x1 \leq -72 \lor \neg \left(x1 \leq 10000000000\right):\\
                                                              \;\;\;\;x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot x1\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if x1 < -72 or 1e10 < x1

                                                                1. Initial program 43.8%

                                                                  \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in x1 around inf

                                                                  \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{x1}\right)} \]
                                                                4. Step-by-step derivation
                                                                  1. *-commutativeN/A

                                                                    \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                                  2. lower-*.f64N/A

                                                                    \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                                  3. lower--.f64N/A

                                                                    \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right)} \cdot {x1}^{4} \]
                                                                  4. associate-*r/N/A

                                                                    \[\leadsto x1 + \left(6 - \color{blue}{\frac{3 \cdot 1}{x1}}\right) \cdot {x1}^{4} \]
                                                                  5. metadata-evalN/A

                                                                    \[\leadsto x1 + \left(6 - \frac{\color{blue}{3}}{x1}\right) \cdot {x1}^{4} \]
                                                                  6. lower-/.f64N/A

                                                                    \[\leadsto x1 + \left(6 - \color{blue}{\frac{3}{x1}}\right) \cdot {x1}^{4} \]
                                                                  7. lower-pow.f6493.0

                                                                    \[\leadsto x1 + \left(6 - \frac{3}{x1}\right) \cdot \color{blue}{{x1}^{4}} \]
                                                                5. Applied rewrites93.0%

                                                                  \[\leadsto x1 + \color{blue}{\left(6 - \frac{3}{x1}\right) \cdot {x1}^{4}} \]
                                                                6. Step-by-step derivation
                                                                  1. Applied rewrites93.0%

                                                                    \[\leadsto x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{\left(x1 \cdot x1\right)} \]

                                                                  if -72 < x1 < 1e10

                                                                  1. Initial program 98.6%

                                                                    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in x1 around 0

                                                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                  4. Step-by-step derivation
                                                                    1. lower-*.f6452.0

                                                                      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                  5. Applied rewrites52.0%

                                                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                  6. Taylor expanded in x1 around 0

                                                                    \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                  7. Step-by-step derivation
                                                                    1. +-commutativeN/A

                                                                      \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                    2. *-commutativeN/A

                                                                      \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                    3. lower-fma.f64N/A

                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                    4. sub-negN/A

                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                    5. *-commutativeN/A

                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                    6. metadata-evalN/A

                                                                      \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                    7. lower-fma.f64N/A

                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                    8. *-commutativeN/A

                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                    9. lower-*.f64N/A

                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                    10. sub-negN/A

                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                    11. metadata-evalN/A

                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                    12. lower-fma.f64N/A

                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                    13. lower-*.f6490.0

                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                  8. Applied rewrites90.0%

                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                  9. Taylor expanded in x2 around 0

                                                                    \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                                  10. Step-by-step derivation
                                                                    1. Applied rewrites25.8%

                                                                      \[\leadsto -x1 \]
                                                                    2. Taylor expanded in x2 around 0

                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites97.9%

                                                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), \color{blue}{x2}, -x1\right) \]
                                                                    4. Recombined 2 regimes into one program.
                                                                    5. Final simplification95.8%

                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -72 \lor \neg \left(x1 \leq 10000000000\right):\\ \;\;\;\;x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot x1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \]
                                                                    6. Add Preprocessing

                                                                    Alternative 13: 93.0% accurate, 6.0× speedup?

                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -72:\\ \;\;\;\;x1 + \left(\mathsf{fma}\left(6, x1, -3\right) \cdot x1\right) \cdot \left(x1 \cdot x1\right)\\ \mathbf{elif}\;x1 \leq 10000000000:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(\left(\left(6 - \frac{3}{x1}\right) \cdot x1\right) \cdot x1\right) \cdot x1\right) \cdot x1\\ \end{array} \end{array} \]
                                                                    (FPCore (x1 x2)
                                                                     :precision binary64
                                                                     (if (<= x1 -72.0)
                                                                       (+ x1 (* (* (fma 6.0 x1 -3.0) x1) (* x1 x1)))
                                                                       (if (<= x1 10000000000.0)
                                                                         (fma (fma (fma 8.0 x2 -12.0) x1 -6.0) x2 (- x1))
                                                                         (+ x1 (* (* (* (* (- 6.0 (/ 3.0 x1)) x1) x1) x1) x1)))))
                                                                    double code(double x1, double x2) {
                                                                    	double tmp;
                                                                    	if (x1 <= -72.0) {
                                                                    		tmp = x1 + ((fma(6.0, x1, -3.0) * x1) * (x1 * x1));
                                                                    	} else if (x1 <= 10000000000.0) {
                                                                    		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, -x1);
                                                                    	} else {
                                                                    		tmp = x1 + (((((6.0 - (3.0 / x1)) * x1) * x1) * x1) * x1);
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    function code(x1, x2)
                                                                    	tmp = 0.0
                                                                    	if (x1 <= -72.0)
                                                                    		tmp = Float64(x1 + Float64(Float64(fma(6.0, x1, -3.0) * x1) * Float64(x1 * x1)));
                                                                    	elseif (x1 <= 10000000000.0)
                                                                    		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, Float64(-x1));
                                                                    	else
                                                                    		tmp = Float64(x1 + Float64(Float64(Float64(Float64(Float64(6.0 - Float64(3.0 / x1)) * x1) * x1) * x1) * x1));
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    code[x1_, x2_] := If[LessEqual[x1, -72.0], N[(x1 + N[(N[(N[(6.0 * x1 + -3.0), $MachinePrecision] * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 10000000000.0], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision], N[(x1 + N[(N[(N[(N[(N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] * x1), $MachinePrecision] * x1), $MachinePrecision] * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision]]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    \mathbf{if}\;x1 \leq -72:\\
                                                                    \;\;\;\;x1 + \left(\mathsf{fma}\left(6, x1, -3\right) \cdot x1\right) \cdot \left(x1 \cdot x1\right)\\
                                                                    
                                                                    \mathbf{elif}\;x1 \leq 10000000000:\\
                                                                    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;x1 + \left(\left(\left(\left(6 - \frac{3}{x1}\right) \cdot x1\right) \cdot x1\right) \cdot x1\right) \cdot x1\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 3 regimes
                                                                    2. if x1 < -72

                                                                      1. Initial program 33.7%

                                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in x1 around inf

                                                                        \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{x1}\right)} \]
                                                                      4. Step-by-step derivation
                                                                        1. *-commutativeN/A

                                                                          \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                                        2. lower-*.f64N/A

                                                                          \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                                        3. lower--.f64N/A

                                                                          \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right)} \cdot {x1}^{4} \]
                                                                        4. associate-*r/N/A

                                                                          \[\leadsto x1 + \left(6 - \color{blue}{\frac{3 \cdot 1}{x1}}\right) \cdot {x1}^{4} \]
                                                                        5. metadata-evalN/A

                                                                          \[\leadsto x1 + \left(6 - \frac{\color{blue}{3}}{x1}\right) \cdot {x1}^{4} \]
                                                                        6. lower-/.f64N/A

                                                                          \[\leadsto x1 + \left(6 - \color{blue}{\frac{3}{x1}}\right) \cdot {x1}^{4} \]
                                                                        7. lower-pow.f6494.4

                                                                          \[\leadsto x1 + \left(6 - \frac{3}{x1}\right) \cdot \color{blue}{{x1}^{4}} \]
                                                                      5. Applied rewrites94.4%

                                                                        \[\leadsto x1 + \color{blue}{\left(6 - \frac{3}{x1}\right) \cdot {x1}^{4}} \]
                                                                      6. Step-by-step derivation
                                                                        1. Applied rewrites94.4%

                                                                          \[\leadsto x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{\left(x1 \cdot x1\right)} \]
                                                                        2. Taylor expanded in x1 around 0

                                                                          \[\leadsto x1 + \left(x1 \cdot \left(6 \cdot x1 - 3\right)\right) \cdot \left(\color{blue}{x1} \cdot x1\right) \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites94.4%

                                                                            \[\leadsto x1 + \left(\mathsf{fma}\left(6, x1, -3\right) \cdot x1\right) \cdot \left(\color{blue}{x1} \cdot x1\right) \]

                                                                          if -72 < x1 < 1e10

                                                                          1. Initial program 98.6%

                                                                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                          2. Add Preprocessing
                                                                          3. Taylor expanded in x1 around 0

                                                                            \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                          4. Step-by-step derivation
                                                                            1. lower-*.f6452.0

                                                                              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                          5. Applied rewrites52.0%

                                                                            \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                          6. Taylor expanded in x1 around 0

                                                                            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                          7. Step-by-step derivation
                                                                            1. +-commutativeN/A

                                                                              \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                            2. *-commutativeN/A

                                                                              \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                            3. lower-fma.f64N/A

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                            4. sub-negN/A

                                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                            5. *-commutativeN/A

                                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                            6. metadata-evalN/A

                                                                              \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                            7. lower-fma.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                            8. *-commutativeN/A

                                                                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                            9. lower-*.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                            10. sub-negN/A

                                                                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                            11. metadata-evalN/A

                                                                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                            12. lower-fma.f64N/A

                                                                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                            13. lower-*.f6490.0

                                                                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                          8. Applied rewrites90.0%

                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                          9. Taylor expanded in x2 around 0

                                                                            \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                                          10. Step-by-step derivation
                                                                            1. Applied rewrites25.8%

                                                                              \[\leadsto -x1 \]
                                                                            2. Taylor expanded in x2 around 0

                                                                              \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites97.9%

                                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), \color{blue}{x2}, -x1\right) \]

                                                                              if 1e10 < x1

                                                                              1. Initial program 54.5%

                                                                                \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                              2. Add Preprocessing
                                                                              3. Taylor expanded in x1 around inf

                                                                                \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{x1}\right)} \]
                                                                              4. Step-by-step derivation
                                                                                1. *-commutativeN/A

                                                                                  \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                                                2. lower-*.f64N/A

                                                                                  \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                                                3. lower--.f64N/A

                                                                                  \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right)} \cdot {x1}^{4} \]
                                                                                4. associate-*r/N/A

                                                                                  \[\leadsto x1 + \left(6 - \color{blue}{\frac{3 \cdot 1}{x1}}\right) \cdot {x1}^{4} \]
                                                                                5. metadata-evalN/A

                                                                                  \[\leadsto x1 + \left(6 - \frac{\color{blue}{3}}{x1}\right) \cdot {x1}^{4} \]
                                                                                6. lower-/.f64N/A

                                                                                  \[\leadsto x1 + \left(6 - \color{blue}{\frac{3}{x1}}\right) \cdot {x1}^{4} \]
                                                                                7. lower-pow.f6491.6

                                                                                  \[\leadsto x1 + \left(6 - \frac{3}{x1}\right) \cdot \color{blue}{{x1}^{4}} \]
                                                                              5. Applied rewrites91.6%

                                                                                \[\leadsto x1 + \color{blue}{\left(6 - \frac{3}{x1}\right) \cdot {x1}^{4}} \]
                                                                              6. Step-by-step derivation
                                                                                1. Applied rewrites91.5%

                                                                                  \[\leadsto x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{\left(x1 \cdot x1\right)} \]
                                                                                2. Step-by-step derivation
                                                                                  1. Applied rewrites91.5%

                                                                                    \[\leadsto x1 + \left(\left(\left(\left(6 - \frac{3}{x1}\right) \cdot x1\right) \cdot x1\right) \cdot x1\right) \cdot \color{blue}{x1} \]
                                                                                3. Recombined 3 regimes into one program.
                                                                                4. Add Preprocessing

                                                                                Alternative 14: 74.3% accurate, 7.6× speedup?

                                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -1.6 \cdot 10^{+150}:\\ \;\;\;\;\frac{\left(-x1\right) \cdot x1}{x1}\\ \mathbf{elif}\;x1 \leq -2.2 \cdot 10^{+52} \lor \neg \left(x1 \leq 9800000000\right):\\ \;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 8\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \end{array} \]
                                                                                (FPCore (x1 x2)
                                                                                 :precision binary64
                                                                                 (if (<= x1 -1.6e+150)
                                                                                   (/ (* (- x1) x1) x1)
                                                                                   (if (or (<= x1 -2.2e+52) (not (<= x1 9800000000.0)))
                                                                                     (+ x1 (* (* (* x1 x1) x2) 8.0))
                                                                                     (fma (fma (fma 8.0 x2 -12.0) x1 -6.0) x2 (- x1)))))
                                                                                double code(double x1, double x2) {
                                                                                	double tmp;
                                                                                	if (x1 <= -1.6e+150) {
                                                                                		tmp = (-x1 * x1) / x1;
                                                                                	} else if ((x1 <= -2.2e+52) || !(x1 <= 9800000000.0)) {
                                                                                		tmp = x1 + (((x1 * x1) * x2) * 8.0);
                                                                                	} else {
                                                                                		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, -x1);
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                function code(x1, x2)
                                                                                	tmp = 0.0
                                                                                	if (x1 <= -1.6e+150)
                                                                                		tmp = Float64(Float64(Float64(-x1) * x1) / x1);
                                                                                	elseif ((x1 <= -2.2e+52) || !(x1 <= 9800000000.0))
                                                                                		tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * x2) * 8.0));
                                                                                	else
                                                                                		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, Float64(-x1));
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                code[x1_, x2_] := If[LessEqual[x1, -1.6e+150], N[(N[((-x1) * x1), $MachinePrecision] / x1), $MachinePrecision], If[Or[LessEqual[x1, -2.2e+52], N[Not[LessEqual[x1, 9800000000.0]], $MachinePrecision]], N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                \begin{array}{l}
                                                                                \mathbf{if}\;x1 \leq -1.6 \cdot 10^{+150}:\\
                                                                                \;\;\;\;\frac{\left(-x1\right) \cdot x1}{x1}\\
                                                                                
                                                                                \mathbf{elif}\;x1 \leq -2.2 \cdot 10^{+52} \lor \neg \left(x1 \leq 9800000000\right):\\
                                                                                \;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 8\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 3 regimes
                                                                                2. if x1 < -1.60000000000000008e150

                                                                                  1. Initial program 0.0%

                                                                                    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                  2. Add Preprocessing
                                                                                  3. Taylor expanded in x1 around 0

                                                                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. lower-*.f640.5

                                                                                      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                  5. Applied rewrites0.5%

                                                                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                  6. Taylor expanded in x1 around 0

                                                                                    \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                  7. Step-by-step derivation
                                                                                    1. +-commutativeN/A

                                                                                      \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                                    2. *-commutativeN/A

                                                                                      \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                                    3. lower-fma.f64N/A

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                                    4. sub-negN/A

                                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                                    5. *-commutativeN/A

                                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                                    6. metadata-evalN/A

                                                                                      \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                                    7. lower-fma.f64N/A

                                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                                    8. *-commutativeN/A

                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                    9. lower-*.f64N/A

                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                    10. sub-negN/A

                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                    11. metadata-evalN/A

                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                    12. lower-fma.f64N/A

                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                    13. lower-*.f644.0

                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                                  8. Applied rewrites4.0%

                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                                  9. Taylor expanded in x2 around 0

                                                                                    \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                                                  10. Step-by-step derivation
                                                                                    1. Applied rewrites7.0%

                                                                                      \[\leadsto -x1 \]
                                                                                    2. Step-by-step derivation
                                                                                      1. Applied rewrites96.5%

                                                                                        \[\leadsto \frac{\left(-x1\right) \cdot x1}{0 + \color{blue}{x1}} \]

                                                                                      if -1.60000000000000008e150 < x1 < -2.2e52 or 9.8e9 < x1

                                                                                      1. Initial program 53.7%

                                                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                      2. Add Preprocessing
                                                                                      3. Taylor expanded in x1 around -inf

                                                                                        \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right)} \]
                                                                                      4. Step-by-step derivation
                                                                                        1. *-commutativeN/A

                                                                                          \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                                                        2. lower-*.f64N/A

                                                                                          \[\leadsto x1 + \color{blue}{\left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                                                      5. Applied rewrites99.7%

                                                                                        \[\leadsto x1 + \color{blue}{\left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}} \]
                                                                                      6. Taylor expanded in x2 around inf

                                                                                        \[\leadsto x1 + 8 \cdot \color{blue}{\left({x1}^{2} \cdot x2\right)} \]
                                                                                      7. Step-by-step derivation
                                                                                        1. Applied rewrites29.3%

                                                                                          \[\leadsto x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot \color{blue}{8} \]

                                                                                        if -2.2e52 < x1 < 9.8e9

                                                                                        1. Initial program 99.3%

                                                                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                        2. Add Preprocessing
                                                                                        3. Taylor expanded in x1 around 0

                                                                                          \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. lower-*.f6450.0

                                                                                            \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                        5. Applied rewrites50.0%

                                                                                          \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                        6. Taylor expanded in x1 around 0

                                                                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                        7. Step-by-step derivation
                                                                                          1. +-commutativeN/A

                                                                                            \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                                          2. *-commutativeN/A

                                                                                            \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                                          3. lower-fma.f64N/A

                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                                          4. sub-negN/A

                                                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                                          5. *-commutativeN/A

                                                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                                          6. metadata-evalN/A

                                                                                            \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                                          7. lower-fma.f64N/A

                                                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                                          8. *-commutativeN/A

                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                          9. lower-*.f64N/A

                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                          10. sub-negN/A

                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                          11. metadata-evalN/A

                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                          12. lower-fma.f64N/A

                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                          13. lower-*.f6487.5

                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                                        8. Applied rewrites87.5%

                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                                        9. Taylor expanded in x2 around 0

                                                                                          \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                                                        10. Step-by-step derivation
                                                                                          1. Applied rewrites25.1%

                                                                                            \[\leadsto -x1 \]
                                                                                          2. Taylor expanded in x2 around 0

                                                                                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                          3. Step-by-step derivation
                                                                                            1. Applied rewrites94.4%

                                                                                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), \color{blue}{x2}, -x1\right) \]
                                                                                          4. Recombined 3 regimes into one program.
                                                                                          5. Final simplification75.3%

                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.6 \cdot 10^{+150}:\\ \;\;\;\;\frac{\left(-x1\right) \cdot x1}{x1}\\ \mathbf{elif}\;x1 \leq -2.2 \cdot 10^{+52} \lor \neg \left(x1 \leq 9800000000\right):\\ \;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 8\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \]
                                                                                          6. Add Preprocessing

                                                                                          Alternative 15: 93.0% accurate, 8.0× speedup?

                                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -72 \lor \neg \left(x1 \leq 10000000000\right):\\ \;\;\;\;x1 + \left(\mathsf{fma}\left(6, x1, -3\right) \cdot x1\right) \cdot \left(x1 \cdot x1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \end{array} \]
                                                                                          (FPCore (x1 x2)
                                                                                           :precision binary64
                                                                                           (if (or (<= x1 -72.0) (not (<= x1 10000000000.0)))
                                                                                             (+ x1 (* (* (fma 6.0 x1 -3.0) x1) (* x1 x1)))
                                                                                             (fma (fma (fma 8.0 x2 -12.0) x1 -6.0) x2 (- x1))))
                                                                                          double code(double x1, double x2) {
                                                                                          	double tmp;
                                                                                          	if ((x1 <= -72.0) || !(x1 <= 10000000000.0)) {
                                                                                          		tmp = x1 + ((fma(6.0, x1, -3.0) * x1) * (x1 * x1));
                                                                                          	} else {
                                                                                          		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, -x1);
                                                                                          	}
                                                                                          	return tmp;
                                                                                          }
                                                                                          
                                                                                          function code(x1, x2)
                                                                                          	tmp = 0.0
                                                                                          	if ((x1 <= -72.0) || !(x1 <= 10000000000.0))
                                                                                          		tmp = Float64(x1 + Float64(Float64(fma(6.0, x1, -3.0) * x1) * Float64(x1 * x1)));
                                                                                          	else
                                                                                          		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, Float64(-x1));
                                                                                          	end
                                                                                          	return tmp
                                                                                          end
                                                                                          
                                                                                          code[x1_, x2_] := If[Or[LessEqual[x1, -72.0], N[Not[LessEqual[x1, 10000000000.0]], $MachinePrecision]], N[(x1 + N[(N[(N[(6.0 * x1 + -3.0), $MachinePrecision] * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision]]
                                                                                          
                                                                                          \begin{array}{l}
                                                                                          
                                                                                          \\
                                                                                          \begin{array}{l}
                                                                                          \mathbf{if}\;x1 \leq -72 \lor \neg \left(x1 \leq 10000000000\right):\\
                                                                                          \;\;\;\;x1 + \left(\mathsf{fma}\left(6, x1, -3\right) \cdot x1\right) \cdot \left(x1 \cdot x1\right)\\
                                                                                          
                                                                                          \mathbf{else}:\\
                                                                                          \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\
                                                                                          
                                                                                          
                                                                                          \end{array}
                                                                                          \end{array}
                                                                                          
                                                                                          Derivation
                                                                                          1. Split input into 2 regimes
                                                                                          2. if x1 < -72 or 1e10 < x1

                                                                                            1. Initial program 43.8%

                                                                                              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                            2. Add Preprocessing
                                                                                            3. Taylor expanded in x1 around inf

                                                                                              \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{x1}\right)} \]
                                                                                            4. Step-by-step derivation
                                                                                              1. *-commutativeN/A

                                                                                                \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                                                              2. lower-*.f64N/A

                                                                                                \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                                                              3. lower--.f64N/A

                                                                                                \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right)} \cdot {x1}^{4} \]
                                                                                              4. associate-*r/N/A

                                                                                                \[\leadsto x1 + \left(6 - \color{blue}{\frac{3 \cdot 1}{x1}}\right) \cdot {x1}^{4} \]
                                                                                              5. metadata-evalN/A

                                                                                                \[\leadsto x1 + \left(6 - \frac{\color{blue}{3}}{x1}\right) \cdot {x1}^{4} \]
                                                                                              6. lower-/.f64N/A

                                                                                                \[\leadsto x1 + \left(6 - \color{blue}{\frac{3}{x1}}\right) \cdot {x1}^{4} \]
                                                                                              7. lower-pow.f6493.0

                                                                                                \[\leadsto x1 + \left(6 - \frac{3}{x1}\right) \cdot \color{blue}{{x1}^{4}} \]
                                                                                            5. Applied rewrites93.0%

                                                                                              \[\leadsto x1 + \color{blue}{\left(6 - \frac{3}{x1}\right) \cdot {x1}^{4}} \]
                                                                                            6. Step-by-step derivation
                                                                                              1. Applied rewrites93.0%

                                                                                                \[\leadsto x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{\left(x1 \cdot x1\right)} \]
                                                                                              2. Taylor expanded in x1 around 0

                                                                                                \[\leadsto x1 + \left(x1 \cdot \left(6 \cdot x1 - 3\right)\right) \cdot \left(\color{blue}{x1} \cdot x1\right) \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites93.0%

                                                                                                  \[\leadsto x1 + \left(\mathsf{fma}\left(6, x1, -3\right) \cdot x1\right) \cdot \left(\color{blue}{x1} \cdot x1\right) \]

                                                                                                if -72 < x1 < 1e10

                                                                                                1. Initial program 98.6%

                                                                                                  \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                2. Add Preprocessing
                                                                                                3. Taylor expanded in x1 around 0

                                                                                                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. lower-*.f6452.0

                                                                                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                5. Applied rewrites52.0%

                                                                                                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                6. Taylor expanded in x1 around 0

                                                                                                  \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                7. Step-by-step derivation
                                                                                                  1. +-commutativeN/A

                                                                                                    \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                                                  2. *-commutativeN/A

                                                                                                    \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                                                  3. lower-fma.f64N/A

                                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                                                  4. sub-negN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                                                  5. *-commutativeN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                                                  6. metadata-evalN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                                                  7. lower-fma.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                                                  8. *-commutativeN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                  9. lower-*.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                  10. sub-negN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                  11. metadata-evalN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                  12. lower-fma.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                  13. lower-*.f6490.0

                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                                                8. Applied rewrites90.0%

                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                                                9. Taylor expanded in x2 around 0

                                                                                                  \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                                                                10. Step-by-step derivation
                                                                                                  1. Applied rewrites25.8%

                                                                                                    \[\leadsto -x1 \]
                                                                                                  2. Taylor expanded in x2 around 0

                                                                                                    \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                  3. Step-by-step derivation
                                                                                                    1. Applied rewrites97.9%

                                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), \color{blue}{x2}, -x1\right) \]
                                                                                                  4. Recombined 2 regimes into one program.
                                                                                                  5. Final simplification95.8%

                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -72 \lor \neg \left(x1 \leq 10000000000\right):\\ \;\;\;\;x1 + \left(\mathsf{fma}\left(6, x1, -3\right) \cdot x1\right) \cdot \left(x1 \cdot x1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \]
                                                                                                  6. Add Preprocessing

                                                                                                  Alternative 16: 92.9% accurate, 8.3× speedup?

                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -80 \lor \neg \left(x1 \leq 13000000000\right):\\ \;\;\;\;x1 + \left(\left(6 \cdot x1\right) \cdot x1\right) \cdot \left(x1 \cdot x1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \end{array} \]
                                                                                                  (FPCore (x1 x2)
                                                                                                   :precision binary64
                                                                                                   (if (or (<= x1 -80.0) (not (<= x1 13000000000.0)))
                                                                                                     (+ x1 (* (* (* 6.0 x1) x1) (* x1 x1)))
                                                                                                     (fma (fma (fma 8.0 x2 -12.0) x1 -6.0) x2 (- x1))))
                                                                                                  double code(double x1, double x2) {
                                                                                                  	double tmp;
                                                                                                  	if ((x1 <= -80.0) || !(x1 <= 13000000000.0)) {
                                                                                                  		tmp = x1 + (((6.0 * x1) * x1) * (x1 * x1));
                                                                                                  	} else {
                                                                                                  		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, -x1);
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  function code(x1, x2)
                                                                                                  	tmp = 0.0
                                                                                                  	if ((x1 <= -80.0) || !(x1 <= 13000000000.0))
                                                                                                  		tmp = Float64(x1 + Float64(Float64(Float64(6.0 * x1) * x1) * Float64(x1 * x1)));
                                                                                                  	else
                                                                                                  		tmp = fma(fma(fma(8.0, x2, -12.0), x1, -6.0), x2, Float64(-x1));
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  code[x1_, x2_] := If[Or[LessEqual[x1, -80.0], N[Not[LessEqual[x1, 13000000000.0]], $MachinePrecision]], N[(x1 + N[(N[(N[(6.0 * x1), $MachinePrecision] * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(8.0 * x2 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision]]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  
                                                                                                  \\
                                                                                                  \begin{array}{l}
                                                                                                  \mathbf{if}\;x1 \leq -80 \lor \neg \left(x1 \leq 13000000000\right):\\
                                                                                                  \;\;\;\;x1 + \left(\left(6 \cdot x1\right) \cdot x1\right) \cdot \left(x1 \cdot x1\right)\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 2 regimes
                                                                                                  2. if x1 < -80 or 1.3e10 < x1

                                                                                                    1. Initial program 43.8%

                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                    2. Add Preprocessing
                                                                                                    3. Taylor expanded in x1 around inf

                                                                                                      \[\leadsto x1 + \color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{x1}\right)} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. *-commutativeN/A

                                                                                                        \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                                                                      2. lower-*.f64N/A

                                                                                                        \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right) \cdot {x1}^{4}} \]
                                                                                                      3. lower--.f64N/A

                                                                                                        \[\leadsto x1 + \color{blue}{\left(6 - 3 \cdot \frac{1}{x1}\right)} \cdot {x1}^{4} \]
                                                                                                      4. associate-*r/N/A

                                                                                                        \[\leadsto x1 + \left(6 - \color{blue}{\frac{3 \cdot 1}{x1}}\right) \cdot {x1}^{4} \]
                                                                                                      5. metadata-evalN/A

                                                                                                        \[\leadsto x1 + \left(6 - \frac{\color{blue}{3}}{x1}\right) \cdot {x1}^{4} \]
                                                                                                      6. lower-/.f64N/A

                                                                                                        \[\leadsto x1 + \left(6 - \color{blue}{\frac{3}{x1}}\right) \cdot {x1}^{4} \]
                                                                                                      7. lower-pow.f6493.0

                                                                                                        \[\leadsto x1 + \left(6 - \frac{3}{x1}\right) \cdot \color{blue}{{x1}^{4}} \]
                                                                                                    5. Applied rewrites93.0%

                                                                                                      \[\leadsto x1 + \color{blue}{\left(6 - \frac{3}{x1}\right) \cdot {x1}^{4}} \]
                                                                                                    6. Step-by-step derivation
                                                                                                      1. Applied rewrites93.0%

                                                                                                        \[\leadsto x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{\left(x1 \cdot x1\right)} \]
                                                                                                      2. Taylor expanded in x1 around inf

                                                                                                        \[\leadsto x1 + \left(6 \cdot {x1}^{2}\right) \cdot \left(\color{blue}{x1} \cdot x1\right) \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites92.3%

                                                                                                          \[\leadsto x1 + \left(\left(6 \cdot x1\right) \cdot x1\right) \cdot \left(\color{blue}{x1} \cdot x1\right) \]

                                                                                                        if -80 < x1 < 1.3e10

                                                                                                        1. Initial program 98.6%

                                                                                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                        2. Add Preprocessing
                                                                                                        3. Taylor expanded in x1 around 0

                                                                                                          \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                        4. Step-by-step derivation
                                                                                                          1. lower-*.f6452.0

                                                                                                            \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                        5. Applied rewrites52.0%

                                                                                                          \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                        6. Taylor expanded in x1 around 0

                                                                                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                        7. Step-by-step derivation
                                                                                                          1. +-commutativeN/A

                                                                                                            \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                                                          2. *-commutativeN/A

                                                                                                            \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                                                          3. lower-fma.f64N/A

                                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                                                          4. sub-negN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                                                          5. *-commutativeN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                                                          6. metadata-evalN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                                                          7. lower-fma.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                                                          8. *-commutativeN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                          9. lower-*.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                          10. sub-negN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                          11. metadata-evalN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                          12. lower-fma.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                          13. lower-*.f6490.0

                                                                                                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                                                        8. Applied rewrites90.0%

                                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                                                        9. Taylor expanded in x2 around 0

                                                                                                          \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                                                                        10. Step-by-step derivation
                                                                                                          1. Applied rewrites25.8%

                                                                                                            \[\leadsto -x1 \]
                                                                                                          2. Taylor expanded in x2 around 0

                                                                                                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. Applied rewrites97.9%

                                                                                                              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), \color{blue}{x2}, -x1\right) \]
                                                                                                          4. Recombined 2 regimes into one program.
                                                                                                          5. Final simplification95.5%

                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -80 \lor \neg \left(x1 \leq 13000000000\right):\\ \;\;\;\;x1 + \left(\left(6 \cdot x1\right) \cdot x1\right) \cdot \left(x1 \cdot x1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(8, x2, -12\right), x1, -6\right), x2, -x1\right)\\ \end{array} \]
                                                                                                          6. Add Preprocessing

                                                                                                          Alternative 17: 32.3% accurate, 9.6× speedup?

                                                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-166}:\\ \;\;\;\;-6 \cdot x2\\ \mathbf{elif}\;2 \cdot x2 \leq 10^{-112}:\\ \;\;\;\;-x1\\ \mathbf{else}:\\ \;\;\;\;x1 + -6 \cdot x2\\ \end{array} \end{array} \]
                                                                                                          (FPCore (x1 x2)
                                                                                                           :precision binary64
                                                                                                           (if (<= (* 2.0 x2) -5e-166)
                                                                                                             (* -6.0 x2)
                                                                                                             (if (<= (* 2.0 x2) 1e-112) (- x1) (+ x1 (* -6.0 x2)))))
                                                                                                          double code(double x1, double x2) {
                                                                                                          	double tmp;
                                                                                                          	if ((2.0 * x2) <= -5e-166) {
                                                                                                          		tmp = -6.0 * x2;
                                                                                                          	} else if ((2.0 * x2) <= 1e-112) {
                                                                                                          		tmp = -x1;
                                                                                                          	} else {
                                                                                                          		tmp = x1 + (-6.0 * x2);
                                                                                                          	}
                                                                                                          	return tmp;
                                                                                                          }
                                                                                                          
                                                                                                          real(8) function code(x1, x2)
                                                                                                              real(8), intent (in) :: x1
                                                                                                              real(8), intent (in) :: x2
                                                                                                              real(8) :: tmp
                                                                                                              if ((2.0d0 * x2) <= (-5d-166)) then
                                                                                                                  tmp = (-6.0d0) * x2
                                                                                                              else if ((2.0d0 * x2) <= 1d-112) then
                                                                                                                  tmp = -x1
                                                                                                              else
                                                                                                                  tmp = x1 + ((-6.0d0) * x2)
                                                                                                              end if
                                                                                                              code = tmp
                                                                                                          end function
                                                                                                          
                                                                                                          public static double code(double x1, double x2) {
                                                                                                          	double tmp;
                                                                                                          	if ((2.0 * x2) <= -5e-166) {
                                                                                                          		tmp = -6.0 * x2;
                                                                                                          	} else if ((2.0 * x2) <= 1e-112) {
                                                                                                          		tmp = -x1;
                                                                                                          	} else {
                                                                                                          		tmp = x1 + (-6.0 * x2);
                                                                                                          	}
                                                                                                          	return tmp;
                                                                                                          }
                                                                                                          
                                                                                                          def code(x1, x2):
                                                                                                          	tmp = 0
                                                                                                          	if (2.0 * x2) <= -5e-166:
                                                                                                          		tmp = -6.0 * x2
                                                                                                          	elif (2.0 * x2) <= 1e-112:
                                                                                                          		tmp = -x1
                                                                                                          	else:
                                                                                                          		tmp = x1 + (-6.0 * x2)
                                                                                                          	return tmp
                                                                                                          
                                                                                                          function code(x1, x2)
                                                                                                          	tmp = 0.0
                                                                                                          	if (Float64(2.0 * x2) <= -5e-166)
                                                                                                          		tmp = Float64(-6.0 * x2);
                                                                                                          	elseif (Float64(2.0 * x2) <= 1e-112)
                                                                                                          		tmp = Float64(-x1);
                                                                                                          	else
                                                                                                          		tmp = Float64(x1 + Float64(-6.0 * x2));
                                                                                                          	end
                                                                                                          	return tmp
                                                                                                          end
                                                                                                          
                                                                                                          function tmp_2 = code(x1, x2)
                                                                                                          	tmp = 0.0;
                                                                                                          	if ((2.0 * x2) <= -5e-166)
                                                                                                          		tmp = -6.0 * x2;
                                                                                                          	elseif ((2.0 * x2) <= 1e-112)
                                                                                                          		tmp = -x1;
                                                                                                          	else
                                                                                                          		tmp = x1 + (-6.0 * x2);
                                                                                                          	end
                                                                                                          	tmp_2 = tmp;
                                                                                                          end
                                                                                                          
                                                                                                          code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -5e-166], N[(-6.0 * x2), $MachinePrecision], If[LessEqual[N[(2.0 * x2), $MachinePrecision], 1e-112], (-x1), N[(x1 + N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision]]]
                                                                                                          
                                                                                                          \begin{array}{l}
                                                                                                          
                                                                                                          \\
                                                                                                          \begin{array}{l}
                                                                                                          \mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-166}:\\
                                                                                                          \;\;\;\;-6 \cdot x2\\
                                                                                                          
                                                                                                          \mathbf{elif}\;2 \cdot x2 \leq 10^{-112}:\\
                                                                                                          \;\;\;\;-x1\\
                                                                                                          
                                                                                                          \mathbf{else}:\\
                                                                                                          \;\;\;\;x1 + -6 \cdot x2\\
                                                                                                          
                                                                                                          
                                                                                                          \end{array}
                                                                                                          \end{array}
                                                                                                          
                                                                                                          Derivation
                                                                                                          1. Split input into 3 regimes
                                                                                                          2. if (*.f64 #s(literal 2 binary64) x2) < -5e-166

                                                                                                            1. Initial program 76.0%

                                                                                                              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. Applied rewrites82.2%

                                                                                                              \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x1 \cdot x1, x1, \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(4, \frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot 2\right)\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(\left(3 \cdot x1\right) \cdot x1\right)\right) + \mathsf{fma}\left(\frac{\mathsf{fma}\left(-2, x2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1\right)\right)} \]
                                                                                                            4. Applied rewrites82.2%

                                                                                                              \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \mathsf{fma}\left(\frac{x1 \cdot \left(\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1 \cdot x1\right), \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right)} \]
                                                                                                            5. Taylor expanded in x1 around 0

                                                                                                              \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                            6. Step-by-step derivation
                                                                                                              1. lower-*.f6440.1

                                                                                                                \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                            7. Applied rewrites40.1%

                                                                                                              \[\leadsto \color{blue}{-6 \cdot x2} \]

                                                                                                            if -5e-166 < (*.f64 #s(literal 2 binary64) x2) < 9.9999999999999995e-113

                                                                                                            1. Initial program 74.5%

                                                                                                              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. Taylor expanded in x1 around 0

                                                                                                              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. lower-*.f6414.4

                                                                                                                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                            5. Applied rewrites14.4%

                                                                                                              \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                            6. Taylor expanded in x1 around 0

                                                                                                              \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                            7. Step-by-step derivation
                                                                                                              1. +-commutativeN/A

                                                                                                                \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                                                              2. *-commutativeN/A

                                                                                                                \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                                                              3. lower-fma.f64N/A

                                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                                                              4. sub-negN/A

                                                                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                                                              5. *-commutativeN/A

                                                                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                                                              6. metadata-evalN/A

                                                                                                                \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                                                              7. lower-fma.f64N/A

                                                                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                                                              8. *-commutativeN/A

                                                                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                              9. lower-*.f64N/A

                                                                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                              10. sub-negN/A

                                                                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                              11. metadata-evalN/A

                                                                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                              12. lower-fma.f64N/A

                                                                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                              13. lower-*.f6455.2

                                                                                                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                                                            8. Applied rewrites55.2%

                                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                                                            9. Taylor expanded in x2 around 0

                                                                                                              \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                                                                            10. Step-by-step derivation
                                                                                                              1. Applied rewrites42.9%

                                                                                                                \[\leadsto -x1 \]

                                                                                                              if 9.9999999999999995e-113 < (*.f64 #s(literal 2 binary64) x2)

                                                                                                              1. Initial program 75.2%

                                                                                                                \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                              2. Add Preprocessing
                                                                                                              3. Taylor expanded in x1 around 0

                                                                                                                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                              4. Step-by-step derivation
                                                                                                                1. lower-*.f6435.0

                                                                                                                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                              5. Applied rewrites35.0%

                                                                                                                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                            11. Recombined 3 regimes into one program.
                                                                                                            12. Add Preprocessing

                                                                                                            Alternative 18: 32.1% accurate, 10.6× speedup?

                                                                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-166} \lor \neg \left(2 \cdot x2 \leq 10^{-112}\right):\\ \;\;\;\;-6 \cdot x2\\ \mathbf{else}:\\ \;\;\;\;-x1\\ \end{array} \end{array} \]
                                                                                                            (FPCore (x1 x2)
                                                                                                             :precision binary64
                                                                                                             (if (or (<= (* 2.0 x2) -5e-166) (not (<= (* 2.0 x2) 1e-112)))
                                                                                                               (* -6.0 x2)
                                                                                                               (- x1)))
                                                                                                            double code(double x1, double x2) {
                                                                                                            	double tmp;
                                                                                                            	if (((2.0 * x2) <= -5e-166) || !((2.0 * x2) <= 1e-112)) {
                                                                                                            		tmp = -6.0 * x2;
                                                                                                            	} else {
                                                                                                            		tmp = -x1;
                                                                                                            	}
                                                                                                            	return tmp;
                                                                                                            }
                                                                                                            
                                                                                                            real(8) function code(x1, x2)
                                                                                                                real(8), intent (in) :: x1
                                                                                                                real(8), intent (in) :: x2
                                                                                                                real(8) :: tmp
                                                                                                                if (((2.0d0 * x2) <= (-5d-166)) .or. (.not. ((2.0d0 * x2) <= 1d-112))) then
                                                                                                                    tmp = (-6.0d0) * x2
                                                                                                                else
                                                                                                                    tmp = -x1
                                                                                                                end if
                                                                                                                code = tmp
                                                                                                            end function
                                                                                                            
                                                                                                            public static double code(double x1, double x2) {
                                                                                                            	double tmp;
                                                                                                            	if (((2.0 * x2) <= -5e-166) || !((2.0 * x2) <= 1e-112)) {
                                                                                                            		tmp = -6.0 * x2;
                                                                                                            	} else {
                                                                                                            		tmp = -x1;
                                                                                                            	}
                                                                                                            	return tmp;
                                                                                                            }
                                                                                                            
                                                                                                            def code(x1, x2):
                                                                                                            	tmp = 0
                                                                                                            	if ((2.0 * x2) <= -5e-166) or not ((2.0 * x2) <= 1e-112):
                                                                                                            		tmp = -6.0 * x2
                                                                                                            	else:
                                                                                                            		tmp = -x1
                                                                                                            	return tmp
                                                                                                            
                                                                                                            function code(x1, x2)
                                                                                                            	tmp = 0.0
                                                                                                            	if ((Float64(2.0 * x2) <= -5e-166) || !(Float64(2.0 * x2) <= 1e-112))
                                                                                                            		tmp = Float64(-6.0 * x2);
                                                                                                            	else
                                                                                                            		tmp = Float64(-x1);
                                                                                                            	end
                                                                                                            	return tmp
                                                                                                            end
                                                                                                            
                                                                                                            function tmp_2 = code(x1, x2)
                                                                                                            	tmp = 0.0;
                                                                                                            	if (((2.0 * x2) <= -5e-166) || ~(((2.0 * x2) <= 1e-112)))
                                                                                                            		tmp = -6.0 * x2;
                                                                                                            	else
                                                                                                            		tmp = -x1;
                                                                                                            	end
                                                                                                            	tmp_2 = tmp;
                                                                                                            end
                                                                                                            
                                                                                                            code[x1_, x2_] := If[Or[LessEqual[N[(2.0 * x2), $MachinePrecision], -5e-166], N[Not[LessEqual[N[(2.0 * x2), $MachinePrecision], 1e-112]], $MachinePrecision]], N[(-6.0 * x2), $MachinePrecision], (-x1)]
                                                                                                            
                                                                                                            \begin{array}{l}
                                                                                                            
                                                                                                            \\
                                                                                                            \begin{array}{l}
                                                                                                            \mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-166} \lor \neg \left(2 \cdot x2 \leq 10^{-112}\right):\\
                                                                                                            \;\;\;\;-6 \cdot x2\\
                                                                                                            
                                                                                                            \mathbf{else}:\\
                                                                                                            \;\;\;\;-x1\\
                                                                                                            
                                                                                                            
                                                                                                            \end{array}
                                                                                                            \end{array}
                                                                                                            
                                                                                                            Derivation
                                                                                                            1. Split input into 2 regimes
                                                                                                            2. if (*.f64 #s(literal 2 binary64) x2) < -5e-166 or 9.9999999999999995e-113 < (*.f64 #s(literal 2 binary64) x2)

                                                                                                              1. Initial program 75.6%

                                                                                                                \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                              2. Add Preprocessing
                                                                                                              3. Applied rewrites81.1%

                                                                                                                \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x1 \cdot x1, x1, \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(4, \frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot 2\right)\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(\left(3 \cdot x1\right) \cdot x1\right)\right) + \mathsf{fma}\left(\frac{\mathsf{fma}\left(-2, x2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1\right)\right)} \]
                                                                                                              4. Applied rewrites81.2%

                                                                                                                \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \mathsf{fma}\left(\frac{x1 \cdot \left(\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1 \cdot x1\right), \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right)} \]
                                                                                                              5. Taylor expanded in x1 around 0

                                                                                                                \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                              6. Step-by-step derivation
                                                                                                                1. lower-*.f6437.6

                                                                                                                  \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                              7. Applied rewrites37.6%

                                                                                                                \[\leadsto \color{blue}{-6 \cdot x2} \]

                                                                                                              if -5e-166 < (*.f64 #s(literal 2 binary64) x2) < 9.9999999999999995e-113

                                                                                                              1. Initial program 74.5%

                                                                                                                \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                              2. Add Preprocessing
                                                                                                              3. Taylor expanded in x1 around 0

                                                                                                                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                              4. Step-by-step derivation
                                                                                                                1. lower-*.f6414.4

                                                                                                                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                              5. Applied rewrites14.4%

                                                                                                                \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                              6. Taylor expanded in x1 around 0

                                                                                                                \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                              7. Step-by-step derivation
                                                                                                                1. +-commutativeN/A

                                                                                                                  \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                                                                2. *-commutativeN/A

                                                                                                                  \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                                                                3. lower-fma.f64N/A

                                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                                                                4. sub-negN/A

                                                                                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                                                                5. *-commutativeN/A

                                                                                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                                                                6. metadata-evalN/A

                                                                                                                  \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                                                                7. lower-fma.f64N/A

                                                                                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                                                                8. *-commutativeN/A

                                                                                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                9. lower-*.f64N/A

                                                                                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                10. sub-negN/A

                                                                                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                11. metadata-evalN/A

                                                                                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                12. lower-fma.f64N/A

                                                                                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                13. lower-*.f6455.2

                                                                                                                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                                                              8. Applied rewrites55.2%

                                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                                                              9. Taylor expanded in x2 around 0

                                                                                                                \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                                                                              10. Step-by-step derivation
                                                                                                                1. Applied rewrites42.9%

                                                                                                                  \[\leadsto -x1 \]
                                                                                                              11. Recombined 2 regimes into one program.
                                                                                                              12. Final simplification39.1%

                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-166} \lor \neg \left(2 \cdot x2 \leq 10^{-112}\right):\\ \;\;\;\;-6 \cdot x2\\ \mathbf{else}:\\ \;\;\;\;-x1\\ \end{array} \]
                                                                                                              13. Add Preprocessing

                                                                                                              Alternative 19: 35.9% accurate, 12.4× speedup?

                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -1.12 \cdot 10^{-142} \lor \neg \left(x1 \leq 7 \cdot 10^{-75}\right):\\ \;\;\;\;\mathsf{fma}\left(-12, x2, -1\right) \cdot x1\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot x2\\ \end{array} \end{array} \]
                                                                                                              (FPCore (x1 x2)
                                                                                                               :precision binary64
                                                                                                               (if (or (<= x1 -1.12e-142) (not (<= x1 7e-75)))
                                                                                                                 (* (fma -12.0 x2 -1.0) x1)
                                                                                                                 (* -6.0 x2)))
                                                                                                              double code(double x1, double x2) {
                                                                                                              	double tmp;
                                                                                                              	if ((x1 <= -1.12e-142) || !(x1 <= 7e-75)) {
                                                                                                              		tmp = fma(-12.0, x2, -1.0) * x1;
                                                                                                              	} else {
                                                                                                              		tmp = -6.0 * x2;
                                                                                                              	}
                                                                                                              	return tmp;
                                                                                                              }
                                                                                                              
                                                                                                              function code(x1, x2)
                                                                                                              	tmp = 0.0
                                                                                                              	if ((x1 <= -1.12e-142) || !(x1 <= 7e-75))
                                                                                                              		tmp = Float64(fma(-12.0, x2, -1.0) * x1);
                                                                                                              	else
                                                                                                              		tmp = Float64(-6.0 * x2);
                                                                                                              	end
                                                                                                              	return tmp
                                                                                                              end
                                                                                                              
                                                                                                              code[x1_, x2_] := If[Or[LessEqual[x1, -1.12e-142], N[Not[LessEqual[x1, 7e-75]], $MachinePrecision]], N[(N[(-12.0 * x2 + -1.0), $MachinePrecision] * x1), $MachinePrecision], N[(-6.0 * x2), $MachinePrecision]]
                                                                                                              
                                                                                                              \begin{array}{l}
                                                                                                              
                                                                                                              \\
                                                                                                              \begin{array}{l}
                                                                                                              \mathbf{if}\;x1 \leq -1.12 \cdot 10^{-142} \lor \neg \left(x1 \leq 7 \cdot 10^{-75}\right):\\
                                                                                                              \;\;\;\;\mathsf{fma}\left(-12, x2, -1\right) \cdot x1\\
                                                                                                              
                                                                                                              \mathbf{else}:\\
                                                                                                              \;\;\;\;-6 \cdot x2\\
                                                                                                              
                                                                                                              
                                                                                                              \end{array}
                                                                                                              \end{array}
                                                                                                              
                                                                                                              Derivation
                                                                                                              1. Split input into 2 regimes
                                                                                                              2. if x1 < -1.1199999999999999e-142 or 6.9999999999999997e-75 < x1

                                                                                                                1. Initial program 60.5%

                                                                                                                  \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                2. Add Preprocessing
                                                                                                                3. Taylor expanded in x1 around 0

                                                                                                                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. lower-*.f646.8

                                                                                                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                                5. Applied rewrites6.8%

                                                                                                                  \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                                6. Taylor expanded in x1 around 0

                                                                                                                  \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                7. Step-by-step derivation
                                                                                                                  1. +-commutativeN/A

                                                                                                                    \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                                                                  2. *-commutativeN/A

                                                                                                                    \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                                                                  3. lower-fma.f64N/A

                                                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                                                                  4. sub-negN/A

                                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                                                                  5. *-commutativeN/A

                                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                                                                  6. metadata-evalN/A

                                                                                                                    \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                                                                  7. lower-fma.f64N/A

                                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                                                                  8. *-commutativeN/A

                                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                  9. lower-*.f64N/A

                                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                  10. sub-negN/A

                                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                  11. metadata-evalN/A

                                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                  12. lower-fma.f64N/A

                                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                  13. lower-*.f6437.1

                                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                                                                8. Applied rewrites37.1%

                                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                                                                9. Taylor expanded in x1 around inf

                                                                                                                  \[\leadsto x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                10. Step-by-step derivation
                                                                                                                  1. Applied rewrites31.1%

                                                                                                                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right) \cdot \color{blue}{x1} \]
                                                                                                                  2. Taylor expanded in x2 around 0

                                                                                                                    \[\leadsto \left(-12 \cdot x2 - 1\right) \cdot x1 \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites21.2%

                                                                                                                      \[\leadsto \mathsf{fma}\left(-12, x2, -1\right) \cdot x1 \]

                                                                                                                    if -1.1199999999999999e-142 < x1 < 6.9999999999999997e-75

                                                                                                                    1. Initial program 99.5%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Add Preprocessing
                                                                                                                    3. Applied rewrites99.8%

                                                                                                                      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x1 \cdot x1, x1, \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(4, \frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot 2\right)\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \frac{\mathsf{fma}\left(x2, 2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(\left(3 \cdot x1\right) \cdot x1\right)\right) + \mathsf{fma}\left(\frac{\mathsf{fma}\left(-2, x2, \left(3 \cdot x1\right) \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1\right)\right)} \]
                                                                                                                    4. Applied rewrites99.8%

                                                                                                                      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), x1 \cdot x1, \left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) \cdot \left(\left(2 \cdot x1\right) \cdot \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \mathsf{fma}\left(\frac{x1 \cdot \left(\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1 \cdot x1\right), \mathsf{fma}\left(\frac{3}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(-2, x2, \mathsf{fma}\left(3 \cdot x1, x1, -x1\right)\right), x1\right)\right)\right)} \]
                                                                                                                    5. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-*.f6471.1

                                                                                                                        \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                                    7. Applied rewrites71.1%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                                  4. Recombined 2 regimes into one program.
                                                                                                                  5. Final simplification40.1%

                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.12 \cdot 10^{-142} \lor \neg \left(x1 \leq 7 \cdot 10^{-75}\right):\\ \;\;\;\;\mathsf{fma}\left(-12, x2, -1\right) \cdot x1\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot x2\\ \end{array} \]
                                                                                                                  6. Add Preprocessing

                                                                                                                  Alternative 20: 44.9% accurate, 19.9× speedup?

                                                                                                                  \[\begin{array}{l} \\ \mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right) \end{array} \]
                                                                                                                  (FPCore (x1 x2) :precision binary64 (fma (fma -12.0 x1 -6.0) x2 (- x1)))
                                                                                                                  double code(double x1, double x2) {
                                                                                                                  	return fma(fma(-12.0, x1, -6.0), x2, -x1);
                                                                                                                  }
                                                                                                                  
                                                                                                                  function code(x1, x2)
                                                                                                                  	return fma(fma(-12.0, x1, -6.0), x2, Float64(-x1))
                                                                                                                  end
                                                                                                                  
                                                                                                                  code[x1_, x2_] := N[(N[(-12.0 * x1 + -6.0), $MachinePrecision] * x2 + (-x1)), $MachinePrecision]
                                                                                                                  
                                                                                                                  \begin{array}{l}
                                                                                                                  
                                                                                                                  \\
                                                                                                                  \mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), x2, -x1\right)
                                                                                                                  \end{array}
                                                                                                                  
                                                                                                                  Derivation
                                                                                                                  1. Initial program 75.3%

                                                                                                                    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                  2. Add Preprocessing
                                                                                                                  3. Taylor expanded in x1 around 0

                                                                                                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                                  4. Step-by-step derivation
                                                                                                                    1. lower-*.f6431.0

                                                                                                                      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                                  5. Applied rewrites31.0%

                                                                                                                    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                                  6. Taylor expanded in x1 around 0

                                                                                                                    \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                  7. Step-by-step derivation
                                                                                                                    1. +-commutativeN/A

                                                                                                                      \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                                                                    2. *-commutativeN/A

                                                                                                                      \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                                                                    3. lower-fma.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                                                                    4. sub-negN/A

                                                                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                                                                    5. *-commutativeN/A

                                                                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                                                                    6. metadata-evalN/A

                                                                                                                      \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                                                                    7. lower-fma.f64N/A

                                                                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                                                                    8. *-commutativeN/A

                                                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                    9. lower-*.f64N/A

                                                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                    10. sub-negN/A

                                                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                    11. metadata-evalN/A

                                                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                    12. lower-fma.f64N/A

                                                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                    13. lower-*.f6457.1

                                                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                                                                  8. Applied rewrites57.1%

                                                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                                                                  9. Taylor expanded in x2 around 0

                                                                                                                    \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                  10. Step-by-step derivation
                                                                                                                    1. Applied rewrites49.4%

                                                                                                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-12, x1, -6\right), \color{blue}{x2}, -x1\right) \]
                                                                                                                    2. Add Preprocessing

                                                                                                                    Alternative 21: 14.6% accurate, 99.3× speedup?

                                                                                                                    \[\begin{array}{l} \\ -x1 \end{array} \]
                                                                                                                    (FPCore (x1 x2) :precision binary64 (- x1))
                                                                                                                    double code(double x1, double x2) {
                                                                                                                    	return -x1;
                                                                                                                    }
                                                                                                                    
                                                                                                                    real(8) function code(x1, x2)
                                                                                                                        real(8), intent (in) :: x1
                                                                                                                        real(8), intent (in) :: x2
                                                                                                                        code = -x1
                                                                                                                    end function
                                                                                                                    
                                                                                                                    public static double code(double x1, double x2) {
                                                                                                                    	return -x1;
                                                                                                                    }
                                                                                                                    
                                                                                                                    def code(x1, x2):
                                                                                                                    	return -x1
                                                                                                                    
                                                                                                                    function code(x1, x2)
                                                                                                                    	return Float64(-x1)
                                                                                                                    end
                                                                                                                    
                                                                                                                    function tmp = code(x1, x2)
                                                                                                                    	tmp = -x1;
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[x1_, x2_] := (-x1)
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    
                                                                                                                    \\
                                                                                                                    -x1
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Initial program 75.3%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Add Preprocessing
                                                                                                                    3. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                                    4. Step-by-step derivation
                                                                                                                      1. lower-*.f6431.0

                                                                                                                        \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                                    5. Applied rewrites31.0%

                                                                                                                      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
                                                                                                                    6. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    7. Step-by-step derivation
                                                                                                                      1. +-commutativeN/A

                                                                                                                        \[\leadsto \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) + -6 \cdot x2} \]
                                                                                                                      2. *-commutativeN/A

                                                                                                                        \[\leadsto \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \cdot x1} + -6 \cdot x2 \]
                                                                                                                      3. lower-fma.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1, x1, -6 \cdot x2\right)} \]
                                                                                                                      4. sub-negN/A

                                                                                                                        \[\leadsto \mathsf{fma}\left(\color{blue}{4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}, x1, -6 \cdot x2\right) \]
                                                                                                                      5. *-commutativeN/A

                                                                                                                        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4} + \left(\mathsf{neg}\left(1\right)\right), x1, -6 \cdot x2\right) \]
                                                                                                                      6. metadata-evalN/A

                                                                                                                        \[\leadsto \mathsf{fma}\left(\left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) \cdot 4 + \color{blue}{-1}, x1, -6 \cdot x2\right) \]
                                                                                                                      7. lower-fma.f64N/A

                                                                                                                        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x2 \cdot \left(2 \cdot x2 - 3\right), 4, -1\right)}, x1, -6 \cdot x2\right) \]
                                                                                                                      8. *-commutativeN/A

                                                                                                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                      9. lower-*.f64N/A

                                                                                                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 - 3\right) \cdot x2}, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                      10. sub-negN/A

                                                                                                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(2 \cdot x2 + \left(\mathsf{neg}\left(3\right)\right)\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                      11. metadata-evalN/A

                                                                                                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\left(2 \cdot x2 + \color{blue}{-3}\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                      12. lower-fma.f64N/A

                                                                                                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(2, x2, -3\right)} \cdot x2, 4, -1\right), x1, -6 \cdot x2\right) \]
                                                                                                                      13. lower-*.f6457.1

                                                                                                                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, \color{blue}{-6 \cdot x2}\right) \]
                                                                                                                    8. Applied rewrites57.1%

                                                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)} \]
                                                                                                                    9. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -1 \cdot \color{blue}{x1} \]
                                                                                                                    10. Step-by-step derivation
                                                                                                                      1. Applied rewrites16.2%

                                                                                                                        \[\leadsto -x1 \]
                                                                                                                      2. Add Preprocessing

                                                                                                                      Reproduce

                                                                                                                      ?
                                                                                                                      herbie shell --seed 2024305 
                                                                                                                      (FPCore (x1 x2)
                                                                                                                        :name "Rosa's FloatVsDoubleBenchmark"
                                                                                                                        :precision binary64
                                                                                                                        (+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2.0 x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) (- (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)) 3.0)) (* (* x1 x1) (- (* 4.0 (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) 6.0))) (+ (* x1 x1) 1.0)) (* (* (* 3.0 x1) x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))) (* (* x1 x1) x1)) x1) (* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))))))