Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 70.6% → 99.2%
Time: 22.0s
Alternatives: 15
Speedup: 7.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 15 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: 70.6% 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.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\ t_1 := \frac{t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\ \mathbf{if}\;x1 \leq -4.7 \cdot 10^{+64}:\\ \;\;\;\;\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), \mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)\right)\\ \mathbf{elif}\;x1 \leq 4.6 \cdot 10^{+75}:\\ \;\;\;\;x1 + \mathsf{fma}\left(\frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_1, 4, -6\right), \frac{\left(-3 + t\_1\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_0\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot t\_1, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1))))
        (t_1 (/ t_0 (fma x1 x1 1.0))))
   (if (<= x1 -4.7e+64)
     (* (* x1 x1) (fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0)))
     (if (<= x1 4.6e+75)
       (+
        x1
        (fma
         (/ (- (* x1 (* x1 3.0)) (fma 2.0 x2 x1)) (fma x1 x1 1.0))
         3.0
         (fma
          (fma x1 x1 1.0)
          (fma
           x1
           (* x1 (fma t_1 4.0 -6.0))
           (/ (* (+ -3.0 t_1) (* (* x1 2.0) t_0)) (fma x1 x1 1.0)))
          (fma x1 (* (* x1 3.0) t_1) (fma x1 (* x1 x1) x1)))))
       (+ x1 (* 6.0 (* (* x1 x1) (* x1 x1))))))))
double code(double x1, double x2) {
	double t_0 = fma(2.0, x2, fma(x1, (x1 * 3.0), -x1));
	double t_1 = t_0 / fma(x1, x1, 1.0);
	double tmp;
	if (x1 <= -4.7e+64) {
		tmp = (x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0));
	} else if (x1 <= 4.6e+75) {
		tmp = x1 + fma((((x1 * (x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_1, 4.0, -6.0)), (((-3.0 + t_1) * ((x1 * 2.0) * t_0)) / fma(x1, x1, 1.0))), fma(x1, ((x1 * 3.0) * t_1), fma(x1, (x1 * x1), x1))));
	} else {
		tmp = x1 + (6.0 * ((x1 * x1) * (x1 * x1)));
	}
	return tmp;
}
function code(x1, x2)
	t_0 = fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1)))
	t_1 = Float64(t_0 / fma(x1, x1, 1.0))
	tmp = 0.0
	if (x1 <= -4.7e+64)
		tmp = Float64(Float64(x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)));
	elseif (x1 <= 4.6e+75)
		tmp = Float64(x1 + fma(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_1, 4.0, -6.0)), Float64(Float64(Float64(-3.0 + t_1) * Float64(Float64(x1 * 2.0) * t_0)) / fma(x1, x1, 1.0))), fma(x1, Float64(Float64(x1 * 3.0) * t_1), fma(x1, Float64(x1 * x1), x1)))));
	else
		tmp = Float64(x1 + Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))));
	end
	return tmp
end
code[x1_, x2_] := Block[{t$95$0 = N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.7e+64], N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.6e+75], N[(x1 + N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$1 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-3.0 + t$95$1), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\
t_1 := \frac{t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 \leq -4.7 \cdot 10^{+64}:\\
\;\;\;\;\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), \mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)\right)\\

\mathbf{elif}\;x1 \leq 4.6 \cdot 10^{+75}:\\
\;\;\;\;x1 + \mathsf{fma}\left(\frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_1, 4, -6\right), \frac{\left(-3 + t\_1\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_0\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot t\_1, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x1 < -4.70000000000000029e64

    1. Initial program 19.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. *-commutativeN/A

        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
      2. lower-*.f641.0

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

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

      \[\leadsto \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)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \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)} \]
      2. lower-pow.f64N/A

        \[\leadsto \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) \]
      3. mul-1-negN/A

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

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

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

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

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

      \[\leadsto {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)} \]
    10. Step-by-step derivation
      1. Applied rewrites100.0%

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

      if -4.70000000000000029e64 < x1 < 4.5999999999999997e75

      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. Applied rewrites99.6%

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

      if 4.5999999999999997e75 < x1

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

        \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
        2. lower-pow.f64100.0

          \[\leadsto x1 + 6 \cdot \color{blue}{{x1}^{4}} \]
      5. Applied rewrites100.0%

        \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
      6. Step-by-step derivation
        1. Applied rewrites100.0%

          \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
      7. Recombined 3 regimes into one program.
      8. Final simplification99.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -4.7 \cdot 10^{+64}:\\ \;\;\;\;\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), \mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)\right)\\ \mathbf{elif}\;x1 \leq 4.6 \cdot 10^{+75}:\\ \;\;\;\;x1 + \mathsf{fma}\left(\frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), \frac{\left(-3 + \frac{\mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot \frac{\mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 2: 74.6% accurate, 0.3× speedup?

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

        1. Initial program 100.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. *-commutativeN/A

            \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
          2. lower-*.f642.0

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

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

          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(\left(2 \cdot \left(-2 \cdot x2 + -1 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(3 \cdot \left(3 - -2 \cdot x2\right) + \left(6 \cdot x2 + 8 \cdot x2\right)\right)\right) - 6\right)\right) - 1\right)} \]
        7. Applied rewrites83.0%

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

          \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
        9. Step-by-step derivation
          1. Applied rewrites95.8%

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

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

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

            if -4.9999999999999996e260 < (+.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)))))) < 5e51

            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. *-commutativeN/A

                \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
              2. lower-*.f6461.4

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

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

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

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

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

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

              if 5e51 < (+.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.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. *-commutativeN/A

                  \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                2. lower-*.f6411.7

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

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

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

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

                \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(8 \cdot {x2}^{2}\right)\right) \]
              9. Step-by-step derivation
                1. Applied rewrites40.2%

                  \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(8 \cdot \left(x2 \cdot x2\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 0

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

                    \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                  2. lower-*.f643.3

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                9. Step-by-step derivation
                  1. Applied rewrites46.0%

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

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

                      \[\leadsto x1 \cdot \color{blue}{\mathsf{fma}\left(x1, 9, -1\right)} \]
                  4. Recombined 4 regimes into one program.
                  5. Final simplification73.2%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq -5 \cdot 10^{+260}:\\ \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{elif}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq 5 \cdot 10^{+51}:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\ \mathbf{elif}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \end{array} \]
                  6. Add Preprocessing

                  Alternative 3: 74.3% accurate, 0.3× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ t_3 := x1 \cdot x1 + 1\\ t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3}\\ t_5 := x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_4\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_3}\right)\\ \mathbf{if}\;t\_5 \leq -5 \cdot 10^{+260}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+190}:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, t\_0\right)\\ \mathbf{elif}\;t\_5 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                  (FPCore (x1 x2)
                   :precision binary64
                   (let* ((t_0 (* x1 (fma x1 9.0 -1.0)))
                          (t_1 (* x1 (* x1 3.0)))
                          (t_2 (* 8.0 (* x1 (* x2 x2))))
                          (t_3 (+ (* x1 x1) 1.0))
                          (t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
                          (t_5
                           (+
                            x1
                            (+
                             (+
                              x1
                              (+
                               (+
                                (*
                                 t_3
                                 (+
                                  (* (* (* x1 2.0) t_4) (- t_4 3.0))
                                  (* (* x1 x1) (- (* t_4 4.0) 6.0))))
                                (* t_1 t_4))
                               (* x1 (* x1 x1))))
                             (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_3))))))
                     (if (<= t_5 -5e+260)
                       t_2
                       (if (<= t_5 5e+190) (fma -6.0 x2 t_0) (if (<= t_5 INFINITY) t_2 t_0)))))
                  double code(double x1, double x2) {
                  	double t_0 = x1 * fma(x1, 9.0, -1.0);
                  	double t_1 = x1 * (x1 * 3.0);
                  	double t_2 = 8.0 * (x1 * (x2 * x2));
                  	double t_3 = (x1 * x1) + 1.0;
                  	double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
                  	double t_5 = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + (t_1 * t_4)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)));
                  	double tmp;
                  	if (t_5 <= -5e+260) {
                  		tmp = t_2;
                  	} else if (t_5 <= 5e+190) {
                  		tmp = fma(-6.0, x2, t_0);
                  	} else if (t_5 <= ((double) INFINITY)) {
                  		tmp = t_2;
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  function code(x1, x2)
                  	t_0 = Float64(x1 * fma(x1, 9.0, -1.0))
                  	t_1 = Float64(x1 * Float64(x1 * 3.0))
                  	t_2 = Float64(8.0 * Float64(x1 * Float64(x2 * x2)))
                  	t_3 = Float64(Float64(x1 * x1) + 1.0)
                  	t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_3)
                  	t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)))) + Float64(t_1 * t_4)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_3))))
                  	tmp = 0.0
                  	if (t_5 <= -5e+260)
                  		tmp = t_2;
                  	elseif (t_5 <= 5e+190)
                  		tmp = fma(-6.0, x2, t_0);
                  	elseif (t_5 <= Inf)
                  		tmp = t_2;
                  	else
                  		tmp = t_0;
                  	end
                  	return tmp
                  end
                  
                  code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -5e+260], t$95$2, If[LessEqual[t$95$5, 5e+190], N[(-6.0 * x2 + t$95$0), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$2, t$95$0]]]]]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\
                  t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
                  t_2 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
                  t_3 := x1 \cdot x1 + 1\\
                  t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3}\\
                  t_5 := x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_4\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_3}\right)\\
                  \mathbf{if}\;t\_5 \leq -5 \cdot 10^{+260}:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+190}:\\
                  \;\;\;\;\mathsf{fma}\left(-6, x2, t\_0\right)\\
                  
                  \mathbf{elif}\;t\_5 \leq \infty:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_0\\
                  
                  
                  \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.9999999999999996e260 or 5.00000000000000036e190 < (+.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. *-commutativeN/A

                        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                      2. lower-*.f644.6

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                    9. Step-by-step derivation
                      1. Applied rewrites62.4%

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

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

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

                        if -4.9999999999999996e260 < (+.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)))))) < 5.00000000000000036e190

                        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. *-commutativeN/A

                            \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                          2. lower-*.f6455.1

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \mathsf{fma}\left(x1, 9, -1\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 0

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

                              \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                            2. lower-*.f643.3

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                          9. Step-by-step derivation
                            1. Applied rewrites46.0%

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

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

                                \[\leadsto x1 \cdot \color{blue}{\mathsf{fma}\left(x1, 9, -1\right)} \]
                            4. Recombined 3 regimes into one program.
                            5. Final simplification73.1%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq -5 \cdot 10^{+260}:\\ \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{elif}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq 5 \cdot 10^{+190}:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\ \mathbf{elif}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq \infty:\\ \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \end{array} \]
                            6. Add Preprocessing

                            Alternative 4: 62.4% accurate, 0.3× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\ t_4 := x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right)\\ \mathbf{if}\;t\_4 \leq -5 \cdot 10^{+260}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+190}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \end{array} \end{array} \]
                            (FPCore (x1 x2)
                             :precision binary64
                             (let* ((t_0 (* x1 (* x1 3.0)))
                                    (t_1 (* 8.0 (* x1 (* x2 x2))))
                                    (t_2 (+ (* x1 x1) 1.0))
                                    (t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
                                    (t_4
                                     (+
                                      x1
                                      (+
                                       (+
                                        x1
                                        (+
                                         (+
                                          (*
                                           t_2
                                           (+
                                            (* (* (* x1 2.0) t_3) (- t_3 3.0))
                                            (* (* x1 x1) (- (* t_3 4.0) 6.0))))
                                          (* t_0 t_3))
                                         (* x1 (* x1 x1))))
                                       (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))))
                               (if (<= t_4 -5e+260)
                                 t_1
                                 (if (<= t_4 5e+190)
                                   (* x2 -6.0)
                                   (if (<= t_4 INFINITY) t_1 (* x1 (fma x1 9.0 -1.0)))))))
                            double code(double x1, double x2) {
                            	double t_0 = x1 * (x1 * 3.0);
                            	double t_1 = 8.0 * (x1 * (x2 * x2));
                            	double t_2 = (x1 * x1) + 1.0;
                            	double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
                            	double t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
                            	double tmp;
                            	if (t_4 <= -5e+260) {
                            		tmp = t_1;
                            	} else if (t_4 <= 5e+190) {
                            		tmp = x2 * -6.0;
                            	} else if (t_4 <= ((double) INFINITY)) {
                            		tmp = t_1;
                            	} else {
                            		tmp = x1 * fma(x1, 9.0, -1.0);
                            	}
                            	return tmp;
                            }
                            
                            function code(x1, x2)
                            	t_0 = Float64(x1 * Float64(x1 * 3.0))
                            	t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2)))
                            	t_2 = Float64(Float64(x1 * x1) + 1.0)
                            	t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2)
                            	t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2))))
                            	tmp = 0.0
                            	if (t_4 <= -5e+260)
                            		tmp = t_1;
                            	elseif (t_4 <= 5e+190)
                            		tmp = Float64(x2 * -6.0);
                            	elseif (t_4 <= Inf)
                            		tmp = t_1;
                            	else
                            		tmp = Float64(x1 * fma(x1, 9.0, -1.0));
                            	end
                            	return tmp
                            end
                            
                            code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -5e+260], t$95$1, If[LessEqual[t$95$4, 5e+190], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$1, N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
                            t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
                            t_2 := x1 \cdot x1 + 1\\
                            t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
                            t_4 := x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right)\\
                            \mathbf{if}\;t\_4 \leq -5 \cdot 10^{+260}:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+190}:\\
                            \;\;\;\;x2 \cdot -6\\
                            
                            \mathbf{elif}\;t\_4 \leq \infty:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\
                            
                            
                            \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.9999999999999996e260 or 5.00000000000000036e190 < (+.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. *-commutativeN/A

                                  \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                2. lower-*.f644.6

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                              9. Step-by-step derivation
                                1. Applied rewrites62.4%

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

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

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

                                  if -4.9999999999999996e260 < (+.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)))))) < 5.00000000000000036e190

                                  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. *-commutativeN/A

                                      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                    2. lower-*.f6455.1

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

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

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

                                      \[\leadsto \color{blue}{-6 \cdot x2} \]
                                  8. Applied rewrites55.6%

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

                                  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 0

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

                                      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                    2. lower-*.f643.3

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                                  9. Step-by-step derivation
                                    1. Applied rewrites46.0%

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

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

                                        \[\leadsto x1 \cdot \color{blue}{\mathsf{fma}\left(x1, 9, -1\right)} \]
                                    4. Recombined 3 regimes into one program.
                                    5. Final simplification63.2%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq -5 \cdot 10^{+260}:\\ \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{elif}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq 5 \cdot 10^{+190}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq \infty:\\ \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \end{array} \]
                                    6. Add Preprocessing

                                    Alternative 5: 81.0% accurate, 0.5× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot x1\right)\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\ t_4 := x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + t\_0\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right)\\ \mathbf{if}\;t\_4 \leq -5 \cdot 10^{+260}:\\ \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(x1 \cdot t\_0\right)\\ \end{array} \end{array} \]
                                    (FPCore (x1 x2)
                                     :precision binary64
                                     (let* ((t_0 (* x1 (* x1 x1)))
                                            (t_1 (* x1 (* x1 3.0)))
                                            (t_2 (+ (* x1 x1) 1.0))
                                            (t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
                                            (t_4
                                             (+
                                              x1
                                              (+
                                               (+
                                                x1
                                                (+
                                                 (+
                                                  (*
                                                   t_2
                                                   (+
                                                    (* (* (* x1 2.0) t_3) (- t_3 3.0))
                                                    (* (* x1 x1) (- (* t_3 4.0) 6.0))))
                                                  (* t_1 t_3))
                                                 t_0))
                                               (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))))
                                       (if (<= t_4 -5e+260)
                                         (* 8.0 (* x1 (* x2 x2)))
                                         (if (<= t_4 2e+44)
                                           (fma -6.0 x2 (* x1 (fma x1 9.0 -1.0)))
                                           (+ x1 (* 6.0 (* x1 t_0)))))))
                                    double code(double x1, double x2) {
                                    	double t_0 = x1 * (x1 * x1);
                                    	double t_1 = x1 * (x1 * 3.0);
                                    	double t_2 = (x1 * x1) + 1.0;
                                    	double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
                                    	double t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)));
                                    	double tmp;
                                    	if (t_4 <= -5e+260) {
                                    		tmp = 8.0 * (x1 * (x2 * x2));
                                    	} else if (t_4 <= 2e+44) {
                                    		tmp = fma(-6.0, x2, (x1 * fma(x1, 9.0, -1.0)));
                                    	} else {
                                    		tmp = x1 + (6.0 * (x1 * t_0));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x1, x2)
                                    	t_0 = Float64(x1 * Float64(x1 * x1))
                                    	t_1 = Float64(x1 * Float64(x1 * 3.0))
                                    	t_2 = Float64(Float64(x1 * x1) + 1.0)
                                    	t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)
                                    	t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + t_0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2))))
                                    	tmp = 0.0
                                    	if (t_4 <= -5e+260)
                                    		tmp = Float64(8.0 * Float64(x1 * Float64(x2 * x2)));
                                    	elseif (t_4 <= 2e+44)
                                    		tmp = fma(-6.0, x2, Float64(x1 * fma(x1, 9.0, -1.0)));
                                    	else
                                    		tmp = Float64(x1 + Float64(6.0 * Float64(x1 * t_0)));
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -5e+260], N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+44], N[(-6.0 * x2 + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
                                    t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
                                    t_2 := x1 \cdot x1 + 1\\
                                    t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
                                    t_4 := x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + t\_0\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right)\\
                                    \mathbf{if}\;t\_4 \leq -5 \cdot 10^{+260}:\\
                                    \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
                                    
                                    \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+44}:\\
                                    \;\;\;\;\mathsf{fma}\left(-6, x2, x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;x1 + 6 \cdot \left(x1 \cdot t\_0\right)\\
                                    
                                    
                                    \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.9999999999999996e260

                                      1. Initial program 100.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. *-commutativeN/A

                                          \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                        2. lower-*.f642.0

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

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

                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(\left(2 \cdot \left(-2 \cdot x2 + -1 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(3 \cdot \left(3 - -2 \cdot x2\right) + \left(6 \cdot x2 + 8 \cdot x2\right)\right)\right) - 6\right)\right) - 1\right)} \]
                                      7. Applied rewrites83.0%

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

                                        \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                                      9. Step-by-step derivation
                                        1. Applied rewrites95.8%

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

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

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

                                          if -4.9999999999999996e260 < (+.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.0000000000000002e44

                                          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. *-commutativeN/A

                                              \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                            2. lower-*.f6462.1

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

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

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

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

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

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

                                            if 2.0000000000000002e44 < (+.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 54.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}{6 \cdot {x1}^{4}} \]
                                            4. Step-by-step derivation
                                              1. lower-*.f64N/A

                                                \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                              2. lower-pow.f6476.8

                                                \[\leadsto x1 + 6 \cdot \color{blue}{{x1}^{4}} \]
                                            5. Applied rewrites76.8%

                                              \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                            6. Step-by-step derivation
                                              1. lift-+.f64N/A

                                                \[\leadsto \color{blue}{x1 + 6 \cdot {x1}^{4}} \]
                                              2. +-commutativeN/A

                                                \[\leadsto \color{blue}{6 \cdot {x1}^{4} + x1} \]
                                            7. Applied rewrites76.8%

                                              \[\leadsto \color{blue}{6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right) + x1} \]
                                          10. Recombined 3 regimes into one program.
                                          11. Final simplification82.9%

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

                                          Alternative 6: 81.0% accurate, 0.5× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\ \mathbf{if}\;t\_3 \leq -5 \cdot 10^{+260}:\\ \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \end{array} \]
                                          (FPCore (x1 x2)
                                           :precision binary64
                                           (let* ((t_0 (* x1 (* x1 3.0)))
                                                  (t_1 (+ (* x1 x1) 1.0))
                                                  (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
                                                  (t_3
                                                   (+
                                                    x1
                                                    (+
                                                     (+
                                                      x1
                                                      (+
                                                       (+
                                                        (*
                                                         t_1
                                                         (+
                                                          (* (* (* x1 2.0) t_2) (- t_2 3.0))
                                                          (* (* x1 x1) (- (* t_2 4.0) 6.0))))
                                                        (* t_0 t_2))
                                                       (* x1 (* x1 x1))))
                                                     (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
                                             (if (<= t_3 -5e+260)
                                               (* 8.0 (* x1 (* x2 x2)))
                                               (if (<= t_3 2e+44)
                                                 (fma -6.0 x2 (* x1 (fma x1 9.0 -1.0)))
                                                 (+ x1 (* 6.0 (* (* x1 x1) (* x1 x1))))))))
                                          double code(double x1, double x2) {
                                          	double t_0 = x1 * (x1 * 3.0);
                                          	double t_1 = (x1 * x1) + 1.0;
                                          	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                          	double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
                                          	double tmp;
                                          	if (t_3 <= -5e+260) {
                                          		tmp = 8.0 * (x1 * (x2 * x2));
                                          	} else if (t_3 <= 2e+44) {
                                          		tmp = fma(-6.0, x2, (x1 * fma(x1, 9.0, -1.0)));
                                          	} else {
                                          		tmp = x1 + (6.0 * ((x1 * x1) * (x1 * x1)));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(x1, x2)
                                          	t_0 = Float64(x1 * Float64(x1 * 3.0))
                                          	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(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
                                          	tmp = 0.0
                                          	if (t_3 <= -5e+260)
                                          		tmp = Float64(8.0 * Float64(x1 * Float64(x2 * x2)));
                                          	elseif (t_3 <= 2e+44)
                                          		tmp = fma(-6.0, x2, Float64(x1 * fma(x1, 9.0, -1.0)));
                                          	else
                                          		tmp = Float64(x1 + Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))));
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $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[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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, -5e+260], N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+44], N[(-6.0 * x2 + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
                                          t_1 := x1 \cdot x1 + 1\\
                                          t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
                                          t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
                                          \mathbf{if}\;t\_3 \leq -5 \cdot 10^{+260}:\\
                                          \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
                                          
                                          \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+44}:\\
                                          \;\;\;\;\mathsf{fma}\left(-6, x2, x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
                                          
                                          
                                          \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.9999999999999996e260

                                            1. Initial program 100.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. *-commutativeN/A

                                                \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                              2. lower-*.f642.0

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

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

                                              \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(\left(2 \cdot \left(-2 \cdot x2 + -1 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(3 \cdot \left(3 - -2 \cdot x2\right) + \left(6 \cdot x2 + 8 \cdot x2\right)\right)\right) - 6\right)\right) - 1\right)} \]
                                            7. Applied rewrites83.0%

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

                                              \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                                            9. Step-by-step derivation
                                              1. Applied rewrites95.8%

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

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

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

                                                if -4.9999999999999996e260 < (+.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.0000000000000002e44

                                                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. *-commutativeN/A

                                                    \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                  2. lower-*.f6462.1

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

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

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

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

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

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

                                                  if 2.0000000000000002e44 < (+.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 54.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}{6 \cdot {x1}^{4}} \]
                                                  4. Step-by-step derivation
                                                    1. lower-*.f64N/A

                                                      \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                    2. lower-pow.f6476.8

                                                      \[\leadsto x1 + 6 \cdot \color{blue}{{x1}^{4}} \]
                                                  5. Applied rewrites76.8%

                                                    \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites76.8%

                                                      \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                                                  7. Recombined 3 regimes into one program.
                                                  8. Final simplification82.9%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq -5 \cdot 10^{+260}:\\ \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{elif}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq 2 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \]
                                                  9. Add Preprocessing

                                                  Alternative 7: 99.3% accurate, 0.5× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\ \mathbf{if}\;t\_3 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \end{array} \]
                                                  (FPCore (x1 x2)
                                                   :precision binary64
                                                   (let* ((t_0 (* x1 (* x1 3.0)))
                                                          (t_1 (+ (* x1 x1) 1.0))
                                                          (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
                                                          (t_3
                                                           (+
                                                            x1
                                                            (+
                                                             (+
                                                              x1
                                                              (+
                                                               (+
                                                                (*
                                                                 t_1
                                                                 (+
                                                                  (* (* (* x1 2.0) t_2) (- t_2 3.0))
                                                                  (* (* x1 x1) (- (* t_2 4.0) 6.0))))
                                                                (* t_0 t_2))
                                                               (* x1 (* x1 x1))))
                                                             (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
                                                     (if (<= t_3 INFINITY) t_3 (+ x1 (* 6.0 (* (* x1 x1) (* x1 x1)))))))
                                                  double code(double x1, double x2) {
                                                  	double t_0 = x1 * (x1 * 3.0);
                                                  	double t_1 = (x1 * x1) + 1.0;
                                                  	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                  	double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
                                                  	double tmp;
                                                  	if (t_3 <= ((double) INFINITY)) {
                                                  		tmp = t_3;
                                                  	} else {
                                                  		tmp = x1 + (6.0 * ((x1 * x1) * (x1 * x1)));
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  public static double code(double x1, double x2) {
                                                  	double t_0 = x1 * (x1 * 3.0);
                                                  	double t_1 = (x1 * x1) + 1.0;
                                                  	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                  	double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
                                                  	double tmp;
                                                  	if (t_3 <= Double.POSITIVE_INFINITY) {
                                                  		tmp = t_3;
                                                  	} else {
                                                  		tmp = x1 + (6.0 * ((x1 * x1) * (x1 * x1)));
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  def code(x1, x2):
                                                  	t_0 = x1 * (x1 * 3.0)
                                                  	t_1 = (x1 * x1) + 1.0
                                                  	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1
                                                  	t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
                                                  	tmp = 0
                                                  	if t_3 <= math.inf:
                                                  		tmp = t_3
                                                  	else:
                                                  		tmp = x1 + (6.0 * ((x1 * x1) * (x1 * x1)))
                                                  	return tmp
                                                  
                                                  function code(x1, x2)
                                                  	t_0 = Float64(x1 * Float64(x1 * 3.0))
                                                  	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(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
                                                  	tmp = 0.0
                                                  	if (t_3 <= Inf)
                                                  		tmp = t_3;
                                                  	else
                                                  		tmp = Float64(x1 + Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))));
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  function tmp_2 = code(x1, x2)
                                                  	t_0 = x1 * (x1 * 3.0);
                                                  	t_1 = (x1 * x1) + 1.0;
                                                  	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                  	t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
                                                  	tmp = 0.0;
                                                  	if (t_3 <= Inf)
                                                  		tmp = t_3;
                                                  	else
                                                  		tmp = x1 + (6.0 * ((x1 * x1) * (x1 * x1)));
                                                  	end
                                                  	tmp_2 = tmp;
                                                  end
                                                  
                                                  code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $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[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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, Infinity], t$95$3, N[(x1 + N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
                                                  t_1 := x1 \cdot x1 + 1\\
                                                  t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
                                                  t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
                                                  \mathbf{if}\;t\_3 \leq \infty:\\
                                                  \;\;\;\;t\_3\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\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

                                                    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}{6 \cdot {x1}^{4}} \]
                                                    4. Step-by-step derivation
                                                      1. lower-*.f64N/A

                                                        \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                      2. lower-pow.f64100.0

                                                        \[\leadsto x1 + 6 \cdot \color{blue}{{x1}^{4}} \]
                                                    5. Applied rewrites100.0%

                                                      \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                    6. Step-by-step derivation
                                                      1. Applied rewrites100.0%

                                                        \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                                                    7. Recombined 2 regimes into one program.
                                                    8. Final simplification99.6%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq \infty:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \]
                                                    9. Add Preprocessing

                                                    Alternative 8: 95.0% accurate, 2.5× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -15500:\\ \;\;\;\;\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), \mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)\right)\\ \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;6 \cdot {x1}^{4}\\ \end{array} \end{array} \]
                                                    (FPCore (x1 x2)
                                                     :precision binary64
                                                     (if (<= x1 -15500.0)
                                                       (* (* x1 x1) (fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0)))
                                                       (if (<= x1 3.4e+15)
                                                         (fma -6.0 x2 (fma x2 (* 8.0 (* x1 x2)) (* x1 (fma x1 9.0 -1.0))))
                                                         (* 6.0 (pow x1 4.0)))))
                                                    double code(double x1, double x2) {
                                                    	double tmp;
                                                    	if (x1 <= -15500.0) {
                                                    		tmp = (x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0));
                                                    	} else if (x1 <= 3.4e+15) {
                                                    		tmp = fma(-6.0, x2, fma(x2, (8.0 * (x1 * x2)), (x1 * fma(x1, 9.0, -1.0))));
                                                    	} else {
                                                    		tmp = 6.0 * pow(x1, 4.0);
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    function code(x1, x2)
                                                    	tmp = 0.0
                                                    	if (x1 <= -15500.0)
                                                    		tmp = Float64(Float64(x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)));
                                                    	elseif (x1 <= 3.4e+15)
                                                    		tmp = fma(-6.0, x2, fma(x2, Float64(8.0 * Float64(x1 * x2)), Float64(x1 * fma(x1, 9.0, -1.0))));
                                                    	else
                                                    		tmp = Float64(6.0 * (x1 ^ 4.0));
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    code[x1_, x2_] := If[LessEqual[x1, -15500.0], N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.4e+15], N[(-6.0 * x2 + N[(x2 * N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;x1 \leq -15500:\\
                                                    \;\;\;\;\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), \mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)\right)\\
                                                    
                                                    \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+15}:\\
                                                    \;\;\;\;\mathsf{fma}\left(-6, x2, \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\right)\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;6 \cdot {x1}^{4}\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 3 regimes
                                                    2. if x1 < -15500

                                                      1. Initial program 36.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. *-commutativeN/A

                                                          \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                        2. lower-*.f641.2

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

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

                                                        \[\leadsto \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)} \]
                                                      7. Step-by-step derivation
                                                        1. lower-*.f64N/A

                                                          \[\leadsto \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)} \]
                                                        2. lower-pow.f64N/A

                                                          \[\leadsto \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) \]
                                                        3. mul-1-negN/A

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

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

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

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

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

                                                        \[\leadsto {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)} \]
                                                      10. Step-by-step derivation
                                                        1. Applied rewrites95.9%

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

                                                        if -15500 < x1 < 3.4e15

                                                        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. *-commutativeN/A

                                                            \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                          2. lower-*.f6445.4

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                                                        9. Step-by-step derivation
                                                          1. Applied rewrites95.7%

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

                                                            \[\leadsto \mathsf{fma}\left(-6, x2, \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\right) \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites95.7%

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

                                                            if 3.4e15 < x1

                                                            1. Initial program 54.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. *-commutativeN/A

                                                                \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                              2. lower-*.f645.4

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

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

                                                              \[\leadsto \color{blue}{6 \cdot {x1}^{4}} \]
                                                            7. Step-by-step derivation
                                                              1. lower-*.f64N/A

                                                                \[\leadsto \color{blue}{6 \cdot {x1}^{4}} \]
                                                              2. lower-pow.f6498.4

                                                                \[\leadsto 6 \cdot \color{blue}{{x1}^{4}} \]
                                                            8. Applied rewrites98.4%

                                                              \[\leadsto \color{blue}{6 \cdot {x1}^{4}} \]
                                                          4. Recombined 3 regimes into one program.
                                                          5. Add Preprocessing

                                                          Alternative 9: 95.0% accurate, 6.5× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -15500:\\ \;\;\;\;\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), \mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)\right)\\ \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \end{array} \]
                                                          (FPCore (x1 x2)
                                                           :precision binary64
                                                           (if (<= x1 -15500.0)
                                                             (* (* x1 x1) (fma x1 (fma x1 6.0 -3.0) (fma 4.0 (fma x2 2.0 -3.0) 9.0)))
                                                             (if (<= x1 3.4e+15)
                                                               (fma -6.0 x2 (fma x2 (* 8.0 (* x1 x2)) (* x1 (fma x1 9.0 -1.0))))
                                                               (+ x1 (* 6.0 (* (* x1 x1) (* x1 x1)))))))
                                                          double code(double x1, double x2) {
                                                          	double tmp;
                                                          	if (x1 <= -15500.0) {
                                                          		tmp = (x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0));
                                                          	} else if (x1 <= 3.4e+15) {
                                                          		tmp = fma(-6.0, x2, fma(x2, (8.0 * (x1 * x2)), (x1 * fma(x1, 9.0, -1.0))));
                                                          	} else {
                                                          		tmp = x1 + (6.0 * ((x1 * x1) * (x1 * x1)));
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          function code(x1, x2)
                                                          	tmp = 0.0
                                                          	if (x1 <= -15500.0)
                                                          		tmp = Float64(Float64(x1 * x1) * fma(x1, fma(x1, 6.0, -3.0), fma(4.0, fma(x2, 2.0, -3.0), 9.0)));
                                                          	elseif (x1 <= 3.4e+15)
                                                          		tmp = fma(-6.0, x2, fma(x2, Float64(8.0 * Float64(x1 * x2)), Float64(x1 * fma(x1, 9.0, -1.0))));
                                                          	else
                                                          		tmp = Float64(x1 + Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))));
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          code[x1_, x2_] := If[LessEqual[x1, -15500.0], N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0 + -3.0), $MachinePrecision] + N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.4e+15], N[(-6.0 * x2 + N[(x2 * N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;x1 \leq -15500:\\
                                                          \;\;\;\;\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 6, -3\right), \mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)\right)\\
                                                          
                                                          \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+15}:\\
                                                          \;\;\;\;\mathsf{fma}\left(-6, x2, \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\right)\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 3 regimes
                                                          2. if x1 < -15500

                                                            1. Initial program 36.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. *-commutativeN/A

                                                                \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                              2. lower-*.f641.2

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

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

                                                              \[\leadsto \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)} \]
                                                            7. Step-by-step derivation
                                                              1. lower-*.f64N/A

                                                                \[\leadsto \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)} \]
                                                              2. lower-pow.f64N/A

                                                                \[\leadsto \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) \]
                                                              3. mul-1-negN/A

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

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

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

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

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

                                                              \[\leadsto {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)} \]
                                                            10. Step-by-step derivation
                                                              1. Applied rewrites95.9%

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

                                                              if -15500 < x1 < 3.4e15

                                                              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. *-commutativeN/A

                                                                  \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                2. lower-*.f6445.4

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

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

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

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

                                                                \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                                                              9. Step-by-step derivation
                                                                1. Applied rewrites95.7%

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

                                                                  \[\leadsto \mathsf{fma}\left(-6, x2, \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\right) \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites95.7%

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

                                                                  if 3.4e15 < x1

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

                                                                    \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                  4. Step-by-step derivation
                                                                    1. lower-*.f64N/A

                                                                      \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                    2. lower-pow.f6498.4

                                                                      \[\leadsto x1 + 6 \cdot \color{blue}{{x1}^{4}} \]
                                                                  5. Applied rewrites98.4%

                                                                    \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                  6. Step-by-step derivation
                                                                    1. Applied rewrites98.3%

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

                                                                  Alternative 10: 93.7% accurate, 6.5× speedup?

                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -115000000:\\ \;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \end{array} \]
                                                                  (FPCore (x1 x2)
                                                                   :precision binary64
                                                                   (if (<= x1 -115000000.0)
                                                                     (+ x1 (* 6.0 (* x1 (* x1 (* x1 x1)))))
                                                                     (if (<= x1 3.4e+15)
                                                                       (fma -6.0 x2 (fma x2 (* 8.0 (* x1 x2)) (* x1 (fma x1 9.0 -1.0))))
                                                                       (+ x1 (* 6.0 (* (* x1 x1) (* x1 x1)))))))
                                                                  double code(double x1, double x2) {
                                                                  	double tmp;
                                                                  	if (x1 <= -115000000.0) {
                                                                  		tmp = x1 + (6.0 * (x1 * (x1 * (x1 * x1))));
                                                                  	} else if (x1 <= 3.4e+15) {
                                                                  		tmp = fma(-6.0, x2, fma(x2, (8.0 * (x1 * x2)), (x1 * fma(x1, 9.0, -1.0))));
                                                                  	} else {
                                                                  		tmp = x1 + (6.0 * ((x1 * x1) * (x1 * x1)));
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  function code(x1, x2)
                                                                  	tmp = 0.0
                                                                  	if (x1 <= -115000000.0)
                                                                  		tmp = Float64(x1 + Float64(6.0 * Float64(x1 * Float64(x1 * Float64(x1 * x1)))));
                                                                  	elseif (x1 <= 3.4e+15)
                                                                  		tmp = fma(-6.0, x2, fma(x2, Float64(8.0 * Float64(x1 * x2)), Float64(x1 * fma(x1, 9.0, -1.0))));
                                                                  	else
                                                                  		tmp = Float64(x1 + Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))));
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  code[x1_, x2_] := If[LessEqual[x1, -115000000.0], N[(x1 + N[(6.0 * N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.4e+15], N[(-6.0 * x2 + N[(x2 * N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \begin{array}{l}
                                                                  \mathbf{if}\;x1 \leq -115000000:\\
                                                                  \;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\
                                                                  
                                                                  \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+15}:\\
                                                                  \;\;\;\;\mathsf{fma}\left(-6, x2, \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\right)\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 3 regimes
                                                                  2. if x1 < -1.15e8

                                                                    1. Initial program 36.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}{6 \cdot {x1}^{4}} \]
                                                                    4. Step-by-step derivation
                                                                      1. lower-*.f64N/A

                                                                        \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                      2. lower-pow.f6486.3

                                                                        \[\leadsto x1 + 6 \cdot \color{blue}{{x1}^{4}} \]
                                                                    5. Applied rewrites86.3%

                                                                      \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                    6. Step-by-step derivation
                                                                      1. lift-+.f64N/A

                                                                        \[\leadsto \color{blue}{x1 + 6 \cdot {x1}^{4}} \]
                                                                      2. +-commutativeN/A

                                                                        \[\leadsto \color{blue}{6 \cdot {x1}^{4} + x1} \]
                                                                    7. Applied rewrites86.3%

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

                                                                    if -1.15e8 < x1 < 3.4e15

                                                                    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. *-commutativeN/A

                                                                        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                      2. lower-*.f6445.4

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

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

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

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

                                                                      \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                                                                    9. Step-by-step derivation
                                                                      1. Applied rewrites95.7%

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

                                                                        \[\leadsto \mathsf{fma}\left(-6, x2, \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\right) \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites95.7%

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

                                                                        if 3.4e15 < x1

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

                                                                          \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                        4. Step-by-step derivation
                                                                          1. lower-*.f64N/A

                                                                            \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                          2. lower-pow.f6498.4

                                                                            \[\leadsto x1 + 6 \cdot \color{blue}{{x1}^{4}} \]
                                                                        5. Applied rewrites98.4%

                                                                          \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                        6. Step-by-step derivation
                                                                          1. Applied rewrites98.3%

                                                                            \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                                                                        7. Recombined 3 regimes into one program.
                                                                        8. Final simplification93.9%

                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -115000000:\\ \;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(-6, x2, \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \]
                                                                        9. Add Preprocessing

                                                                        Alternative 11: 87.2% accurate, 7.3× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -115000000:\\ \;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(x1, \mathsf{fma}\left(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -1\right), x2 \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \end{array} \]
                                                                        (FPCore (x1 x2)
                                                                         :precision binary64
                                                                         (if (<= x1 -115000000.0)
                                                                           (+ x1 (* 6.0 (* x1 (* x1 (* x1 x1)))))
                                                                           (if (<= x1 3.4e+15)
                                                                             (fma x1 (fma 4.0 (* x2 (fma x2 2.0 -3.0)) -1.0) (* x2 -6.0))
                                                                             (+ x1 (* 6.0 (* (* x1 x1) (* x1 x1)))))))
                                                                        double code(double x1, double x2) {
                                                                        	double tmp;
                                                                        	if (x1 <= -115000000.0) {
                                                                        		tmp = x1 + (6.0 * (x1 * (x1 * (x1 * x1))));
                                                                        	} else if (x1 <= 3.4e+15) {
                                                                        		tmp = fma(x1, fma(4.0, (x2 * fma(x2, 2.0, -3.0)), -1.0), (x2 * -6.0));
                                                                        	} else {
                                                                        		tmp = x1 + (6.0 * ((x1 * x1) * (x1 * x1)));
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        function code(x1, x2)
                                                                        	tmp = 0.0
                                                                        	if (x1 <= -115000000.0)
                                                                        		tmp = Float64(x1 + Float64(6.0 * Float64(x1 * Float64(x1 * Float64(x1 * x1)))));
                                                                        	elseif (x1 <= 3.4e+15)
                                                                        		tmp = fma(x1, fma(4.0, Float64(x2 * fma(x2, 2.0, -3.0)), -1.0), Float64(x2 * -6.0));
                                                                        	else
                                                                        		tmp = Float64(x1 + Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))));
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        code[x1_, x2_] := If[LessEqual[x1, -115000000.0], N[(x1 + N[(6.0 * N[(x1 * N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.4e+15], N[(x1 * N[(4.0 * N[(x2 * N[(x2 * 2.0 + -3.0), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;x1 \leq -115000000:\\
                                                                        \;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\
                                                                        
                                                                        \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+15}:\\
                                                                        \;\;\;\;\mathsf{fma}\left(x1, \mathsf{fma}\left(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -1\right), x2 \cdot -6\right)\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 3 regimes
                                                                        2. if x1 < -1.15e8

                                                                          1. Initial program 36.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}{6 \cdot {x1}^{4}} \]
                                                                          4. Step-by-step derivation
                                                                            1. lower-*.f64N/A

                                                                              \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                            2. lower-pow.f6486.3

                                                                              \[\leadsto x1 + 6 \cdot \color{blue}{{x1}^{4}} \]
                                                                          5. Applied rewrites86.3%

                                                                            \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                          6. Step-by-step derivation
                                                                            1. lift-+.f64N/A

                                                                              \[\leadsto \color{blue}{x1 + 6 \cdot {x1}^{4}} \]
                                                                            2. +-commutativeN/A

                                                                              \[\leadsto \color{blue}{6 \cdot {x1}^{4} + x1} \]
                                                                          7. Applied rewrites86.3%

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

                                                                          if -1.15e8 < x1 < 3.4e15

                                                                          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. *-commutativeN/A

                                                                              \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                            2. lower-*.f6445.4

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

                                                                            \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                          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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

                                                                          if 3.4e15 < x1

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

                                                                            \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                          4. Step-by-step derivation
                                                                            1. lower-*.f64N/A

                                                                              \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                            2. lower-pow.f6498.4

                                                                              \[\leadsto x1 + 6 \cdot \color{blue}{{x1}^{4}} \]
                                                                          5. Applied rewrites98.4%

                                                                            \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                                          6. Step-by-step derivation
                                                                            1. Applied rewrites98.3%

                                                                              \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                                                                          7. Recombined 3 regimes into one program.
                                                                          8. Final simplification88.5%

                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -115000000:\\ \;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(x1, \mathsf{fma}\left(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -1\right), x2 \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\ \end{array} \]
                                                                          9. Add Preprocessing

                                                                          Alternative 12: 56.2% accurate, 8.3× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \mathbf{if}\;x1 \leq -2.6 \cdot 10^{+142}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq -6.6 \cdot 10^{+21}:\\ \;\;\;\;8 \cdot \left(x2 \cdot \left(x1 \cdot x1\right)\right)\\ \mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-41}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-67}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                                          (FPCore (x1 x2)
                                                                           :precision binary64
                                                                           (let* ((t_0 (* x1 (fma x1 9.0 -1.0))))
                                                                             (if (<= x1 -2.6e+142)
                                                                               t_0
                                                                               (if (<= x1 -6.6e+21)
                                                                                 (* 8.0 (* x2 (* x1 x1)))
                                                                                 (if (<= x1 -2.5e-41) t_0 (if (<= x1 2.45e-67) (* x2 -6.0) t_0))))))
                                                                          double code(double x1, double x2) {
                                                                          	double t_0 = x1 * fma(x1, 9.0, -1.0);
                                                                          	double tmp;
                                                                          	if (x1 <= -2.6e+142) {
                                                                          		tmp = t_0;
                                                                          	} else if (x1 <= -6.6e+21) {
                                                                          		tmp = 8.0 * (x2 * (x1 * x1));
                                                                          	} else if (x1 <= -2.5e-41) {
                                                                          		tmp = t_0;
                                                                          	} else if (x1 <= 2.45e-67) {
                                                                          		tmp = x2 * -6.0;
                                                                          	} else {
                                                                          		tmp = t_0;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          function code(x1, x2)
                                                                          	t_0 = Float64(x1 * fma(x1, 9.0, -1.0))
                                                                          	tmp = 0.0
                                                                          	if (x1 <= -2.6e+142)
                                                                          		tmp = t_0;
                                                                          	elseif (x1 <= -6.6e+21)
                                                                          		tmp = Float64(8.0 * Float64(x2 * Float64(x1 * x1)));
                                                                          	elseif (x1 <= -2.5e-41)
                                                                          		tmp = t_0;
                                                                          	elseif (x1 <= 2.45e-67)
                                                                          		tmp = Float64(x2 * -6.0);
                                                                          	else
                                                                          		tmp = t_0;
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.6e+142], t$95$0, If[LessEqual[x1, -6.6e+21], N[(8.0 * N[(x2 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.5e-41], t$95$0, If[LessEqual[x1, 2.45e-67], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          t_0 := x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\
                                                                          \mathbf{if}\;x1 \leq -2.6 \cdot 10^{+142}:\\
                                                                          \;\;\;\;t\_0\\
                                                                          
                                                                          \mathbf{elif}\;x1 \leq -6.6 \cdot 10^{+21}:\\
                                                                          \;\;\;\;8 \cdot \left(x2 \cdot \left(x1 \cdot x1\right)\right)\\
                                                                          
                                                                          \mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-41}:\\
                                                                          \;\;\;\;t\_0\\
                                                                          
                                                                          \mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-67}:\\
                                                                          \;\;\;\;x2 \cdot -6\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;t\_0\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 3 regimes
                                                                          2. if x1 < -2.60000000000000021e142 or -6.6e21 < x1 < -2.4999999999999998e-41 or 2.44999999999999997e-67 < x1

                                                                            1. Initial program 54.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. *-commutativeN/A

                                                                                \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                              2. lower-*.f644.5

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

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

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

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

                                                                              \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                                                                            9. Step-by-step derivation
                                                                              1. Applied rewrites52.5%

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

                                                                                \[\leadsto x1 \cdot \color{blue}{\left(9 \cdot x1 - 1\right)} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites55.7%

                                                                                  \[\leadsto x1 \cdot \color{blue}{\mathsf{fma}\left(x1, 9, -1\right)} \]

                                                                                if -2.60000000000000021e142 < x1 < -6.6e21

                                                                                1. Initial program 74.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. *-commutativeN/A

                                                                                    \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                                  2. lower-*.f641.4

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

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

                                                                                  \[\leadsto \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)} \]
                                                                                7. Step-by-step derivation
                                                                                  1. lower-*.f64N/A

                                                                                    \[\leadsto \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)} \]
                                                                                  2. lower-pow.f64N/A

                                                                                    \[\leadsto \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) \]
                                                                                  3. mul-1-negN/A

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

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

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

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

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

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

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

                                                                                  if -2.4999999999999998e-41 < x1 < 2.44999999999999997e-67

                                                                                  1. Initial program 99.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. *-commutativeN/A

                                                                                      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                                    2. lower-*.f6461.1

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

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

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

                                                                                      \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                  8. Applied rewrites61.3%

                                                                                    \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                11. Recombined 3 regimes into one program.
                                                                                12. Final simplification55.4%

                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -2.6 \cdot 10^{+142}:\\ \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \mathbf{elif}\;x1 \leq -6.6 \cdot 10^{+21}:\\ \;\;\;\;8 \cdot \left(x2 \cdot \left(x1 \cdot x1\right)\right)\\ \mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-41}:\\ \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-67}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \end{array} \]
                                                                                13. Add Preprocessing

                                                                                Alternative 13: 54.6% accurate, 12.4× speedup?

                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \mathbf{if}\;x1 \leq -2.5 \cdot 10^{-41}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-67}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                                                (FPCore (x1 x2)
                                                                                 :precision binary64
                                                                                 (let* ((t_0 (* x1 (fma x1 9.0 -1.0))))
                                                                                   (if (<= x1 -2.5e-41) t_0 (if (<= x1 2.45e-67) (* x2 -6.0) t_0))))
                                                                                double code(double x1, double x2) {
                                                                                	double t_0 = x1 * fma(x1, 9.0, -1.0);
                                                                                	double tmp;
                                                                                	if (x1 <= -2.5e-41) {
                                                                                		tmp = t_0;
                                                                                	} else if (x1 <= 2.45e-67) {
                                                                                		tmp = x2 * -6.0;
                                                                                	} else {
                                                                                		tmp = t_0;
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                function code(x1, x2)
                                                                                	t_0 = Float64(x1 * fma(x1, 9.0, -1.0))
                                                                                	tmp = 0.0
                                                                                	if (x1 <= -2.5e-41)
                                                                                		tmp = t_0;
                                                                                	elseif (x1 <= 2.45e-67)
                                                                                		tmp = Float64(x2 * -6.0);
                                                                                	else
                                                                                		tmp = t_0;
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.5e-41], t$95$0, If[LessEqual[x1, 2.45e-67], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                \begin{array}{l}
                                                                                t_0 := x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\
                                                                                \mathbf{if}\;x1 \leq -2.5 \cdot 10^{-41}:\\
                                                                                \;\;\;\;t\_0\\
                                                                                
                                                                                \mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-67}:\\
                                                                                \;\;\;\;x2 \cdot -6\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;t\_0\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 2 regimes
                                                                                2. if x1 < -2.4999999999999998e-41 or 2.44999999999999997e-67 < x1

                                                                                  1. Initial program 57.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. *-commutativeN/A

                                                                                      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                                    2. lower-*.f644.0

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

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

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

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

                                                                                    \[\leadsto \mathsf{fma}\left(-6, x2, x1 \cdot \left(9 \cdot x1 - 1\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right)\right) \]
                                                                                  9. Step-by-step derivation
                                                                                    1. Applied rewrites48.2%

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

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

                                                                                        \[\leadsto x1 \cdot \color{blue}{\mathsf{fma}\left(x1, 9, -1\right)} \]

                                                                                      if -2.4999999999999998e-41 < x1 < 2.44999999999999997e-67

                                                                                      1. Initial program 99.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. *-commutativeN/A

                                                                                          \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                                        2. lower-*.f6461.1

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

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

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

                                                                                          \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                      8. Applied rewrites61.3%

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

                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -2.5 \cdot 10^{-41}:\\ \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-67}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\ \end{array} \]
                                                                                    6. Add Preprocessing

                                                                                    Alternative 14: 27.1% accurate, 33.1× speedup?

                                                                                    \[\begin{array}{l} \\ x1 + x2 \cdot -6 \end{array} \]
                                                                                    (FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
                                                                                    double code(double x1, double x2) {
                                                                                    	return x1 + (x2 * -6.0);
                                                                                    }
                                                                                    
                                                                                    real(8) function code(x1, x2)
                                                                                        real(8), intent (in) :: x1
                                                                                        real(8), intent (in) :: x2
                                                                                        code = x1 + (x2 * (-6.0d0))
                                                                                    end function
                                                                                    
                                                                                    public static double code(double x1, double x2) {
                                                                                    	return x1 + (x2 * -6.0);
                                                                                    }
                                                                                    
                                                                                    def code(x1, x2):
                                                                                    	return x1 + (x2 * -6.0)
                                                                                    
                                                                                    function code(x1, x2)
                                                                                    	return Float64(x1 + Float64(x2 * -6.0))
                                                                                    end
                                                                                    
                                                                                    function tmp = code(x1, x2)
                                                                                    	tmp = x1 + (x2 * -6.0);
                                                                                    end
                                                                                    
                                                                                    code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
                                                                                    
                                                                                    \begin{array}{l}
                                                                                    
                                                                                    \\
                                                                                    x1 + x2 \cdot -6
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Initial program 73.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. *-commutativeN/A

                                                                                        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                                      2. lower-*.f6425.0

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

                                                                                      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                                    6. Add Preprocessing

                                                                                    Alternative 15: 26.9% accurate, 49.7× speedup?

                                                                                    \[\begin{array}{l} \\ x2 \cdot -6 \end{array} \]
                                                                                    (FPCore (x1 x2) :precision binary64 (* x2 -6.0))
                                                                                    double code(double x1, double x2) {
                                                                                    	return x2 * -6.0;
                                                                                    }
                                                                                    
                                                                                    real(8) function code(x1, x2)
                                                                                        real(8), intent (in) :: x1
                                                                                        real(8), intent (in) :: x2
                                                                                        code = x2 * (-6.0d0)
                                                                                    end function
                                                                                    
                                                                                    public static double code(double x1, double x2) {
                                                                                    	return x2 * -6.0;
                                                                                    }
                                                                                    
                                                                                    def code(x1, x2):
                                                                                    	return x2 * -6.0
                                                                                    
                                                                                    function code(x1, x2)
                                                                                    	return Float64(x2 * -6.0)
                                                                                    end
                                                                                    
                                                                                    function tmp = code(x1, x2)
                                                                                    	tmp = x2 * -6.0;
                                                                                    end
                                                                                    
                                                                                    code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
                                                                                    
                                                                                    \begin{array}{l}
                                                                                    
                                                                                    \\
                                                                                    x2 \cdot -6
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Initial program 73.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. *-commutativeN/A

                                                                                        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                                      2. lower-*.f6425.0

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

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

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

                                                                                        \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                    8. Applied rewrites24.6%

                                                                                      \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                    9. Final simplification24.6%

                                                                                      \[\leadsto x2 \cdot -6 \]
                                                                                    10. Add Preprocessing

                                                                                    Reproduce

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