Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 70.2% → 98.9%
Time: 44.4s
Alternatives: 19
Speedup: 7.6×

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 19 alternatives:

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

Initial Program: 70.2% 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: 98.9% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < -1.8e44 or 2.34999999999999996e54 < x1

    1. Initial program 31.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-*.f643.0

        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    5. Applied rewrites3.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)} \]

    if -1.8e44 < x1 < 2.34999999999999996e54

    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(\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, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot x1, \left(x1 \cdot \left(x1 \cdot 3\right)\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)}\right) + \mathsf{fma}\left(3, \frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.8 \cdot 10^{+44}:\\ \;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\ \mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+54}:\\ \;\;\;\;x1 + \mathsf{fma}\left(\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, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot x1, \left(x1 \cdot \left(x1 \cdot 3\right)\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)}\right) + \mathsf{fma}\left(3, \frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 85.7% accurate, 0.3× 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 := \mathsf{fma}\left(x2, -6, 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\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) + t\_0\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_3}\right)\\ \mathbf{if}\;t\_5 \leq -500:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_5 \leq 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\ \mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+289}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \left(6 \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 (fma x2 -6.0 (* 8.0 (* x2 (* x1 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))
             t_0))
           (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_3))))))
   (if (<= t_5 -500.0)
     t_2
     (if (<= t_5 1e-8)
       (fma x2 -6.0 (* x1 (fma 9.0 x1 -1.0)))
       (if (<= t_5 5e+289) t_2 (+ x1 (* x1 (* 6.0 t_0))))))))
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * x1);
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = fma(x2, -6.0, (8.0 * (x2 * (x1 * 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)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)));
	double tmp;
	if (t_5 <= -500.0) {
		tmp = t_2;
	} else if (t_5 <= 1e-8) {
		tmp = fma(x2, -6.0, (x1 * fma(9.0, x1, -1.0)));
	} else if (t_5 <= 5e+289) {
		tmp = t_2;
	} else {
		tmp = x1 + (x1 * (6.0 * 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 = fma(x2, -6.0, Float64(8.0 * Float64(x2 * Float64(x1 * 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)) + t_0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_3))))
	tmp = 0.0
	if (t_5 <= -500.0)
		tmp = t_2;
	elseif (t_5 <= 1e-8)
		tmp = fma(x2, -6.0, Float64(x1 * fma(9.0, x1, -1.0)));
	elseif (t_5 <= 5e+289)
		tmp = t_2;
	else
		tmp = Float64(x1 + Float64(x1 * Float64(6.0 * 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[(x2 * -6.0 + N[(8.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $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] + t$95$0), $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, -500.0], t$95$2, If[LessEqual[t$95$5, 1e-8], N[(x2 * -6.0 + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 5e+289], t$95$2, N[(x1 + N[(x1 * N[(6.0 * 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 := \mathsf{fma}\left(x2, -6, 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\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) + t\_0\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_3}\right)\\
\mathbf{if}\;t\_5 \leq -500:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_5 \leq 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\

\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+289}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(6 \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)))))) < -500 or 1e-8 < (+.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.00000000000000031e289

    1. Initial program 99.5%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Add Preprocessing
    3. 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-*.f6441.6

        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    5. Applied rewrites41.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 rewrites59.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x2, -6, 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, \mathsf{fma}\left(x2, 2, 3\right), x2 \cdot 14\right) + -6\right), -1\right)\right)\right)} \]
    8. Taylor expanded in x2 around inf

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

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

      if -500 < (+.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)))))) < 1e-8

      1. Initial program 98.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-*.f6441.1

          \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
      5. Applied rewrites41.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 rewrites99.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x2, -6, 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, \mathsf{fma}\left(x2, 2, 3\right), x2 \cdot 14\right) + -6\right), -1\right)\right)\right)} \]
      8. Taylor expanded in x2 around 0

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

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

        if 5.00000000000000031e289 < (+.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 32.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.f6488.5

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

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

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

          \[\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 -500:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\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 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -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 5 \cdot 10^{+289}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \left(6 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 3: 80.0% accurate, 0.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := \mathsf{fma}\left(x2, -6, 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\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 -500:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_4 \leq 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\ \end{array} \end{array} \]
        (FPCore (x1 x2)
         :precision binary64
         (let* ((t_0 (* x1 (* x1 3.0)))
                (t_1 (fma x2 -6.0 (* 8.0 (* x2 (* x1 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 -500.0)
             t_1
             (if (<= t_4 1e-8)
               (fma x2 -6.0 (* x1 (fma 9.0 x1 -1.0)))
               (if (<= t_4 INFINITY) t_1 (+ x1 (* (* x1 x1) 9.0)))))))
        double code(double x1, double x2) {
        	double t_0 = x1 * (x1 * 3.0);
        	double t_1 = fma(x2, -6.0, (8.0 * (x2 * (x1 * 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 <= -500.0) {
        		tmp = t_1;
        	} else if (t_4 <= 1e-8) {
        		tmp = fma(x2, -6.0, (x1 * fma(9.0, x1, -1.0)));
        	} else if (t_4 <= ((double) INFINITY)) {
        		tmp = t_1;
        	} else {
        		tmp = x1 + ((x1 * x1) * 9.0);
        	}
        	return tmp;
        }
        
        function code(x1, x2)
        	t_0 = Float64(x1 * Float64(x1 * 3.0))
        	t_1 = fma(x2, -6.0, Float64(8.0 * Float64(x2 * Float64(x1 * 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 <= -500.0)
        		tmp = t_1;
        	elseif (t_4 <= 1e-8)
        		tmp = fma(x2, -6.0, Float64(x1 * fma(9.0, x1, -1.0)));
        	elseif (t_4 <= Inf)
        		tmp = t_1;
        	else
        		tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.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[(x2 * -6.0 + N[(8.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $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, -500.0], t$95$1, If[LessEqual[t$95$4, 1e-8], N[(x2 * -6.0 + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$1, N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
        t_1 := \mathsf{fma}\left(x2, -6, 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\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 -500:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_4 \leq 10^{-8}:\\
        \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
        
        \mathbf{elif}\;t\_4 \leq \infty:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
        
        
        \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)))))) < -500 or 1e-8 < (+.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-*.f6431.3

              \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
          5. Applied rewrites31.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 rewrites57.3%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x2, -6, 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, \mathsf{fma}\left(x2, 2, 3\right), x2 \cdot 14\right) + -6\right), -1\right)\right)\right)} \]
          8. Taylor expanded in x2 around inf

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

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

            if -500 < (+.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)))))) < 1e-8

            1. Initial program 98.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-*.f6441.1

                \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
            5. Applied rewrites41.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 rewrites99.8%

              \[\leadsto \color{blue}{\mathsf{fma}\left(x2, -6, 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, \mathsf{fma}\left(x2, 2, 3\right), x2 \cdot 14\right) + -6\right), -1\right)\right)\right)} \]
            8. Taylor expanded in x2 around 0

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

                \[\leadsto \mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -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}{\left(-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) - 2\right)\right)} \]
              4. Applied rewrites72.3%

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

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

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

                  \[\leadsto x1 + 9 \cdot {x1}^{\color{blue}{2}} \]
                3. Step-by-step derivation
                  1. Applied rewrites88.7%

                    \[\leadsto x1 + \left(x1 \cdot x1\right) \cdot 9 \]
                4. Recombined 3 regimes into one program.
                5. Final simplification81.7%

                  \[\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 -500:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\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 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -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(x2, -6, 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\ \end{array} \]
                6. Add Preprocessing

                Alternative 4: 75.6% accurate, 0.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 + 8 \cdot \left(x2 \cdot \left(x1 \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 -2 \cdot 10^{+197}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+143}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\ \end{array} \end{array} \]
                (FPCore (x1 x2)
                 :precision binary64
                 (let* ((t_0 (* x1 (* x1 3.0)))
                        (t_1 (+ x1 (* 8.0 (* x2 (* x1 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 -2e+197)
                     t_1
                     (if (<= t_4 5e+143)
                       (fma x2 -6.0 (* x1 (fma 9.0 x1 -1.0)))
                       (if (<= t_4 INFINITY) t_1 (+ x1 (* (* x1 x1) 9.0)))))))
                double code(double x1, double x2) {
                	double t_0 = x1 * (x1 * 3.0);
                	double t_1 = x1 + (8.0 * (x2 * (x1 * 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 <= -2e+197) {
                		tmp = t_1;
                	} else if (t_4 <= 5e+143) {
                		tmp = fma(x2, -6.0, (x1 * fma(9.0, x1, -1.0)));
                	} else if (t_4 <= ((double) INFINITY)) {
                		tmp = t_1;
                	} else {
                		tmp = x1 + ((x1 * x1) * 9.0);
                	}
                	return tmp;
                }
                
                function code(x1, x2)
                	t_0 = Float64(x1 * Float64(x1 * 3.0))
                	t_1 = Float64(x1 + Float64(8.0 * Float64(x2 * Float64(x1 * 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 <= -2e+197)
                		tmp = t_1;
                	elseif (t_4 <= 5e+143)
                		tmp = fma(x2, -6.0, Float64(x1 * fma(9.0, x1, -1.0)));
                	elseif (t_4 <= Inf)
                		tmp = t_1;
                	else
                		tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.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[(x1 + N[(8.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $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, -2e+197], t$95$1, If[LessEqual[t$95$4, 5e+143], N[(x2 * -6.0 + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$1, N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
                t_1 := x1 + 8 \cdot \left(x2 \cdot \left(x1 \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 -2 \cdot 10^{+197}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+143}:\\
                \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
                
                \mathbf{elif}\;t\_4 \leq \infty:\\
                \;\;\;\;t\_1\\
                
                \mathbf{else}:\\
                \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
                
                
                \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)))))) < -1.9999999999999999e197 or 5.00000000000000012e143 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

                  1. Initial program 99.7%

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

                    \[\leadsto x1 + \color{blue}{\left(-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) - 2\right)\right)} \]
                  4. Applied rewrites45.5%

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

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

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

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

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

                      if -1.9999999999999999e197 < (+.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.00000000000000012e143

                      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-*.f6457.8

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

                        \[\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 rewrites91.8%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(x2, -6, 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, \mathsf{fma}\left(x2, 2, 3\right), x2 \cdot 14\right) + -6\right), -1\right)\right)\right)} \]
                      8. Taylor expanded in x2 around 0

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

                          \[\leadsto \mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -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}{\left(-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) - 2\right)\right)} \]
                        4. Applied rewrites72.3%

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

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

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

                            \[\leadsto x1 + 9 \cdot {x1}^{\color{blue}{2}} \]
                          3. Step-by-step derivation
                            1. Applied rewrites88.7%

                              \[\leadsto x1 + \left(x1 \cdot x1\right) \cdot 9 \]
                          4. Recombined 3 regimes into one program.
                          5. Final simplification77.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 -2 \cdot 10^{+197}:\\ \;\;\;\;x1 + 8 \cdot \left(x2 \cdot \left(x1 \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^{+143}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -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:\\ \;\;\;\;x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\ \end{array} \]
                          6. Add Preprocessing

                          Alternative 5: 73.4% accurate, 0.3× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 + 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 -2 \cdot 10^{+307}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+143}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\ \end{array} \end{array} \]
                          (FPCore (x1 x2)
                           :precision binary64
                           (let* ((t_0 (* x1 (* x1 3.0)))
                                  (t_1 (+ x1 (* 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 -2e+307)
                               t_1
                               (if (<= t_4 5e+143)
                                 (fma x2 -6.0 (* x1 (fma 9.0 x1 -1.0)))
                                 (if (<= t_4 INFINITY) t_1 (+ x1 (* (* x1 x1) 9.0)))))))
                          double code(double x1, double x2) {
                          	double t_0 = x1 * (x1 * 3.0);
                          	double t_1 = x1 + (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 <= -2e+307) {
                          		tmp = t_1;
                          	} else if (t_4 <= 5e+143) {
                          		tmp = fma(x2, -6.0, (x1 * fma(9.0, x1, -1.0)));
                          	} else if (t_4 <= ((double) INFINITY)) {
                          		tmp = t_1;
                          	} else {
                          		tmp = x1 + ((x1 * x1) * 9.0);
                          	}
                          	return tmp;
                          }
                          
                          function code(x1, x2)
                          	t_0 = Float64(x1 * Float64(x1 * 3.0))
                          	t_1 = Float64(x1 + 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 <= -2e+307)
                          		tmp = t_1;
                          	elseif (t_4 <= 5e+143)
                          		tmp = fma(x2, -6.0, Float64(x1 * fma(9.0, x1, -1.0)));
                          	elseif (t_4 <= Inf)
                          		tmp = t_1;
                          	else
                          		tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.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[(x1 + N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $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, -2e+307], t$95$1, If[LessEqual[t$95$4, 5e+143], N[(x2 * -6.0 + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$1, N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
                          t_1 := x1 + 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 -2 \cdot 10^{+307}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+143}:\\
                          \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
                          
                          \mathbf{elif}\;t\_4 \leq \infty:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
                          
                          
                          \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)))))) < -1.99999999999999997e307 or 5.00000000000000012e143 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

                            1. Initial program 99.7%

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

                              \[\leadsto x1 + \color{blue}{\left(-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) - 2\right)\right)} \]
                            4. Applied rewrites47.9%

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

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

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

                              if -1.99999999999999997e307 < (+.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.00000000000000012e143

                              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.7

                                  \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                              5. Applied rewrites55.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 rewrites85.9%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(x2, -6, 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, \mathsf{fma}\left(x2, 2, 3\right), x2 \cdot 14\right) + -6\right), -1\right)\right)\right)} \]
                              8. Taylor expanded in x2 around 0

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

                                  \[\leadsto \mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -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}{\left(-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) - 2\right)\right)} \]
                                4. Applied rewrites72.3%

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

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

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

                                    \[\leadsto x1 + 9 \cdot {x1}^{\color{blue}{2}} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites88.7%

                                      \[\leadsto x1 + \left(x1 \cdot x1\right) \cdot 9 \]
                                  4. Recombined 3 regimes into one program.
                                  5. Final simplification74.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 -2 \cdot 10^{+307}:\\ \;\;\;\;x1 + 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^{+143}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -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:\\ \;\;\;\;x1 + 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\ \end{array} \]
                                  6. Add Preprocessing

                                  Alternative 6: 51.0% accurate, 0.3× 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 -500:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;t\_3 \leq 10^{-66}:\\ \;\;\;\;x1 + x1 \cdot -2\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+248}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\ \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 -500.0)
                                       (* x2 -6.0)
                                       (if (<= t_3 1e-66)
                                         (+ x1 (* x1 -2.0))
                                         (if (<= t_3 5e+248) (* x2 -6.0) (+ x1 (* (* x1 x1) 9.0)))))))
                                  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 <= -500.0) {
                                  		tmp = x2 * -6.0;
                                  	} else if (t_3 <= 1e-66) {
                                  		tmp = x1 + (x1 * -2.0);
                                  	} else if (t_3 <= 5e+248) {
                                  		tmp = x2 * -6.0;
                                  	} else {
                                  		tmp = x1 + ((x1 * x1) * 9.0);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  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
                                      real(8) :: t_3
                                      real(8) :: tmp
                                      t_0 = x1 * (x1 * 3.0d0)
                                      t_1 = (x1 * x1) + 1.0d0
                                      t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
                                      t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
                                      if (t_3 <= (-500.0d0)) then
                                          tmp = x2 * (-6.0d0)
                                      else if (t_3 <= 1d-66) then
                                          tmp = x1 + (x1 * (-2.0d0))
                                      else if (t_3 <= 5d+248) then
                                          tmp = x2 * (-6.0d0)
                                      else
                                          tmp = x1 + ((x1 * x1) * 9.0d0)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  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 <= -500.0) {
                                  		tmp = x2 * -6.0;
                                  	} else if (t_3 <= 1e-66) {
                                  		tmp = x1 + (x1 * -2.0);
                                  	} else if (t_3 <= 5e+248) {
                                  		tmp = x2 * -6.0;
                                  	} else {
                                  		tmp = x1 + ((x1 * x1) * 9.0);
                                  	}
                                  	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 <= -500.0:
                                  		tmp = x2 * -6.0
                                  	elif t_3 <= 1e-66:
                                  		tmp = x1 + (x1 * -2.0)
                                  	elif t_3 <= 5e+248:
                                  		tmp = x2 * -6.0
                                  	else:
                                  		tmp = x1 + ((x1 * x1) * 9.0)
                                  	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 <= -500.0)
                                  		tmp = Float64(x2 * -6.0);
                                  	elseif (t_3 <= 1e-66)
                                  		tmp = Float64(x1 + Float64(x1 * -2.0));
                                  	elseif (t_3 <= 5e+248)
                                  		tmp = Float64(x2 * -6.0);
                                  	else
                                  		tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.0));
                                  	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 <= -500.0)
                                  		tmp = x2 * -6.0;
                                  	elseif (t_3 <= 1e-66)
                                  		tmp = x1 + (x1 * -2.0);
                                  	elseif (t_3 <= 5e+248)
                                  		tmp = x2 * -6.0;
                                  	else
                                  		tmp = x1 + ((x1 * x1) * 9.0);
                                  	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, -500.0], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$3, 1e-66], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+248], N[(x2 * -6.0), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $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 -500:\\
                                  \;\;\;\;x2 \cdot -6\\
                                  
                                  \mathbf{elif}\;t\_3 \leq 10^{-66}:\\
                                  \;\;\;\;x1 + x1 \cdot -2\\
                                  
                                  \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+248}:\\
                                  \;\;\;\;x2 \cdot -6\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
                                  
                                  
                                  \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)))))) < -500 or 9.9999999999999998e-67 < (+.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.9999999999999996e248

                                    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-*.f6449.5

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

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

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

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

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

                                    if -500 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 9.9999999999999998e-67

                                    1. Initial program 98.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}{\left(-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) - 2\right)\right)} \]
                                    4. Applied rewrites99.5%

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

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

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

                                        \[\leadsto x1 + -2 \cdot x1 \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites61.6%

                                          \[\leadsto x1 + x1 \cdot -2 \]

                                        if 4.9999999999999996e248 < (+.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 38.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}{\left(-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) - 2\right)\right)} \]
                                        4. Applied rewrites60.8%

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

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

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

                                            \[\leadsto x1 + 9 \cdot {x1}^{\color{blue}{2}} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites56.2%

                                              \[\leadsto x1 + \left(x1 \cdot x1\right) \cdot 9 \]
                                          4. Recombined 3 regimes into one program.
                                          5. Final simplification54.4%

                                            \[\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 -500:\\ \;\;\;\;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 10^{-66}:\\ \;\;\;\;x1 + x1 \cdot -2\\ \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^{+248}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\ \end{array} \]
                                          6. Add Preprocessing

                                          Alternative 7: 99.4% 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 \infty:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \left(6 \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 INFINITY) t_4 (+ x1 (* x1 (* 6.0 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 <= ((double) INFINITY)) {
                                          		tmp = t_4;
                                          	} else {
                                          		tmp = x1 + (x1 * (6.0 * t_0));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          public static 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 <= Double.POSITIVE_INFINITY) {
                                          		tmp = t_4;
                                          	} else {
                                          		tmp = x1 + (x1 * (6.0 * t_0));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x1, x2):
                                          	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)))
                                          	tmp = 0
                                          	if t_4 <= math.inf:
                                          		tmp = t_4
                                          	else:
                                          		tmp = x1 + (x1 * (6.0 * 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 <= Inf)
                                          		tmp = t_4;
                                          	else
                                          		tmp = Float64(x1 + Float64(x1 * Float64(6.0 * t_0)));
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(x1, x2)
                                          	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)));
                                          	tmp = 0.0;
                                          	if (t_4 <= Inf)
                                          		tmp = t_4;
                                          	else
                                          		tmp = x1 + (x1 * (6.0 * t_0));
                                          	end
                                          	tmp_2 = 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, Infinity], t$95$4, N[(x1 + N[(x1 * N[(6.0 * 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 \infty:\\
                                          \;\;\;\;t\_4\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;x1 + x1 \cdot \left(6 \cdot t\_0\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 + \left(6 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right) \cdot \color{blue}{x1} \]
                                            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 + x1 \cdot \left(6 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \end{array} \]
                                            9. Add Preprocessing

                                            Alternative 8: 96.0% accurate, 1.1× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := {x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\ \mathbf{if}\;x1 \leq -3.6 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x1 \leq 0.000155:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, 8, -12\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -2\right)\right)\\ \mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+54}:\\ \;\;\;\;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 3\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                            (FPCore (x1 x2)
                                             :precision binary64
                                             (let* ((t_0 (* x1 (* x1 3.0)))
                                                    (t_1
                                                     (*
                                                      (pow x1 4.0)
                                                      (+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1))))
                                                    (t_2 (+ (* x1 x1) 1.0))
                                                    (t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2)))
                                               (if (<= x1 -3.6e+40)
                                                 t_1
                                                 (if (<= x1 0.000155)
                                                   (+
                                                    x1
                                                    (fma x2 (fma x1 (fma x2 8.0 -12.0) -6.0) (* x1 (fma 9.0 x1 -2.0))))
                                                   (if (<= x1 2.35e+54)
                                                     (+
                                                      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 3.0)))
                                                     t_1)))))
                                            double code(double x1, double x2) {
                                            	double t_0 = x1 * (x1 * 3.0);
                                            	double t_1 = pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1));
                                            	double t_2 = (x1 * x1) + 1.0;
                                            	double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
                                            	double tmp;
                                            	if (x1 <= -3.6e+40) {
                                            		tmp = t_1;
                                            	} else if (x1 <= 0.000155) {
                                            		tmp = x1 + fma(x2, fma(x1, fma(x2, 8.0, -12.0), -6.0), (x1 * fma(9.0, x1, -2.0)));
                                            	} else if (x1 <= 2.35e+54) {
                                            		tmp = 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 * 3.0));
                                            	} else {
                                            		tmp = t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(x1, x2)
                                            	t_0 = Float64(x1 * Float64(x1 * 3.0))
                                            	t_1 = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1)))
                                            	t_2 = Float64(Float64(x1 * x1) + 1.0)
                                            	t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2)
                                            	tmp = 0.0
                                            	if (x1 <= -3.6e+40)
                                            		tmp = t_1;
                                            	elseif (x1 <= 0.000155)
                                            		tmp = Float64(x1 + fma(x2, fma(x1, fma(x2, 8.0, -12.0), -6.0), Float64(x1 * fma(9.0, x1, -2.0))));
                                            	elseif (x1 <= 2.35e+54)
                                            		tmp = 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 * 3.0)));
                                            	else
                                            		tmp = t_1;
                                            	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[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $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]}, If[LessEqual[x1, -3.6e+40], t$95$1, If[LessEqual[x1, 0.000155], N[(x1 + N[(x2 * N[(x1 * N[(x2 * 8.0 + -12.0), $MachinePrecision] + -6.0), $MachinePrecision] + N[(x1 * N[(9.0 * x1 + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.35e+54], 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 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
                                            t_1 := {x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\
                                            t_2 := x1 \cdot x1 + 1\\
                                            t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
                                            \mathbf{if}\;x1 \leq -3.6 \cdot 10^{+40}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            \mathbf{elif}\;x1 \leq 0.000155:\\
                                            \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, 8, -12\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -2\right)\right)\\
                                            
                                            \mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+54}:\\
                                            \;\;\;\;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 3\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if x1 < -3.59999999999999996e40 or 2.34999999999999996e54 < x1

                                              1. Initial program 31.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-*.f643.0

                                                  \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                              5. Applied rewrites3.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)} \]

                                              if -3.59999999999999996e40 < x1 < 1.55e-4

                                              1. Initial program 99.3%

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

                                                \[\leadsto x1 + \color{blue}{\left(-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) - 2\right)\right)} \]
                                              4. Applied rewrites84.2%

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

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

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

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

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

                                                  if 1.55e-4 < x1 < 2.34999999999999996e54

                                                  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 inf

                                                    \[\leadsto 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 \color{blue}{3}\right) \]
                                                  4. Step-by-step derivation
                                                    1. Applied rewrites99.4%

                                                      \[\leadsto 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 \color{blue}{3}\right) \]
                                                  5. Recombined 3 regimes into one program.
                                                  6. Final simplification99.0%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.6 \cdot 10^{+40}:\\ \;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\ \mathbf{elif}\;x1 \leq 0.000155:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, 8, -12\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -2\right)\right)\\ \mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+54}:\\ \;\;\;\;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 3\right)\\ \mathbf{else}:\\ \;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\ \end{array} \]
                                                  7. Add Preprocessing

                                                  Alternative 9: 99.0% accurate, 1.1× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := {x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\ t_1 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\ t_2 := \frac{t\_1}{\mathsf{fma}\left(x1, x1, 1\right)}\\ \mathbf{if}\;x1 \leq -1.8 \cdot 10^{+44}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+54}:\\ \;\;\;\;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\_2, 4, -6\right), \frac{\left(-3 + t\_2\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot t\_2, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                  (FPCore (x1 x2)
                                                   :precision binary64
                                                   (let* ((t_0
                                                           (*
                                                            (pow x1 4.0)
                                                            (+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1))))
                                                          (t_1 (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1))))
                                                          (t_2 (/ t_1 (fma x1 x1 1.0))))
                                                     (if (<= x1 -1.8e+44)
                                                       t_0
                                                       (if (<= x1 2.35e+54)
                                                         (+
                                                          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_2 4.0 -6.0))
                                                             (/ (* (+ -3.0 t_2) (* (* x1 2.0) t_1)) (fma x1 x1 1.0)))
                                                            (fma x1 (* (* x1 3.0) t_2) (fma x1 (* x1 x1) x1)))))
                                                         t_0))))
                                                  double code(double x1, double x2) {
                                                  	double t_0 = pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1));
                                                  	double t_1 = fma(2.0, x2, fma(x1, (x1 * 3.0), -x1));
                                                  	double t_2 = t_1 / fma(x1, x1, 1.0);
                                                  	double tmp;
                                                  	if (x1 <= -1.8e+44) {
                                                  		tmp = t_0;
                                                  	} else if (x1 <= 2.35e+54) {
                                                  		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_2, 4.0, -6.0)), (((-3.0 + t_2) * ((x1 * 2.0) * t_1)) / fma(x1, x1, 1.0))), fma(x1, ((x1 * 3.0) * t_2), fma(x1, (x1 * x1), x1))));
                                                  	} else {
                                                  		tmp = t_0;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(x1, x2)
                                                  	t_0 = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1)))
                                                  	t_1 = fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1)))
                                                  	t_2 = Float64(t_1 / fma(x1, x1, 1.0))
                                                  	tmp = 0.0
                                                  	if (x1 <= -1.8e+44)
                                                  		tmp = t_0;
                                                  	elseif (x1 <= 2.35e+54)
                                                  		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_2, 4.0, -6.0)), Float64(Float64(Float64(-3.0 + t_2) * Float64(Float64(x1 * 2.0) * t_1)) / fma(x1, x1, 1.0))), fma(x1, Float64(Float64(x1 * 3.0) * t_2), fma(x1, Float64(x1 * x1), x1)))));
                                                  	else
                                                  		tmp = t_0;
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[x1_, x2_] := Block[{t$95$0 = N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.8e+44], t$95$0, If[LessEqual[x1, 2.35e+54], 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$2 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-3.0 + t$95$2), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * t$95$2), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  t_0 := {x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\
                                                  t_1 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\
                                                  t_2 := \frac{t\_1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
                                                  \mathbf{if}\;x1 \leq -1.8 \cdot 10^{+44}:\\
                                                  \;\;\;\;t\_0\\
                                                  
                                                  \mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+54}:\\
                                                  \;\;\;\;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\_2, 4, -6\right), \frac{\left(-3 + t\_2\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot t\_2, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;t\_0\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if x1 < -1.8e44 or 2.34999999999999996e54 < x1

                                                    1. Initial program 31.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-*.f643.0

                                                        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                    5. Applied rewrites3.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)} \]

                                                    if -1.8e44 < x1 < 2.34999999999999996e54

                                                    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)} \]
                                                  3. Recombined 2 regimes into one program.
                                                  4. Final simplification99.8%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.8 \cdot 10^{+44}:\\ \;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\ \mathbf{elif}\;x1 \leq 2.35 \cdot 10^{+54}:\\ \;\;\;\;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}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\ \end{array} \]
                                                  5. Add Preprocessing

                                                  Alternative 10: 94.2% accurate, 1.9× speedup?

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

                                                    1. Initial program 35.5%

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

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

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

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

                                                      \[\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 rewrites98.3%

                                                      \[\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)} \]

                                                    if -3.59999999999999996e40 < x1 < 2.9e26

                                                    1. Initial program 99.3%

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

                                                      \[\leadsto x1 + \color{blue}{\left(-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) - 2\right)\right)} \]
                                                    4. Applied rewrites82.7%

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

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

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

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

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

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

                                                      Alternative 11: 92.5% accurate, 2.4× speedup?

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

                                                        1. Initial program 16.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.f6498.0

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

                                                          \[\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 rewrites98.0%

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

                                                        if -3.59999999999999996e40 < x1 < 2.9e26

                                                        1. Initial program 99.3%

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

                                                          \[\leadsto x1 + \color{blue}{\left(-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) - 2\right)\right)} \]
                                                        4. Applied rewrites82.7%

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

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

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

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

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

                                                            if 2.9e26 < x1

                                                            1. Initial program 50.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 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.f6488.2

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

                                                              \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                                          4. Recombined 3 regimes into one program.
                                                          5. Final simplification94.4%

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

                                                          Alternative 12: 92.5% accurate, 6.6× speedup?

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

                                                            1. Initial program 16.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.f6498.0

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

                                                              \[\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 rewrites98.0%

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

                                                            if -3.59999999999999996e40 < x1 < 2.9e26

                                                            1. Initial program 99.3%

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

                                                              \[\leadsto x1 + \color{blue}{\left(-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) - 2\right)\right)} \]
                                                            4. Applied rewrites82.7%

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

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

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

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

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

                                                                if 2.9e26 < x1

                                                                1. Initial program 50.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 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.f6488.2

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

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

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

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.6 \cdot 10^{+40}:\\ \;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 2.9 \cdot 10^{+26}:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, 8, -12\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \left(6 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \end{array} \]
                                                                9. Add Preprocessing

                                                                Alternative 13: 92.1% accurate, 7.6× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot x1\right)\\ \mathbf{if}\;x1 \leq -3.6 \cdot 10^{+40}:\\ \;\;\;\;x1 + 6 \cdot \left(x1 \cdot t\_0\right)\\ \mathbf{elif}\;x1 \leq 2.9 \cdot 10^{+26}:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, 8, -12\right), -6\right), x1 \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \left(6 \cdot t\_0\right)\\ \end{array} \end{array} \]
                                                                (FPCore (x1 x2)
                                                                 :precision binary64
                                                                 (let* ((t_0 (* x1 (* x1 x1))))
                                                                   (if (<= x1 -3.6e+40)
                                                                     (+ x1 (* 6.0 (* x1 t_0)))
                                                                     (if (<= x1 2.9e+26)
                                                                       (+ x1 (fma x2 (fma x1 (fma x2 8.0 -12.0) -6.0) (* x1 -2.0)))
                                                                       (+ x1 (* x1 (* 6.0 t_0)))))))
                                                                double code(double x1, double x2) {
                                                                	double t_0 = x1 * (x1 * x1);
                                                                	double tmp;
                                                                	if (x1 <= -3.6e+40) {
                                                                		tmp = x1 + (6.0 * (x1 * t_0));
                                                                	} else if (x1 <= 2.9e+26) {
                                                                		tmp = x1 + fma(x2, fma(x1, fma(x2, 8.0, -12.0), -6.0), (x1 * -2.0));
                                                                	} else {
                                                                		tmp = x1 + (x1 * (6.0 * t_0));
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                function code(x1, x2)
                                                                	t_0 = Float64(x1 * Float64(x1 * x1))
                                                                	tmp = 0.0
                                                                	if (x1 <= -3.6e+40)
                                                                		tmp = Float64(x1 + Float64(6.0 * Float64(x1 * t_0)));
                                                                	elseif (x1 <= 2.9e+26)
                                                                		tmp = Float64(x1 + fma(x2, fma(x1, fma(x2, 8.0, -12.0), -6.0), Float64(x1 * -2.0)));
                                                                	else
                                                                		tmp = Float64(x1 + Float64(x1 * Float64(6.0 * t_0)));
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.6e+40], N[(x1 + N[(6.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.9e+26], N[(x1 + N[(x2 * N[(x1 * N[(x2 * 8.0 + -12.0), $MachinePrecision] + -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(6.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
                                                                \mathbf{if}\;x1 \leq -3.6 \cdot 10^{+40}:\\
                                                                \;\;\;\;x1 + 6 \cdot \left(x1 \cdot t\_0\right)\\
                                                                
                                                                \mathbf{elif}\;x1 \leq 2.9 \cdot 10^{+26}:\\
                                                                \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, 8, -12\right), -6\right), x1 \cdot -2\right)\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;x1 + x1 \cdot \left(6 \cdot t\_0\right)\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 3 regimes
                                                                2. if x1 < -3.59999999999999996e40

                                                                  1. Initial program 16.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.f6498.0

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

                                                                    \[\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 rewrites98.0%

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

                                                                  if -3.59999999999999996e40 < x1 < 2.9e26

                                                                  1. Initial program 99.3%

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

                                                                    \[\leadsto x1 + \color{blue}{\left(-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) - 2\right)\right)} \]
                                                                  4. Applied rewrites82.7%

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

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

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

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

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

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

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

                                                                        if 2.9e26 < x1

                                                                        1. Initial program 50.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 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.f6488.2

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

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

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

                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.6 \cdot 10^{+40}:\\ \;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 2.9 \cdot 10^{+26}:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2, 8, -12\right), -6\right), x1 \cdot -2\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \left(6 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \end{array} \]
                                                                        9. Add Preprocessing

                                                                        Alternative 14: 31.3% accurate, 9.6× speedup?

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

                                                                          1. Initial program 73.3%

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

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

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

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

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

                                                                          if -9.9999999999999998e-86 < (*.f64 #s(literal 2 binary64) x2) < 5e-110

                                                                          1. Initial program 64.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}{\left(-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) - 2\right)\right)} \]
                                                                          4. Applied rewrites75.9%

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

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

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

                                                                              \[\leadsto x1 + -2 \cdot x1 \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites33.1%

                                                                                \[\leadsto x1 + x1 \cdot -2 \]
                                                                            4. Recombined 2 regimes into one program.
                                                                            5. Add Preprocessing

                                                                            Alternative 15: 31.1% accurate, 9.6× speedup?

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

                                                                              1. Initial program 73.3%

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

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

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

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

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

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

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

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

                                                                              if -9.9999999999999998e-86 < (*.f64 #s(literal 2 binary64) x2) < 5e-110

                                                                              1. Initial program 64.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}{\left(-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) - 2\right)\right)} \]
                                                                              4. Applied rewrites75.9%

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

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

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

                                                                                  \[\leadsto x1 + -2 \cdot x1 \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites33.1%

                                                                                    \[\leadsto x1 + x1 \cdot -2 \]
                                                                                4. Recombined 2 regimes into one program.
                                                                                5. Add Preprocessing

                                                                                Alternative 16: 58.3% accurate, 11.0× speedup?

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

                                                                                  1. Initial program 48.3%

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

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

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

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

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

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

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

                                                                                    \[\leadsto \color{blue}{x2 \cdot -6} \]
                                                                                  9. 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 + \left(8 \cdot x2 + x1 \cdot \left(\left(2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + -2 \cdot x2\right)\right) + 3 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 2 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 3\right)\right)\right)\right)\right) - 6\right)\right) - 1\right)} \]
                                                                                  10. Applied rewrites66.6%

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

                                                                                    \[\leadsto x1 \cdot \color{blue}{\left(x1 \cdot \left(9 + -19 \cdot x1\right) - 1\right)} \]
                                                                                  12. Step-by-step derivation
                                                                                    1. Applied rewrites67.5%

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

                                                                                    if -7.19999999999999955e-135 < x1 < 1.51999999999999998e-111

                                                                                    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-*.f6467.7

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

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

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

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

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

                                                                                    if 1.51999999999999998e-111 < x1

                                                                                    1. Initial program 67.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}{\left(-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) - 2\right)\right)} \]
                                                                                    4. Applied rewrites68.1%

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

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

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

                                                                                    Alternative 17: 54.4% accurate, 11.0× speedup?

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

                                                                                      1. Initial program 58.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}{\left(-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) - 2\right)\right)} \]
                                                                                      4. Applied rewrites67.0%

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

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

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

                                                                                        if -7.19999999999999955e-135 < x1 < 1.51999999999999998e-111

                                                                                        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-*.f6467.7

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

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

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

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

                                                                                          \[\leadsto \color{blue}{x2 \cdot -6} \]
                                                                                      7. Recombined 2 regimes into one program.
                                                                                      8. Add Preprocessing

                                                                                      Alternative 18: 67.1% accurate, 12.4× speedup?

                                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+40}:\\ \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, -19, 9\right), -1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\ \end{array} \end{array} \]
                                                                                      (FPCore (x1 x2)
                                                                                       :precision binary64
                                                                                       (if (<= x1 -3.8e+40)
                                                                                         (* x1 (fma x1 (fma x1 -19.0 9.0) -1.0))
                                                                                         (fma x2 -6.0 (* x1 (fma 9.0 x1 -1.0)))))
                                                                                      double code(double x1, double x2) {
                                                                                      	double tmp;
                                                                                      	if (x1 <= -3.8e+40) {
                                                                                      		tmp = x1 * fma(x1, fma(x1, -19.0, 9.0), -1.0);
                                                                                      	} else {
                                                                                      		tmp = fma(x2, -6.0, (x1 * fma(9.0, x1, -1.0)));
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      function code(x1, x2)
                                                                                      	tmp = 0.0
                                                                                      	if (x1 <= -3.8e+40)
                                                                                      		tmp = Float64(x1 * fma(x1, fma(x1, -19.0, 9.0), -1.0));
                                                                                      	else
                                                                                      		tmp = fma(x2, -6.0, Float64(x1 * fma(9.0, x1, -1.0)));
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      code[x1_, x2_] := If[LessEqual[x1, -3.8e+40], N[(x1 * N[(x1 * N[(x1 * -19.0 + 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0 + N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      
                                                                                      \\
                                                                                      \begin{array}{l}
                                                                                      \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+40}:\\
                                                                                      \;\;\;\;x1 \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, -19, 9\right), -1\right)\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 2 regimes
                                                                                      2. if x1 < -3.80000000000000004e40

                                                                                        1. Initial program 16.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-*.f640.8

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

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

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

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

                                                                                          \[\leadsto \color{blue}{x2 \cdot -6} \]
                                                                                        9. 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 + \left(8 \cdot x2 + x1 \cdot \left(\left(2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + -2 \cdot x2\right)\right) + 3 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 2 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 3\right)\right)\right)\right)\right) - 6\right)\right) - 1\right)} \]
                                                                                        10. Applied rewrites65.2%

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

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

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

                                                                                          if -3.80000000000000004e40 < x1

                                                                                          1. Initial program 83.9%

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

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

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

                                                                                              \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                                          5. Applied rewrites31.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 rewrites72.6%

                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(x2, -6, 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, \mathsf{fma}\left(x2, 2, 3\right), x2 \cdot 14\right) + -6\right), -1\right)\right)\right)} \]
                                                                                          8. Taylor expanded in x2 around 0

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

                                                                                              \[\leadsto \mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right) \]
                                                                                          10. Recombined 2 regimes into one program.
                                                                                          11. Add Preprocessing

                                                                                          Alternative 19: 26.0% 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 70.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-*.f6425.1

                                                                                              \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                                          5. Applied rewrites25.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. *-commutativeN/A

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

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

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

                                                                                          Reproduce

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