Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 69.9% → 99.3%
Time: 22.0s
Alternatives: 21
Speedup: 7.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 69.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.3% accurate, 0.6× 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 := 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)\\ \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_4 + t\_1 \cdot t\_3\right) + t\_0\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\ \;\;\;\;x1 + \left(\left(x1 + \left(t\_0 + \left(t\_4 + 3 \cdot t\_1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x1 \cdot x1, \left(x1 \cdot x1\right) \cdot 6, x1\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
         (*
          t_2
          (+
           (* (* (* x1 2.0) t_3) (- t_3 3.0))
           (* (* x1 x1) (- (* t_3 4.0) 6.0))))))
   (if (<=
        (+
         x1
         (+
          (+ x1 (+ (+ t_4 (* t_1 t_3)) t_0))
          (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
        INFINITY)
     (+ x1 (+ (+ x1 (+ t_0 (+ t_4 (* 3.0 t_1)))) (* 3.0 (- (* x2 -2.0) x1))))
     (fma (* x1 x1) (* (* x1 x1) 6.0) x1))))
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 = t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)));
	double tmp;
	if ((x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
		tmp = x1 + ((x1 + (t_0 + (t_4 + (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = fma((x1 * x1), ((x1 * x1) * 6.0), x1);
	}
	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(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))))
	tmp = 0.0
	if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(t_4 + Float64(t_1 * t_3)) + t_0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(3.0 * t_1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1))));
	else
		tmp = fma(Float64(x1 * x1), Float64(Float64(x1 * x1) * 6.0), x1);
	end
	return tmp
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(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]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(t$95$4 + 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], Infinity], N[(x1 + N[(N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * x1), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + x1), $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 := 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)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_4 + t\_1 \cdot t\_3\right) + t\_0\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_0 + \left(t\_4 + 3 \cdot t\_1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x1 \cdot x1, \left(x1 \cdot x1\right) \cdot 6, x1\right)\\


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

    1. Initial program 99.5%

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

      \[\leadsto x1 + \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 \color{blue}{3}\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) \]
    4. Step-by-step derivation
      1. Simplified98.5%

        \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

        \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
      3. Step-by-step derivation
        1. mul-1-negN/A

          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
        2. unsub-negN/A

          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
        3. --lowering--.f64N/A

          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
        4. *-commutativeN/A

          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
        5. *-lowering-*.f6499.5

          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
      4. Simplified99.5%

        \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]

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

      1. Initial program 0.0%

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

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

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

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

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

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

          \[\leadsto 6 \cdot {x1}^{\color{blue}{\left(2 + 2\right)}} + x1 \]
        3. pow-prod-upN/A

          \[\leadsto 6 \cdot \color{blue}{\left({x1}^{2} \cdot {x1}^{2}\right)} + x1 \]
        4. pow2N/A

          \[\leadsto 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot {x1}^{2}\right) + x1 \]
        5. pow2N/A

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

          \[\leadsto \color{blue}{\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot 6} + x1 \]
        7. associate-*l*N/A

          \[\leadsto \color{blue}{\left(x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)} + x1 \]
        8. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(x1 \cdot x1, \left(x1 \cdot x1\right) \cdot 6, x1\right)} \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot x1}, \left(x1 \cdot x1\right) \cdot 6, x1\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fma}\left(x1 \cdot x1, \color{blue}{\left(x1 \cdot x1\right) \cdot 6}, x1\right) \]
        11. *-lowering-*.f64100.0

          \[\leadsto \mathsf{fma}\left(x1 \cdot x1, \color{blue}{\left(x1 \cdot x1\right)} \cdot 6, x1\right) \]
      7. Applied egg-rr100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x1 \cdot x1, \left(x1 \cdot x1\right) \cdot 6, x1\right)} \]
    5. Recombined 2 regimes into one program.
    6. 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(x1 \cdot \left(x1 \cdot x1\right) + \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) + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x1 \cdot x1, \left(x1 \cdot x1\right) \cdot 6, x1\right)\\ \end{array} \]
    7. Add Preprocessing

    Alternative 2: 74.2% accurate, 0.3× speedup?

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

      1. Initial program 99.8%

        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in x1 around 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 \color{blue}{3}\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) \]
      4. Step-by-step derivation
        1. Simplified99.8%

          \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
        3. Step-by-step derivation
          1. mul-1-negN/A

            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
          2. unsub-negN/A

            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
          3. --lowering--.f64N/A

            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
          4. *-commutativeN/A

            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
          5. *-lowering-*.f6499.8

            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
        4. Simplified99.8%

          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
        5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

            \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
          10. accelerator-lowering-fma.f6463.0

            \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \color{blue}{\mathsf{fma}\left(x2, 2, -3\right)}\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
        7. Simplified63.0%

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

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

            \[\leadsto \color{blue}{\left(x1 \cdot {x2}^{2}\right) \cdot 8} \]
          2. associate-*l*N/A

            \[\leadsto \color{blue}{x1 \cdot \left({x2}^{2} \cdot 8\right)} \]
          3. *-commutativeN/A

            \[\leadsto x1 \cdot \color{blue}{\left(8 \cdot {x2}^{2}\right)} \]
          4. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{x1 \cdot \left(8 \cdot {x2}^{2}\right)} \]
          5. *-commutativeN/A

            \[\leadsto x1 \cdot \color{blue}{\left({x2}^{2} \cdot 8\right)} \]
          6. unpow2N/A

            \[\leadsto x1 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot 8\right) \]
          7. associate-*l*N/A

            \[\leadsto x1 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot 8\right)\right)} \]
          8. *-commutativeN/A

            \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(8 \cdot x2\right)}\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x1 \cdot \color{blue}{\left(x2 \cdot \left(8 \cdot x2\right)\right)} \]
          10. *-commutativeN/A

            \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
          11. *-lowering-*.f6463.0

            \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
        10. Simplified63.0%

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

        if -3.99999999999999995e255 < (+.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)))))) < 1e251

        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. Simplified75.4%

          \[\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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
        5. Taylor expanded in x2 around 0

          \[\leadsto x1 + \mathsf{fma}\left(x1, \color{blue}{9 \cdot x1 - 2}, x2 \cdot -6\right) \]
        6. Step-by-step derivation
          1. sub-negN/A

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

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

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

            \[\leadsto x1 + \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 9, -2\right)}, x2 \cdot -6\right) \]
        7. Simplified73.7%

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

        if 1e251 < (+.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.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}{\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. Simplified46.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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
        5. Taylor expanded in x2 around inf

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

            \[\leadsto x1 + \color{blue}{\left(x1 \cdot {x2}^{2}\right) \cdot 8} \]
          2. associate-*l*N/A

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

            \[\leadsto x1 + x1 \cdot \color{blue}{\left(8 \cdot {x2}^{2}\right)} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x1 + \color{blue}{x1 \cdot \left(8 \cdot {x2}^{2}\right)} \]
          5. *-commutativeN/A

            \[\leadsto x1 + x1 \cdot \color{blue}{\left({x2}^{2} \cdot 8\right)} \]
          6. unpow2N/A

            \[\leadsto x1 + x1 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot 8\right) \]
          7. associate-*l*N/A

            \[\leadsto x1 + x1 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot 8\right)\right)} \]
          8. *-commutativeN/A

            \[\leadsto x1 + x1 \cdot \left(x2 \cdot \color{blue}{\left(8 \cdot x2\right)}\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x1 + x1 \cdot \color{blue}{\left(x2 \cdot \left(8 \cdot x2\right)\right)} \]
          10. *-commutativeN/A

            \[\leadsto x1 + x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
          11. *-lowering-*.f6445.2

            \[\leadsto x1 + x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
        7. Simplified45.2%

          \[\leadsto x1 + \color{blue}{x1 \cdot \left(x2 \cdot \left(x2 \cdot 8\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. Simplified66.6%

          \[\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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
        5. Taylor expanded in x2 around 0

          \[\leadsto x1 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 2\right)} \]
        6. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto x1 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 2\right)} \]
          2. sub-negN/A

            \[\leadsto x1 + x1 \cdot \color{blue}{\left(9 \cdot x1 + \left(\mathsf{neg}\left(2\right)\right)\right)} \]
          3. *-commutativeN/A

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

            \[\leadsto x1 + x1 \cdot \left(x1 \cdot 9 + \color{blue}{-2}\right) \]
          5. accelerator-lowering-fma.f6491.0

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

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

      Alternative 3: 73.7% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot \left(x2 \cdot \left(x2 \cdot 8\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 -4 \cdot 10^{+255}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_4 \leq 10^{+251}:\\ \;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, -6\right), -x1\right)\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;x1 + t\_1\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\\ \end{array} \end{array} \]
      (FPCore (x1 x2)
       :precision binary64
       (let* ((t_0 (* x1 (* x1 3.0)))
              (t_1 (* x1 (* x2 (* x2 8.0))))
              (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 -4e+255)
           t_1
           (if (<= t_4 1e+251)
             (fma x2 (fma x1 -12.0 -6.0) (- x1))
             (if (<= t_4 INFINITY) (+ x1 t_1) (+ x1 (* x1 (fma x1 9.0 -2.0))))))))
      double code(double x1, double x2) {
      	double t_0 = x1 * (x1 * 3.0);
      	double t_1 = x1 * (x2 * (x2 * 8.0));
      	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 <= -4e+255) {
      		tmp = t_1;
      	} else if (t_4 <= 1e+251) {
      		tmp = fma(x2, fma(x1, -12.0, -6.0), -x1);
      	} else if (t_4 <= ((double) INFINITY)) {
      		tmp = x1 + t_1;
      	} else {
      		tmp = x1 + (x1 * fma(x1, 9.0, -2.0));
      	}
      	return tmp;
      }
      
      function code(x1, x2)
      	t_0 = Float64(x1 * Float64(x1 * 3.0))
      	t_1 = Float64(x1 * Float64(x2 * Float64(x2 * 8.0)))
      	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 <= -4e+255)
      		tmp = t_1;
      	elseif (t_4 <= 1e+251)
      		tmp = fma(x2, fma(x1, -12.0, -6.0), Float64(-x1));
      	elseif (t_4 <= Inf)
      		tmp = Float64(x1 + t_1);
      	else
      		tmp = Float64(x1 + Float64(x1 * fma(x1, 9.0, -2.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[(x2 * N[(x2 * 8.0), $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, -4e+255], t$95$1, If[LessEqual[t$95$4, 1e+251], N[(x2 * N[(x1 * -12.0 + -6.0), $MachinePrecision] + (-x1)), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(x1 + t$95$1), $MachinePrecision], N[(x1 + N[(x1 * N[(x1 * 9.0 + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
      t_1 := x1 \cdot \left(x2 \cdot \left(x2 \cdot 8\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 -4 \cdot 10^{+255}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_4 \leq 10^{+251}:\\
      \;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, -6\right), -x1\right)\\
      
      \mathbf{elif}\;t\_4 \leq \infty:\\
      \;\;\;\;x1 + t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;x1 + x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -3.99999999999999995e255

        1. Initial program 99.8%

          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in x1 around 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 \color{blue}{3}\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) \]
        4. Step-by-step derivation
          1. Simplified99.8%

            \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
          3. Step-by-step derivation
            1. mul-1-negN/A

              \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
            2. unsub-negN/A

              \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
            3. --lowering--.f64N/A

              \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
            4. *-commutativeN/A

              \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
            5. *-lowering-*.f6499.8

              \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
          4. Simplified99.8%

            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
          5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

              \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
            10. accelerator-lowering-fma.f6463.0

              \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \color{blue}{\mathsf{fma}\left(x2, 2, -3\right)}\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
          7. Simplified63.0%

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

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

              \[\leadsto \color{blue}{\left(x1 \cdot {x2}^{2}\right) \cdot 8} \]
            2. associate-*l*N/A

              \[\leadsto \color{blue}{x1 \cdot \left({x2}^{2} \cdot 8\right)} \]
            3. *-commutativeN/A

              \[\leadsto x1 \cdot \color{blue}{\left(8 \cdot {x2}^{2}\right)} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{x1 \cdot \left(8 \cdot {x2}^{2}\right)} \]
            5. *-commutativeN/A

              \[\leadsto x1 \cdot \color{blue}{\left({x2}^{2} \cdot 8\right)} \]
            6. unpow2N/A

              \[\leadsto x1 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot 8\right) \]
            7. associate-*l*N/A

              \[\leadsto x1 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot 8\right)\right)} \]
            8. *-commutativeN/A

              \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(8 \cdot x2\right)}\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto x1 \cdot \color{blue}{\left(x2 \cdot \left(8 \cdot x2\right)\right)} \]
            10. *-commutativeN/A

              \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
            11. *-lowering-*.f6463.0

              \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
          10. Simplified63.0%

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

          if -3.99999999999999995e255 < (+.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)))))) < 1e251

          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 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 \color{blue}{3}\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) \]
          4. Step-by-step derivation
            1. Simplified97.9%

              \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

              \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
            3. Step-by-step derivation
              1. mul-1-negN/A

                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
              2. unsub-negN/A

                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
              3. --lowering--.f64N/A

                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
              4. *-commutativeN/A

                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
              5. *-lowering-*.f6499.3

                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
            4. Simplified99.3%

              \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
            5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

                \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
              10. accelerator-lowering-fma.f6473.9

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

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

              \[\leadsto \color{blue}{-3 \cdot x1 + \left(2 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right)\right)} \]
            9. Step-by-step derivation
              1. associate-+r+N/A

                \[\leadsto \color{blue}{\left(-3 \cdot x1 + 2 \cdot x1\right) + x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
              2. distribute-rgt-outN/A

                \[\leadsto \color{blue}{x1 \cdot \left(-3 + 2\right)} + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
              3. metadata-evalN/A

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

                \[\leadsto \color{blue}{-1 \cdot x1} + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
              5. +-commutativeN/A

                \[\leadsto \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right) + -1 \cdot x1} \]
              6. accelerator-lowering-fma.f64N/A

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

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

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

                \[\leadsto \mathsf{fma}\left(x2, x1 \cdot -12 + \color{blue}{-6}, -1 \cdot x1\right) \]
              10. accelerator-lowering-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(x2, \color{blue}{\mathsf{fma}\left(x1, -12, -6\right)}, -1 \cdot x1\right) \]
              11. mul-1-negN/A

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

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

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

            if 1e251 < (+.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.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}{\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. Simplified46.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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
            5. Taylor expanded in x2 around inf

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

                \[\leadsto x1 + \color{blue}{\left(x1 \cdot {x2}^{2}\right) \cdot 8} \]
              2. associate-*l*N/A

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

                \[\leadsto x1 + x1 \cdot \color{blue}{\left(8 \cdot {x2}^{2}\right)} \]
              4. *-lowering-*.f64N/A

                \[\leadsto x1 + \color{blue}{x1 \cdot \left(8 \cdot {x2}^{2}\right)} \]
              5. *-commutativeN/A

                \[\leadsto x1 + x1 \cdot \color{blue}{\left({x2}^{2} \cdot 8\right)} \]
              6. unpow2N/A

                \[\leadsto x1 + x1 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot 8\right) \]
              7. associate-*l*N/A

                \[\leadsto x1 + x1 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot 8\right)\right)} \]
              8. *-commutativeN/A

                \[\leadsto x1 + x1 \cdot \left(x2 \cdot \color{blue}{\left(8 \cdot x2\right)}\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto x1 + x1 \cdot \color{blue}{\left(x2 \cdot \left(8 \cdot x2\right)\right)} \]
              10. *-commutativeN/A

                \[\leadsto x1 + x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
              11. *-lowering-*.f6445.2

                \[\leadsto x1 + x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
            7. Simplified45.2%

              \[\leadsto x1 + \color{blue}{x1 \cdot \left(x2 \cdot \left(x2 \cdot 8\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. Simplified66.6%

              \[\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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
            5. Taylor expanded in x2 around 0

              \[\leadsto x1 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 2\right)} \]
            6. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto x1 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 2\right)} \]
              2. sub-negN/A

                \[\leadsto x1 + x1 \cdot \color{blue}{\left(9 \cdot x1 + \left(\mathsf{neg}\left(2\right)\right)\right)} \]
              3. *-commutativeN/A

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

                \[\leadsto x1 + x1 \cdot \left(x1 \cdot 9 + \color{blue}{-2}\right) \]
              5. accelerator-lowering-fma.f6491.0

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

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

          Alternative 4: 73.7% accurate, 0.3× speedup?

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

            1. Initial program 99.8%

              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
            2. Add Preprocessing
            3. Taylor expanded in x1 around 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 \color{blue}{3}\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) \]
            4. Step-by-step derivation
              1. Simplified99.8%

                \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
              3. Step-by-step derivation
                1. mul-1-negN/A

                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                2. unsub-negN/A

                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                3. --lowering--.f64N/A

                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                4. *-commutativeN/A

                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                5. *-lowering-*.f6499.8

                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
              4. Simplified99.8%

                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
              5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

                  \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                10. accelerator-lowering-fma.f6450.2

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

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

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

                  \[\leadsto \color{blue}{\left(x1 \cdot {x2}^{2}\right) \cdot 8} \]
                2. associate-*l*N/A

                  \[\leadsto \color{blue}{x1 \cdot \left({x2}^{2} \cdot 8\right)} \]
                3. *-commutativeN/A

                  \[\leadsto x1 \cdot \color{blue}{\left(8 \cdot {x2}^{2}\right)} \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \color{blue}{x1 \cdot \left(8 \cdot {x2}^{2}\right)} \]
                5. *-commutativeN/A

                  \[\leadsto x1 \cdot \color{blue}{\left({x2}^{2} \cdot 8\right)} \]
                6. unpow2N/A

                  \[\leadsto x1 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot 8\right) \]
                7. associate-*l*N/A

                  \[\leadsto x1 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot 8\right)\right)} \]
                8. *-commutativeN/A

                  \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(8 \cdot x2\right)}\right) \]
                9. *-lowering-*.f64N/A

                  \[\leadsto x1 \cdot \color{blue}{\left(x2 \cdot \left(8 \cdot x2\right)\right)} \]
                10. *-commutativeN/A

                  \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
                11. *-lowering-*.f6450.1

                  \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
              10. Simplified50.1%

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

              if -3.99999999999999995e255 < (+.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)))))) < 1e251

              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 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 \color{blue}{3}\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) \]
              4. Step-by-step derivation
                1. Simplified97.9%

                  \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                3. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                  2. unsub-negN/A

                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                  3. --lowering--.f64N/A

                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                  4. *-commutativeN/A

                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                  5. *-lowering-*.f6499.3

                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                4. Simplified99.3%

                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
                5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

                    \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                  10. accelerator-lowering-fma.f6473.9

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

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

                  \[\leadsto \color{blue}{-3 \cdot x1 + \left(2 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right)\right)} \]
                9. Step-by-step derivation
                  1. associate-+r+N/A

                    \[\leadsto \color{blue}{\left(-3 \cdot x1 + 2 \cdot x1\right) + x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                  2. distribute-rgt-outN/A

                    \[\leadsto \color{blue}{x1 \cdot \left(-3 + 2\right)} + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                  3. metadata-evalN/A

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

                    \[\leadsto \color{blue}{-1 \cdot x1} + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                  5. +-commutativeN/A

                    \[\leadsto \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right) + -1 \cdot x1} \]
                  6. accelerator-lowering-fma.f64N/A

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

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

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

                    \[\leadsto \mathsf{fma}\left(x2, x1 \cdot -12 + \color{blue}{-6}, -1 \cdot x1\right) \]
                  10. accelerator-lowering-fma.f64N/A

                    \[\leadsto \mathsf{fma}\left(x2, \color{blue}{\mathsf{fma}\left(x1, -12, -6\right)}, -1 \cdot x1\right) \]
                  11. mul-1-negN/A

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

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

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

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

                1. Initial program 0.0%

                  \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in x1 around 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. Simplified66.6%

                  \[\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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                5. Taylor expanded in x2 around 0

                  \[\leadsto x1 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 2\right)} \]
                6. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto x1 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 2\right)} \]
                  2. sub-negN/A

                    \[\leadsto x1 + x1 \cdot \color{blue}{\left(9 \cdot x1 + \left(\mathsf{neg}\left(2\right)\right)\right)} \]
                  3. *-commutativeN/A

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

                    \[\leadsto x1 + x1 \cdot \left(x1 \cdot 9 + \color{blue}{-2}\right) \]
                  5. accelerator-lowering-fma.f6491.0

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

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

              Alternative 5: 63.8% accurate, 0.9× 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}\\ \mathbf{if}\;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) \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, -6\right), -x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\\ \end{array} \end{array} \]
              (FPCore (x1 x2)
               :precision binary64
               (let* ((t_0 (* x1 (* x1 3.0)))
                      (t_1 (+ (* x1 x1) 1.0))
                      (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
                 (if (<=
                      (+
                       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))))
                      INFINITY)
                   (fma x2 (fma x1 -12.0 -6.0) (- x1))
                   (+ x1 (* x1 (fma x1 9.0 -2.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 tmp;
              	if ((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) INFINITY)) {
              		tmp = fma(x2, fma(x1, -12.0, -6.0), -x1);
              	} else {
              		tmp = x1 + (x1 * fma(x1, 9.0, -2.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)
              	tmp = 0.0
              	if (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)))) <= Inf)
              		tmp = fma(x2, fma(x1, -12.0, -6.0), Float64(-x1));
              	else
              		tmp = Float64(x1 + Float64(x1 * fma(x1, 9.0, -2.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[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(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], Infinity], N[(x2 * N[(x1 * -12.0 + -6.0), $MachinePrecision] + (-x1)), $MachinePrecision], N[(x1 + N[(x1 * N[(x1 * 9.0 + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
              t_1 := x1 \cdot x1 + 1\\
              t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
              \mathbf{if}\;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) \leq \infty:\\
              \;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, -6\right), -x1\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;x1 + x1 \cdot \mathsf{fma}\left(x1, 9, -2\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.5%

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

                  \[\leadsto x1 + \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 \color{blue}{3}\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) \]
                4. Step-by-step derivation
                  1. Simplified98.5%

                    \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                  3. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                    2. unsub-negN/A

                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                    3. --lowering--.f64N/A

                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                    4. *-commutativeN/A

                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                    5. *-lowering-*.f6499.5

                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                  4. Simplified99.5%

                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
                  5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

                      \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                    10. accelerator-lowering-fma.f6466.3

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

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

                    \[\leadsto \color{blue}{-3 \cdot x1 + \left(2 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right)\right)} \]
                  9. Step-by-step derivation
                    1. associate-+r+N/A

                      \[\leadsto \color{blue}{\left(-3 \cdot x1 + 2 \cdot x1\right) + x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                    2. distribute-rgt-outN/A

                      \[\leadsto \color{blue}{x1 \cdot \left(-3 + 2\right)} + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                    3. metadata-evalN/A

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

                      \[\leadsto \color{blue}{-1 \cdot x1} + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                    5. +-commutativeN/A

                      \[\leadsto \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right) + -1 \cdot x1} \]
                    6. accelerator-lowering-fma.f64N/A

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

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

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

                      \[\leadsto \mathsf{fma}\left(x2, x1 \cdot -12 + \color{blue}{-6}, -1 \cdot x1\right) \]
                    10. accelerator-lowering-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(x2, \color{blue}{\mathsf{fma}\left(x1, -12, -6\right)}, -1 \cdot x1\right) \]
                    11. mul-1-negN/A

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

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

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

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

                  1. Initial program 0.0%

                    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in x1 around 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. Simplified66.6%

                    \[\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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                  5. Taylor expanded in x2 around 0

                    \[\leadsto x1 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 2\right)} \]
                  6. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto x1 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 2\right)} \]
                    2. sub-negN/A

                      \[\leadsto x1 + x1 \cdot \color{blue}{\left(9 \cdot x1 + \left(\mathsf{neg}\left(2\right)\right)\right)} \]
                    3. *-commutativeN/A

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

                      \[\leadsto x1 + x1 \cdot \left(x1 \cdot 9 + \color{blue}{-2}\right) \]
                    5. accelerator-lowering-fma.f6491.0

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

                    \[\leadsto x1 + \color{blue}{x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)} \]
                5. Recombined 2 regimes into one program.
                6. Final simplification61.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:\\ \;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, -6\right), -x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\\ \end{array} \]
                7. Add Preprocessing

                Alternative 6: 96.1% accurate, 1.6× speedup?

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

                  1. Initial program 36.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}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{2 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
                  4. Step-by-step derivation
                    1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                  if -5800 < x1 < 2100

                  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}{\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. Simplified86.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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                  5. Taylor expanded in x2 around 0

                    \[\leadsto x1 + \color{blue}{\left(x1 \cdot \left(9 \cdot x1 - 2\right) + 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. +-commutativeN/A

                      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6\right) + x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                    2. accelerator-lowering-fma.f64N/A

                      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x2, \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6, x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                    3. associate--l+N/A

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

                      \[\leadsto x1 + \mathsf{fma}\left(x2, \color{blue}{\left(x1 \cdot x2\right) \cdot 8} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    5. associate-*l*N/A

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

                      \[\leadsto x1 + \mathsf{fma}\left(x2, x1 \cdot \color{blue}{\left(8 \cdot x2\right)} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    7. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

                      \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, x1 \cdot 12 + \color{blue}{-12}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    16. accelerator-lowering-fma.f64N/A

                      \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 12, -12\right)}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    17. *-lowering-*.f64N/A

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

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

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

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

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

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

                  if 2100 < x1

                  1. Initial program 56.4%

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

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

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

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

                      \[\leadsto x1 + {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 + {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. --lowering--.f64N/A

                      \[\leadsto x1 + {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. /-lowering-/.f64N/A

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

                    \[\leadsto x1 + \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)} \]
                3. Recombined 3 regimes into one program.
                4. Final simplification98.2%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5800:\\ \;\;\;\;x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right) - \frac{\mathsf{fma}\left(x2, 2, -3\right) \cdot -6}{x1}}{x1} - 3}{x1}\right)\\ \mathbf{elif}\;x1 \leq 2100:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 12, -12\right), -6\right)\right), x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + {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 7: 96.1% accurate, 1.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + {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 -8500:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 2100000:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 12, -12\right), -6\right)\right), x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                (FPCore (x1 x2)
                 :precision binary64
                 (let* ((t_0
                         (+
                          x1
                          (*
                           (pow x1 4.0)
                           (+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1))))))
                   (if (<= x1 -8500.0)
                     t_0
                     (if (<= x1 2100000.0)
                       (+
                        x1
                        (fma
                         x2
                         (fma x1 (* x2 8.0) (fma x1 (fma x1 12.0 -12.0) -6.0))
                         (* x1 (fma x1 9.0 -2.0))))
                       t_0))))
                double code(double x1, double x2) {
                	double t_0 = x1 + (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 <= -8500.0) {
                		tmp = t_0;
                	} else if (x1 <= 2100000.0) {
                		tmp = x1 + fma(x2, fma(x1, (x2 * 8.0), fma(x1, fma(x1, 12.0, -12.0), -6.0)), (x1 * fma(x1, 9.0, -2.0)));
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                function code(x1, x2)
                	t_0 = Float64(x1 + 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 <= -8500.0)
                		tmp = t_0;
                	elseif (x1 <= 2100000.0)
                		tmp = Float64(x1 + fma(x2, fma(x1, Float64(x2 * 8.0), fma(x1, fma(x1, 12.0, -12.0), -6.0)), Float64(x1 * fma(x1, 9.0, -2.0))));
                	else
                		tmp = t_0;
                	end
                	return tmp
                end
                
                code[x1_, x2_] := Block[{t$95$0 = N[(x1 + 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]), $MachinePrecision]}, If[LessEqual[x1, -8500.0], t$95$0, If[LessEqual[x1, 2100000.0], N[(x1 + N[(x2 * N[(x1 * N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(x1 * 12.0 + -12.0), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := x1 + {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 -8500:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;x1 \leq 2100000:\\
                \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 12, -12\right), -6\right)\right), x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x1 < -8500 or 2.1e6 < x1

                  1. Initial program 46.8%

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

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

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

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

                      \[\leadsto x1 + {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 + {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. --lowering--.f64N/A

                      \[\leadsto x1 + {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. /-lowering-/.f64N/A

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

                    \[\leadsto x1 + \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 -8500 < x1 < 2.1e6

                  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}{\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. Simplified86.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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                  5. Taylor expanded in x2 around 0

                    \[\leadsto x1 + \color{blue}{\left(x1 \cdot \left(9 \cdot x1 - 2\right) + 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. +-commutativeN/A

                      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6\right) + x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                    2. accelerator-lowering-fma.f64N/A

                      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x2, \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6, x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                    3. associate--l+N/A

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

                      \[\leadsto x1 + \mathsf{fma}\left(x2, \color{blue}{\left(x1 \cdot x2\right) \cdot 8} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    5. associate-*l*N/A

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

                      \[\leadsto x1 + \mathsf{fma}\left(x2, x1 \cdot \color{blue}{\left(8 \cdot x2\right)} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    7. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

                      \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, x1 \cdot 12 + \color{blue}{-12}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    16. accelerator-lowering-fma.f64N/A

                      \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 12, -12\right)}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    17. *-lowering-*.f64N/A

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -8500:\\ \;\;\;\;x1 + {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 2100000:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 12, -12\right), -6\right)\right), x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + {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 8: 94.9% accurate, 2.3× speedup?

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

                  1. Initial program 36.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}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{x1}\right)} \]
                  4. Step-by-step derivation
                    1. *-lowering-*.f64N/A

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

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

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

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

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

                      \[\leadsto x1 + {x1}^{4} \cdot \left(6 + \left(\mathsf{neg}\left(\frac{\color{blue}{3}}{x1}\right)\right)\right) \]
                    7. distribute-neg-fracN/A

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

                      \[\leadsto x1 + {x1}^{4} \cdot \left(6 + \color{blue}{\frac{\mathsf{neg}\left(3\right)}{x1}}\right) \]
                    9. metadata-eval93.1

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

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

                  if -5600 < x1 < 3e4

                  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}{\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. Simplified86.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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                  5. Taylor expanded in x2 around 0

                    \[\leadsto x1 + \color{blue}{\left(x1 \cdot \left(9 \cdot x1 - 2\right) + 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. +-commutativeN/A

                      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6\right) + x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                    2. accelerator-lowering-fma.f64N/A

                      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x2, \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6, x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                    3. associate--l+N/A

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

                      \[\leadsto x1 + \mathsf{fma}\left(x2, \color{blue}{\left(x1 \cdot x2\right) \cdot 8} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    5. associate-*l*N/A

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

                      \[\leadsto x1 + \mathsf{fma}\left(x2, x1 \cdot \color{blue}{\left(8 \cdot x2\right)} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    7. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

                      \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, x1 \cdot 12 + \color{blue}{-12}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    16. accelerator-lowering-fma.f64N/A

                      \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 12, -12\right)}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                    17. *-lowering-*.f64N/A

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

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

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

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

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

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

                  if 3e4 < x1

                  1. Initial program 56.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 \color{blue}{3}\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) \]
                  4. Step-by-step derivation
                    1. Simplified56.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 \color{blue}{3}\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. Taylor expanded in x1 around -inf

                      \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left({x1}^{2} \cdot \left(6 + -1 \cdot \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)\right)} \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                    3. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left({x1}^{2} \cdot \left(6 + -1 \cdot \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)\right)} \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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. unpow2N/A

                        \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(6 + -1 \cdot \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(6 + -1 \cdot \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                      4. mul-1-negN/A

                        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + \color{blue}{\left(\mathsf{neg}\left(\frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)\right)}\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                      5. unsub-negN/A

                        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(6 - \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                      6. --lowering--.f64N/A

                        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(6 - \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                      7. /-lowering-/.f64N/A

                        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 - \color{blue}{\frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}}\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                    4. Simplified52.5%

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

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

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

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

                    Alternative 9: 94.8% accurate, 2.5× speedup?

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

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

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

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

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

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

                          \[\leadsto \color{blue}{6 \cdot {x1}^{4}} \]
                        2. pow-lowering-pow.f6492.0

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

                        \[\leadsto \color{blue}{6 \cdot {x1}^{4}} \]

                      if -1550 < x1 < 2300

                      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}{\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. Simplified86.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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                      5. Taylor expanded in x2 around 0

                        \[\leadsto x1 + \color{blue}{\left(x1 \cdot \left(9 \cdot x1 - 2\right) + 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. +-commutativeN/A

                          \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6\right) + x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                        2. accelerator-lowering-fma.f64N/A

                          \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x2, \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6, x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                        3. associate--l+N/A

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

                          \[\leadsto x1 + \mathsf{fma}\left(x2, \color{blue}{\left(x1 \cdot x2\right) \cdot 8} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                        5. associate-*l*N/A

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

                          \[\leadsto x1 + \mathsf{fma}\left(x2, x1 \cdot \color{blue}{\left(8 \cdot x2\right)} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                        7. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

                          \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, x1 \cdot 12 + \color{blue}{-12}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                        16. accelerator-lowering-fma.f64N/A

                          \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 12, -12\right)}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                        17. *-lowering-*.f64N/A

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

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

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

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

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

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

                      if 2300 < x1

                      1. Initial program 56.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 \color{blue}{3}\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) \]
                      4. Step-by-step derivation
                        1. Simplified56.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 \color{blue}{3}\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. Taylor expanded in x1 around -inf

                          \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left({x1}^{2} \cdot \left(6 + -1 \cdot \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)\right)} \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                        3. Step-by-step derivation
                          1. *-lowering-*.f64N/A

                            \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left({x1}^{2} \cdot \left(6 + -1 \cdot \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)\right)} \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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. unpow2N/A

                            \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(6 + -1 \cdot \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                          3. *-lowering-*.f64N/A

                            \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(6 + -1 \cdot \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                          4. mul-1-negN/A

                            \[\leadsto x1 + \left(\left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + \color{blue}{\left(\mathsf{neg}\left(\frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)\right)}\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                          5. unsub-negN/A

                            \[\leadsto x1 + \left(\left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(6 - \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                          6. --lowering--.f64N/A

                            \[\leadsto x1 + \left(\left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(6 - \frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}\right)}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                          7. /-lowering-/.f64N/A

                            \[\leadsto x1 + \left(\left(\left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 - \color{blue}{\frac{4 + -1 \cdot \frac{4 \cdot \left(2 \cdot x2 - 3\right) - 6}{x1}}{x1}}\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\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) \]
                        4. Simplified52.5%

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

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

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

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

                        Alternative 10: 93.9% accurate, 2.6× speedup?

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

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

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

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

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

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

                              \[\leadsto \color{blue}{6 \cdot {x1}^{4}} \]
                            2. pow-lowering-pow.f6492.0

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

                            \[\leadsto \color{blue}{6 \cdot {x1}^{4}} \]

                          if -54000 < x1 < 3200

                          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}{\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. Simplified86.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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                          5. Taylor expanded in x2 around 0

                            \[\leadsto x1 + \color{blue}{\left(x1 \cdot \left(9 \cdot x1 - 2\right) + 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. +-commutativeN/A

                              \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6\right) + x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                            2. accelerator-lowering-fma.f64N/A

                              \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x2, \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6, x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                            3. associate--l+N/A

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

                              \[\leadsto x1 + \mathsf{fma}\left(x2, \color{blue}{\left(x1 \cdot x2\right) \cdot 8} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                            5. associate-*l*N/A

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

                              \[\leadsto x1 + \mathsf{fma}\left(x2, x1 \cdot \color{blue}{\left(8 \cdot x2\right)} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                            7. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

                              \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, x1 \cdot 12 + \color{blue}{-12}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                            16. accelerator-lowering-fma.f64N/A

                              \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 12, -12\right)}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                            17. *-lowering-*.f64N/A

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

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

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

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

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

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

                          if 3200 < x1

                          1. Initial program 56.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 \color{blue}{3}\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) \]
                          4. Step-by-step derivation
                            1. Simplified56.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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                              \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                            3. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                              2. unsub-negN/A

                                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                              3. --lowering--.f64N/A

                                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                              4. *-commutativeN/A

                                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                              5. *-lowering-*.f6456.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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                            4. Simplified56.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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
                            5. Taylor expanded in x1 around inf

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto x1 + \left(\left(\left(\left(\left(x1 \cdot \left(x1 \cdot \left(6 + \frac{\color{blue}{-4}}{x1}\right)\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                              11. /-lowering-/.f6490.1

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

                              \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left(x1 \cdot \left(x1 \cdot \left(6 + \frac{-4}{x1}\right)\right)\right)} \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                          5. Recombined 3 regimes into one program.
                          6. Final simplification95.1%

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

                          Alternative 11: 93.9% accurate, 2.9× speedup?

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

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

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

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

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

                                \[\leadsto x1 + 6 \cdot {x1}^{\color{blue}{\left(2 + 2\right)}} \]
                              2. pow-prod-upN/A

                                \[\leadsto x1 + 6 \cdot \color{blue}{\left({x1}^{2} \cdot {x1}^{2}\right)} \]
                              3. pow2N/A

                                \[\leadsto x1 + 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot {x1}^{2}\right) \]
                              4. pow2N/A

                                \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                              5. *-lowering-*.f64N/A

                                \[\leadsto x1 + 6 \cdot \color{blue}{\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)} \]
                              6. *-lowering-*.f64N/A

                                \[\leadsto x1 + 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(x1 \cdot x1\right)\right) \]
                              7. *-lowering-*.f6491.9

                                \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                            7. Applied egg-rr91.9%

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

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

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

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

                                \[\leadsto \color{blue}{\left(\left(x1 \cdot x1\right) \cdot x1\right) \cdot \left(x1 \cdot 6\right)} + x1 \]
                              5. accelerator-lowering-fma.f64N/A

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x1 \cdot x1\right) \cdot x1, x1 \cdot 6, x1\right)} \]
                              6. associate-*l*N/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot \left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                              7. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot \left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                              8. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{fma}\left(x1 \cdot \color{blue}{\left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                              9. *-lowering-*.f6491.9

                                \[\leadsto \mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), \color{blue}{x1 \cdot 6}, x1\right) \]
                            9. Applied egg-rr91.9%

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

                            if -72000 < x1 < 25000

                            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}{\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. Simplified86.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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                            5. Taylor expanded in x2 around 0

                              \[\leadsto x1 + \color{blue}{\left(x1 \cdot \left(9 \cdot x1 - 2\right) + 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. +-commutativeN/A

                                \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6\right) + x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                              2. accelerator-lowering-fma.f64N/A

                                \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x2, \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6, x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                              3. associate--l+N/A

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

                                \[\leadsto x1 + \mathsf{fma}\left(x2, \color{blue}{\left(x1 \cdot x2\right) \cdot 8} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                              5. associate-*l*N/A

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

                                \[\leadsto x1 + \mathsf{fma}\left(x2, x1 \cdot \color{blue}{\left(8 \cdot x2\right)} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                              7. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

                                \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, x1 \cdot 12 + \color{blue}{-12}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                              16. accelerator-lowering-fma.f64N/A

                                \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 12, -12\right)}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                              17. *-lowering-*.f64N/A

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

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

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

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

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

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

                            if 25000 < x1

                            1. Initial program 56.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 \color{blue}{3}\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) \]
                            4. Step-by-step derivation
                              1. Simplified56.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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                                \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                              3. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                                2. unsub-negN/A

                                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                3. --lowering--.f64N/A

                                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                4. *-commutativeN/A

                                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                5. *-lowering-*.f6456.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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                              4. Simplified56.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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
                              5. Taylor expanded in x1 around inf

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto x1 + \left(\left(\left(\left(\left(x1 \cdot \left(x1 \cdot \left(6 + \frac{\color{blue}{-4}}{x1}\right)\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                                11. /-lowering-/.f6490.1

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

                                \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left(x1 \cdot \left(x1 \cdot \left(6 + \frac{-4}{x1}\right)\right)\right)} \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                            5. Recombined 3 regimes into one program.
                            6. Final simplification95.1%

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

                            Alternative 12: 93.9% accurate, 5.3× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), x1 \cdot 6, x1\right)\\ \mathbf{if}\;x1 \leq -70000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 340000:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 12, -12\right), -6\right)\right), x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                            (FPCore (x1 x2)
                             :precision binary64
                             (let* ((t_0 (fma (* x1 (* x1 x1)) (* x1 6.0) x1)))
                               (if (<= x1 -70000.0)
                                 t_0
                                 (if (<= x1 340000.0)
                                   (+
                                    x1
                                    (fma
                                     x2
                                     (fma x1 (* x2 8.0) (fma x1 (fma x1 12.0 -12.0) -6.0))
                                     (* x1 (fma x1 9.0 -2.0))))
                                   t_0))))
                            double code(double x1, double x2) {
                            	double t_0 = fma((x1 * (x1 * x1)), (x1 * 6.0), x1);
                            	double tmp;
                            	if (x1 <= -70000.0) {
                            		tmp = t_0;
                            	} else if (x1 <= 340000.0) {
                            		tmp = x1 + fma(x2, fma(x1, (x2 * 8.0), fma(x1, fma(x1, 12.0, -12.0), -6.0)), (x1 * fma(x1, 9.0, -2.0)));
                            	} else {
                            		tmp = t_0;
                            	}
                            	return tmp;
                            }
                            
                            function code(x1, x2)
                            	t_0 = fma(Float64(x1 * Float64(x1 * x1)), Float64(x1 * 6.0), x1)
                            	tmp = 0.0
                            	if (x1 <= -70000.0)
                            		tmp = t_0;
                            	elseif (x1 <= 340000.0)
                            		tmp = Float64(x1 + fma(x2, fma(x1, Float64(x2 * 8.0), fma(x1, fma(x1, 12.0, -12.0), -6.0)), Float64(x1 * fma(x1, 9.0, -2.0))));
                            	else
                            		tmp = t_0;
                            	end
                            	return tmp
                            end
                            
                            code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * 6.0), $MachinePrecision] + x1), $MachinePrecision]}, If[LessEqual[x1, -70000.0], t$95$0, If[LessEqual[x1, 340000.0], N[(x1 + N[(x2 * N[(x1 * N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(x1 * 12.0 + -12.0), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_0 := \mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), x1 \cdot 6, x1\right)\\
                            \mathbf{if}\;x1 \leq -70000:\\
                            \;\;\;\;t\_0\\
                            
                            \mathbf{elif}\;x1 \leq 340000:\\
                            \;\;\;\;x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 12, -12\right), -6\right)\right), x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_0\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if x1 < -7e4 or 3.4e5 < x1

                              1. Initial program 46.8%

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

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

                                  \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                2. pow-lowering-pow.f6490.7

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

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

                                  \[\leadsto x1 + 6 \cdot {x1}^{\color{blue}{\left(2 + 2\right)}} \]
                                2. pow-prod-upN/A

                                  \[\leadsto x1 + 6 \cdot \color{blue}{\left({x1}^{2} \cdot {x1}^{2}\right)} \]
                                3. pow2N/A

                                  \[\leadsto x1 + 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot {x1}^{2}\right) \]
                                4. pow2N/A

                                  \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                                5. *-lowering-*.f64N/A

                                  \[\leadsto x1 + 6 \cdot \color{blue}{\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)} \]
                                6. *-lowering-*.f64N/A

                                  \[\leadsto x1 + 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(x1 \cdot x1\right)\right) \]
                                7. *-lowering-*.f6490.6

                                  \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                              7. Applied egg-rr90.6%

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

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

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

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

                                  \[\leadsto \color{blue}{\left(\left(x1 \cdot x1\right) \cdot x1\right) \cdot \left(x1 \cdot 6\right)} + x1 \]
                                5. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x1 \cdot x1\right) \cdot x1, x1 \cdot 6, x1\right)} \]
                                6. associate-*l*N/A

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot \left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                7. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot \left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                8. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(x1 \cdot \color{blue}{\left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                9. *-lowering-*.f6490.7

                                  \[\leadsto \mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), \color{blue}{x1 \cdot 6}, x1\right) \]
                              9. Applied egg-rr90.7%

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

                              if -7e4 < x1 < 3.4e5

                              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}{\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. Simplified86.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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                              5. Taylor expanded in x2 around 0

                                \[\leadsto x1 + \color{blue}{\left(x1 \cdot \left(9 \cdot x1 - 2\right) + 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. +-commutativeN/A

                                  \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6\right) + x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                                2. accelerator-lowering-fma.f64N/A

                                  \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(x2, \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(12 \cdot x1 - 12\right)\right) - 6, x1 \cdot \left(9 \cdot x1 - 2\right)\right)} \]
                                3. associate--l+N/A

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

                                  \[\leadsto x1 + \mathsf{fma}\left(x2, \color{blue}{\left(x1 \cdot x2\right) \cdot 8} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                                5. associate-*l*N/A

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

                                  \[\leadsto x1 + \mathsf{fma}\left(x2, x1 \cdot \color{blue}{\left(8 \cdot x2\right)} + \left(x1 \cdot \left(12 \cdot x1 - 12\right) - 6\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                                7. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

                                  \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, x1 \cdot 12 + \color{blue}{-12}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                                16. accelerator-lowering-fma.f64N/A

                                  \[\leadsto x1 + \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, x2 \cdot 8, \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 12, -12\right)}, -6\right)\right), x1 \cdot \left(9 \cdot x1 - 2\right)\right) \]
                                17. *-lowering-*.f64N/A

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

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

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

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

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

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

                            Alternative 13: 81.3% accurate, 6.9× speedup?

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

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

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

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

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

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

                                  \[\leadsto x1 + 6 \cdot {x1}^{\color{blue}{\left(2 + 2\right)}} \]
                                2. pow-prod-upN/A

                                  \[\leadsto x1 + 6 \cdot \color{blue}{\left({x1}^{2} \cdot {x1}^{2}\right)} \]
                                3. pow2N/A

                                  \[\leadsto x1 + 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot {x1}^{2}\right) \]
                                4. pow2N/A

                                  \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                                5. *-lowering-*.f64N/A

                                  \[\leadsto x1 + 6 \cdot \color{blue}{\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)} \]
                                6. *-lowering-*.f64N/A

                                  \[\leadsto x1 + 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(x1 \cdot x1\right)\right) \]
                                7. *-lowering-*.f6489.9

                                  \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                              7. Applied egg-rr89.9%

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

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

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

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

                                  \[\leadsto \color{blue}{\left(\left(x1 \cdot x1\right) \cdot x1\right) \cdot \left(x1 \cdot 6\right)} + x1 \]
                                5. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x1 \cdot x1\right) \cdot x1, x1 \cdot 6, x1\right)} \]
                                6. associate-*l*N/A

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot \left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                7. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot \left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                8. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(x1 \cdot \color{blue}{\left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                9. *-lowering-*.f6489.9

                                  \[\leadsto \mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), \color{blue}{x1 \cdot 6}, x1\right) \]
                              9. Applied egg-rr89.9%

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

                              if -5.5 < x1 < 7.5000000000000006e-77

                              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}{\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. Simplified85.6%

                                \[\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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                              5. Taylor expanded in x2 around 0

                                \[\leadsto x1 + \mathsf{fma}\left(x1, \color{blue}{9 \cdot x1 - 2}, x2 \cdot -6\right) \]
                              6. Step-by-step derivation
                                1. sub-negN/A

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

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

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

                                  \[\leadsto x1 + \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 9, -2\right)}, x2 \cdot -6\right) \]
                              7. Simplified77.7%

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

                              if 7.5000000000000006e-77 < x1 < 1.75e9

                              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}{\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. Simplified89.6%

                                \[\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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                              5. Taylor expanded in x2 around inf

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

                                  \[\leadsto x1 + \mathsf{fma}\left(x1, \color{blue}{{x2}^{2} \cdot 8}, x2 \cdot -6\right) \]
                                2. unpow2N/A

                                  \[\leadsto x1 + \mathsf{fma}\left(x1, \color{blue}{\left(x2 \cdot x2\right)} \cdot 8, x2 \cdot -6\right) \]
                                3. associate-*l*N/A

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

                                  \[\leadsto x1 + \mathsf{fma}\left(x1, x2 \cdot \color{blue}{\left(8 \cdot x2\right)}, x2 \cdot -6\right) \]
                                5. *-lowering-*.f64N/A

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

                                  \[\leadsto x1 + \mathsf{fma}\left(x1, x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}, x2 \cdot -6\right) \]
                                7. *-lowering-*.f6473.2

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

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

                            Alternative 14: 80.6% accurate, 7.4× speedup?

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

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

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

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

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

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

                                  \[\leadsto x1 + 6 \cdot {x1}^{\color{blue}{\left(2 + 2\right)}} \]
                                2. pow-prod-upN/A

                                  \[\leadsto x1 + 6 \cdot \color{blue}{\left({x1}^{2} \cdot {x1}^{2}\right)} \]
                                3. pow2N/A

                                  \[\leadsto x1 + 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot {x1}^{2}\right) \]
                                4. pow2N/A

                                  \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                                5. *-lowering-*.f64N/A

                                  \[\leadsto x1 + 6 \cdot \color{blue}{\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)} \]
                                6. *-lowering-*.f64N/A

                                  \[\leadsto x1 + 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(x1 \cdot x1\right)\right) \]
                                7. *-lowering-*.f6489.9

                                  \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                              7. Applied egg-rr89.9%

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

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

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

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

                                  \[\leadsto \color{blue}{\left(\left(x1 \cdot x1\right) \cdot x1\right) \cdot \left(x1 \cdot 6\right)} + x1 \]
                                5. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x1 \cdot x1\right) \cdot x1, x1 \cdot 6, x1\right)} \]
                                6. associate-*l*N/A

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot \left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                7. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot \left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                8. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(x1 \cdot \color{blue}{\left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                9. *-lowering-*.f6489.9

                                  \[\leadsto \mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), \color{blue}{x1 \cdot 6}, x1\right) \]
                              9. Applied egg-rr89.9%

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

                              if -6.20000000000000018 < x1 < 2.42e-76

                              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}{\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. Simplified85.6%

                                \[\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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                              5. Taylor expanded in x2 around 0

                                \[\leadsto x1 + \mathsf{fma}\left(x1, \color{blue}{9 \cdot x1 - 2}, x2 \cdot -6\right) \]
                              6. Step-by-step derivation
                                1. sub-negN/A

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

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

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

                                  \[\leadsto x1 + \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 9, -2\right)}, x2 \cdot -6\right) \]
                              7. Simplified77.7%

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

                              if 2.42e-76 < x1 < 1.35e7

                              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 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 \color{blue}{3}\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) \]
                              4. Step-by-step derivation
                                1. Simplified99.6%

                                  \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                                3. Step-by-step derivation
                                  1. mul-1-negN/A

                                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                                  2. unsub-negN/A

                                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                  3. --lowering--.f64N/A

                                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                  4. *-commutativeN/A

                                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                  5. *-lowering-*.f6499.6

                                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                4. Simplified99.6%

                                  \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
                                5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

                                    \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                                  10. accelerator-lowering-fma.f6489.4

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

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

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

                                    \[\leadsto \color{blue}{\left(x1 \cdot {x2}^{2}\right) \cdot 8} \]
                                  2. associate-*l*N/A

                                    \[\leadsto \color{blue}{x1 \cdot \left({x2}^{2} \cdot 8\right)} \]
                                  3. *-commutativeN/A

                                    \[\leadsto x1 \cdot \color{blue}{\left(8 \cdot {x2}^{2}\right)} \]
                                  4. *-lowering-*.f64N/A

                                    \[\leadsto \color{blue}{x1 \cdot \left(8 \cdot {x2}^{2}\right)} \]
                                  5. *-commutativeN/A

                                    \[\leadsto x1 \cdot \color{blue}{\left({x2}^{2} \cdot 8\right)} \]
                                  6. unpow2N/A

                                    \[\leadsto x1 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot 8\right) \]
                                  7. associate-*l*N/A

                                    \[\leadsto x1 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot 8\right)\right)} \]
                                  8. *-commutativeN/A

                                    \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(8 \cdot x2\right)}\right) \]
                                  9. *-lowering-*.f64N/A

                                    \[\leadsto x1 \cdot \color{blue}{\left(x2 \cdot \left(8 \cdot x2\right)\right)} \]
                                  10. *-commutativeN/A

                                    \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
                                  11. *-lowering-*.f6464.9

                                    \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
                                10. Simplified64.9%

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

                              Alternative 15: 80.6% accurate, 7.4× speedup?

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

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

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

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

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

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

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

                                    \[\leadsto 6 \cdot {x1}^{\color{blue}{\left(2 + 2\right)}} + x1 \]
                                  3. pow-prod-upN/A

                                    \[\leadsto 6 \cdot \color{blue}{\left({x1}^{2} \cdot {x1}^{2}\right)} + x1 \]
                                  4. pow2N/A

                                    \[\leadsto 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot {x1}^{2}\right) + x1 \]
                                  5. pow2N/A

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

                                    \[\leadsto \color{blue}{\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot 6} + x1 \]
                                  7. associate-*l*N/A

                                    \[\leadsto \color{blue}{\left(x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)} + x1 \]
                                  8. accelerator-lowering-fma.f64N/A

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(x1 \cdot x1, \left(x1 \cdot x1\right) \cdot 6, x1\right)} \]
                                  9. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot x1}, \left(x1 \cdot x1\right) \cdot 6, x1\right) \]
                                  10. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{fma}\left(x1 \cdot x1, \color{blue}{\left(x1 \cdot x1\right) \cdot 6}, x1\right) \]
                                  11. *-lowering-*.f6489.9

                                    \[\leadsto \mathsf{fma}\left(x1 \cdot x1, \color{blue}{\left(x1 \cdot x1\right)} \cdot 6, x1\right) \]
                                7. Applied egg-rr89.9%

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

                                if -5.5 < x1 < 2.42e-76

                                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}{\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. Simplified85.6%

                                  \[\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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                                5. Taylor expanded in x2 around 0

                                  \[\leadsto x1 + \mathsf{fma}\left(x1, \color{blue}{9 \cdot x1 - 2}, x2 \cdot -6\right) \]
                                6. Step-by-step derivation
                                  1. sub-negN/A

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

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

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

                                    \[\leadsto x1 + \mathsf{fma}\left(x1, \color{blue}{\mathsf{fma}\left(x1, 9, -2\right)}, x2 \cdot -6\right) \]
                                7. Simplified77.7%

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

                                if 2.42e-76 < x1 < 2e5

                                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 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 \color{blue}{3}\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) \]
                                4. Step-by-step derivation
                                  1. Simplified99.6%

                                    \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                                  3. Step-by-step derivation
                                    1. mul-1-negN/A

                                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                                    2. unsub-negN/A

                                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                    3. --lowering--.f64N/A

                                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                    4. *-commutativeN/A

                                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                    5. *-lowering-*.f6499.6

                                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                  4. Simplified99.6%

                                    \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
                                  5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

                                      \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                                    10. accelerator-lowering-fma.f6489.4

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

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

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

                                      \[\leadsto \color{blue}{\left(x1 \cdot {x2}^{2}\right) \cdot 8} \]
                                    2. associate-*l*N/A

                                      \[\leadsto \color{blue}{x1 \cdot \left({x2}^{2} \cdot 8\right)} \]
                                    3. *-commutativeN/A

                                      \[\leadsto x1 \cdot \color{blue}{\left(8 \cdot {x2}^{2}\right)} \]
                                    4. *-lowering-*.f64N/A

                                      \[\leadsto \color{blue}{x1 \cdot \left(8 \cdot {x2}^{2}\right)} \]
                                    5. *-commutativeN/A

                                      \[\leadsto x1 \cdot \color{blue}{\left({x2}^{2} \cdot 8\right)} \]
                                    6. unpow2N/A

                                      \[\leadsto x1 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot 8\right) \]
                                    7. associate-*l*N/A

                                      \[\leadsto x1 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot 8\right)\right)} \]
                                    8. *-commutativeN/A

                                      \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(8 \cdot x2\right)}\right) \]
                                    9. *-lowering-*.f64N/A

                                      \[\leadsto x1 \cdot \color{blue}{\left(x2 \cdot \left(8 \cdot x2\right)\right)} \]
                                    10. *-commutativeN/A

                                      \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
                                    11. *-lowering-*.f6464.9

                                      \[\leadsto x1 \cdot \left(x2 \cdot \color{blue}{\left(x2 \cdot 8\right)}\right) \]
                                  10. Simplified64.9%

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

                                Alternative 16: 93.6% accurate, 7.8× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), x1 \cdot 6, x1\right)\\ \mathbf{if}\;x1 \leq -72000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 450000:\\ \;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(x1, x2 \cdot 8, -6\right)\right), -x1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                (FPCore (x1 x2)
                                 :precision binary64
                                 (let* ((t_0 (fma (* x1 (* x1 x1)) (* x1 6.0) x1)))
                                   (if (<= x1 -72000.0)
                                     t_0
                                     (if (<= x1 450000.0)
                                       (fma x2 (fma x1 -12.0 (fma x1 (* x2 8.0) -6.0)) (- x1))
                                       t_0))))
                                double code(double x1, double x2) {
                                	double t_0 = fma((x1 * (x1 * x1)), (x1 * 6.0), x1);
                                	double tmp;
                                	if (x1 <= -72000.0) {
                                		tmp = t_0;
                                	} else if (x1 <= 450000.0) {
                                		tmp = fma(x2, fma(x1, -12.0, fma(x1, (x2 * 8.0), -6.0)), -x1);
                                	} else {
                                		tmp = t_0;
                                	}
                                	return tmp;
                                }
                                
                                function code(x1, x2)
                                	t_0 = fma(Float64(x1 * Float64(x1 * x1)), Float64(x1 * 6.0), x1)
                                	tmp = 0.0
                                	if (x1 <= -72000.0)
                                		tmp = t_0;
                                	elseif (x1 <= 450000.0)
                                		tmp = fma(x2, fma(x1, -12.0, fma(x1, Float64(x2 * 8.0), -6.0)), Float64(-x1));
                                	else
                                		tmp = t_0;
                                	end
                                	return tmp
                                end
                                
                                code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * 6.0), $MachinePrecision] + x1), $MachinePrecision]}, If[LessEqual[x1, -72000.0], t$95$0, If[LessEqual[x1, 450000.0], N[(x2 * N[(x1 * -12.0 + N[(x1 * N[(x2 * 8.0), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision] + (-x1)), $MachinePrecision], t$95$0]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := \mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), x1 \cdot 6, x1\right)\\
                                \mathbf{if}\;x1 \leq -72000:\\
                                \;\;\;\;t\_0\\
                                
                                \mathbf{elif}\;x1 \leq 450000:\\
                                \;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(x1, x2 \cdot 8, -6\right)\right), -x1\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_0\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if x1 < -72000 or 4.5e5 < x1

                                  1. Initial program 46.8%

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

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

                                      \[\leadsto x1 + \color{blue}{6 \cdot {x1}^{4}} \]
                                    2. pow-lowering-pow.f6490.7

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

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

                                      \[\leadsto x1 + 6 \cdot {x1}^{\color{blue}{\left(2 + 2\right)}} \]
                                    2. pow-prod-upN/A

                                      \[\leadsto x1 + 6 \cdot \color{blue}{\left({x1}^{2} \cdot {x1}^{2}\right)} \]
                                    3. pow2N/A

                                      \[\leadsto x1 + 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot {x1}^{2}\right) \]
                                    4. pow2N/A

                                      \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                                    5. *-lowering-*.f64N/A

                                      \[\leadsto x1 + 6 \cdot \color{blue}{\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)} \]
                                    6. *-lowering-*.f64N/A

                                      \[\leadsto x1 + 6 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(x1 \cdot x1\right)\right) \]
                                    7. *-lowering-*.f6490.6

                                      \[\leadsto x1 + 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \]
                                  7. Applied egg-rr90.6%

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

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

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

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

                                      \[\leadsto \color{blue}{\left(\left(x1 \cdot x1\right) \cdot x1\right) \cdot \left(x1 \cdot 6\right)} + x1 \]
                                    5. accelerator-lowering-fma.f64N/A

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(x1 \cdot x1\right) \cdot x1, x1 \cdot 6, x1\right)} \]
                                    6. associate-*l*N/A

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot \left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                    7. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{x1 \cdot \left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                    8. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{fma}\left(x1 \cdot \color{blue}{\left(x1 \cdot x1\right)}, x1 \cdot 6, x1\right) \]
                                    9. *-lowering-*.f6490.7

                                      \[\leadsto \mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), \color{blue}{x1 \cdot 6}, x1\right) \]
                                  9. Applied egg-rr90.7%

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

                                  if -72000 < x1 < 4.5e5

                                  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 \color{blue}{3}\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) \]
                                  4. Step-by-step derivation
                                    1. Simplified98.2%

                                      \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                                      \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                                    3. Step-by-step derivation
                                      1. mul-1-negN/A

                                        \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                                      2. unsub-negN/A

                                        \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                      3. --lowering--.f64N/A

                                        \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                      4. *-commutativeN/A

                                        \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                      5. *-lowering-*.f6499.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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                    4. Simplified99.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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
                                    5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

                                        \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                                      10. accelerator-lowering-fma.f6485.2

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

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

                                      \[\leadsto \color{blue}{-3 \cdot x1 + \left(2 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\right)} \]
                                    9. Step-by-step derivation
                                      1. associate-+r+N/A

                                        \[\leadsto \color{blue}{\left(-3 \cdot x1 + 2 \cdot x1\right) + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                      2. distribute-rgt-outN/A

                                        \[\leadsto \color{blue}{x1 \cdot \left(-3 + 2\right)} + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                      3. metadata-evalN/A

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

                                        \[\leadsto \color{blue}{-1 \cdot x1} + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                      5. +-commutativeN/A

                                        \[\leadsto \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) + -1 \cdot x1} \]
                                      6. accelerator-lowering-fma.f64N/A

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(x2, \left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6, -1 \cdot x1\right)} \]
                                      7. associate--l+N/A

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

                                        \[\leadsto \mathsf{fma}\left(x2, \color{blue}{x1 \cdot -12} + \left(8 \cdot \left(x1 \cdot x2\right) - 6\right), -1 \cdot x1\right) \]
                                      9. accelerator-lowering-fma.f64N/A

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

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

                                        \[\leadsto \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \color{blue}{\left(x1 \cdot x2\right) \cdot 8} + \left(\mathsf{neg}\left(6\right)\right)\right), -1 \cdot x1\right) \]
                                      12. associate-*l*N/A

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

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

                                        \[\leadsto \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, x1 \cdot \left(8 \cdot x2\right) + \color{blue}{-6}\right), -1 \cdot x1\right) \]
                                      15. accelerator-lowering-fma.f64N/A

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

                                        \[\leadsto \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(x1, \color{blue}{x2 \cdot 8}, -6\right)\right), -1 \cdot x1\right) \]
                                      17. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(x1, \color{blue}{x2 \cdot 8}, -6\right)\right), -1 \cdot x1\right) \]
                                      18. mul-1-negN/A

                                        \[\leadsto \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(x1, x2 \cdot 8, -6\right)\right), \color{blue}{\mathsf{neg}\left(x1\right)}\right) \]
                                      19. neg-lowering-neg.f6497.9

                                        \[\leadsto \mathsf{fma}\left(x2, \mathsf{fma}\left(x1, -12, \mathsf{fma}\left(x1, x2 \cdot 8, -6\right)\right), \color{blue}{-x1}\right) \]
                                    10. Simplified97.9%

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

                                  Alternative 17: 31.1% accurate, 10.3× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot x2 \leq -2 \cdot 10^{-240}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;2 \cdot x2 \leq 10^{-165}:\\ \;\;\;\;-x1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1\right)\\ \end{array} \end{array} \]
                                  (FPCore (x1 x2)
                                   :precision binary64
                                   (if (<= (* 2.0 x2) -2e-240)
                                     (* x2 -6.0)
                                     (if (<= (* 2.0 x2) 1e-165) (- x1) (fma x2 -6.0 x1))))
                                  double code(double x1, double x2) {
                                  	double tmp;
                                  	if ((2.0 * x2) <= -2e-240) {
                                  		tmp = x2 * -6.0;
                                  	} else if ((2.0 * x2) <= 1e-165) {
                                  		tmp = -x1;
                                  	} else {
                                  		tmp = fma(x2, -6.0, x1);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x1, x2)
                                  	tmp = 0.0
                                  	if (Float64(2.0 * x2) <= -2e-240)
                                  		tmp = Float64(x2 * -6.0);
                                  	elseif (Float64(2.0 * x2) <= 1e-165)
                                  		tmp = Float64(-x1);
                                  	else
                                  		tmp = fma(x2, -6.0, x1);
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -2e-240], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[N[(2.0 * x2), $MachinePrecision], 1e-165], (-x1), N[(x2 * -6.0 + x1), $MachinePrecision]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;2 \cdot x2 \leq -2 \cdot 10^{-240}:\\
                                  \;\;\;\;x2 \cdot -6\\
                                  
                                  \mathbf{elif}\;2 \cdot x2 \leq 10^{-165}:\\
                                  \;\;\;\;-x1\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\mathsf{fma}\left(x2, -6, x1\right)\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if (*.f64 #s(literal 2 binary64) x2) < -1.9999999999999999e-240

                                    1. Initial program 77.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. *-lowering-*.f6435.1

                                        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                    5. Simplified35.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. *-lowering-*.f6435.3

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

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

                                    if -1.9999999999999999e-240 < (*.f64 #s(literal 2 binary64) x2) < 1e-165

                                    1. Initial program 82.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 + \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 \color{blue}{3}\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) \]
                                    4. Step-by-step derivation
                                      1. Simplified79.7%

                                        \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                                        \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                                      3. Step-by-step derivation
                                        1. mul-1-negN/A

                                          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                                        2. unsub-negN/A

                                          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                        3. --lowering--.f64N/A

                                          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                        4. *-commutativeN/A

                                          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                        5. *-lowering-*.f6482.1

                                          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                      4. Simplified82.1%

                                        \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
                                      5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

                                          \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                                        10. accelerator-lowering-fma.f6447.7

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

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

                                        \[\leadsto \color{blue}{-3 \cdot x1 + 2 \cdot x1} \]
                                      9. Step-by-step derivation
                                        1. distribute-rgt-outN/A

                                          \[\leadsto \color{blue}{x1 \cdot \left(-3 + 2\right)} \]
                                        2. metadata-evalN/A

                                          \[\leadsto x1 \cdot \color{blue}{-1} \]
                                        3. *-commutativeN/A

                                          \[\leadsto \color{blue}{-1 \cdot x1} \]
                                        4. mul-1-negN/A

                                          \[\leadsto \color{blue}{\mathsf{neg}\left(x1\right)} \]
                                        5. neg-lowering-neg.f6446.2

                                          \[\leadsto \color{blue}{-x1} \]
                                      10. Simplified46.2%

                                        \[\leadsto \color{blue}{-x1} \]

                                      if 1e-165 < (*.f64 #s(literal 2 binary64) x2)

                                      1. Initial program 69.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. *-lowering-*.f6431.8

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

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

                                          \[\leadsto \color{blue}{x2 \cdot -6 + x1} \]
                                        2. accelerator-lowering-fma.f6431.9

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(x2, -6, x1\right)} \]
                                      7. Applied egg-rr31.9%

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

                                    Alternative 18: 30.8% accurate, 10.6× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot x2 \leq -2 \cdot 10^{-240}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;2 \cdot x2 \leq 10^{-156}:\\ \;\;\;\;-x1\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6\\ \end{array} \end{array} \]
                                    (FPCore (x1 x2)
                                     :precision binary64
                                     (if (<= (* 2.0 x2) -2e-240)
                                       (* x2 -6.0)
                                       (if (<= (* 2.0 x2) 1e-156) (- x1) (* x2 -6.0))))
                                    double code(double x1, double x2) {
                                    	double tmp;
                                    	if ((2.0 * x2) <= -2e-240) {
                                    		tmp = x2 * -6.0;
                                    	} else if ((2.0 * x2) <= 1e-156) {
                                    		tmp = -x1;
                                    	} 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) <= (-2d-240)) then
                                            tmp = x2 * (-6.0d0)
                                        else if ((2.0d0 * x2) <= 1d-156) then
                                            tmp = -x1
                                        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) <= -2e-240) {
                                    		tmp = x2 * -6.0;
                                    	} else if ((2.0 * x2) <= 1e-156) {
                                    		tmp = -x1;
                                    	} else {
                                    		tmp = x2 * -6.0;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x1, x2):
                                    	tmp = 0
                                    	if (2.0 * x2) <= -2e-240:
                                    		tmp = x2 * -6.0
                                    	elif (2.0 * x2) <= 1e-156:
                                    		tmp = -x1
                                    	else:
                                    		tmp = x2 * -6.0
                                    	return tmp
                                    
                                    function code(x1, x2)
                                    	tmp = 0.0
                                    	if (Float64(2.0 * x2) <= -2e-240)
                                    		tmp = Float64(x2 * -6.0);
                                    	elseif (Float64(2.0 * x2) <= 1e-156)
                                    		tmp = Float64(-x1);
                                    	else
                                    		tmp = Float64(x2 * -6.0);
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x1, x2)
                                    	tmp = 0.0;
                                    	if ((2.0 * x2) <= -2e-240)
                                    		tmp = x2 * -6.0;
                                    	elseif ((2.0 * x2) <= 1e-156)
                                    		tmp = -x1;
                                    	else
                                    		tmp = x2 * -6.0;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -2e-240], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[N[(2.0 * x2), $MachinePrecision], 1e-156], (-x1), N[(x2 * -6.0), $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;2 \cdot x2 \leq -2 \cdot 10^{-240}:\\
                                    \;\;\;\;x2 \cdot -6\\
                                    
                                    \mathbf{elif}\;2 \cdot x2 \leq 10^{-156}:\\
                                    \;\;\;\;-x1\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;x2 \cdot -6\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if (*.f64 #s(literal 2 binary64) x2) < -1.9999999999999999e-240 or 1.00000000000000004e-156 < (*.f64 #s(literal 2 binary64) x2)

                                      1. Initial program 74.2%

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

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

                                          \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                        2. *-lowering-*.f6433.9

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

                                        \[\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. *-lowering-*.f6433.6

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

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

                                      if -1.9999999999999999e-240 < (*.f64 #s(literal 2 binary64) x2) < 1.00000000000000004e-156

                                      1. Initial program 79.5%

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

                                        \[\leadsto x1 + \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 \color{blue}{3}\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) \]
                                      4. Step-by-step derivation
                                        1. Simplified77.2%

                                          \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                                          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                                        3. Step-by-step derivation
                                          1. mul-1-negN/A

                                            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                                          2. unsub-negN/A

                                            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                          3. --lowering--.f64N/A

                                            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                          4. *-commutativeN/A

                                            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                          5. *-lowering-*.f6479.5

                                            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                        4. Simplified79.5%

                                          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
                                        5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

                                            \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                                          10. accelerator-lowering-fma.f6445.2

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

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

                                          \[\leadsto \color{blue}{-3 \cdot x1 + 2 \cdot x1} \]
                                        9. Step-by-step derivation
                                          1. distribute-rgt-outN/A

                                            \[\leadsto \color{blue}{x1 \cdot \left(-3 + 2\right)} \]
                                          2. metadata-evalN/A

                                            \[\leadsto x1 \cdot \color{blue}{-1} \]
                                          3. *-commutativeN/A

                                            \[\leadsto \color{blue}{-1 \cdot x1} \]
                                          4. mul-1-negN/A

                                            \[\leadsto \color{blue}{\mathsf{neg}\left(x1\right)} \]
                                          5. neg-lowering-neg.f6443.8

                                            \[\leadsto \color{blue}{-x1} \]
                                        10. Simplified43.8%

                                          \[\leadsto \color{blue}{-x1} \]
                                      5. Recombined 2 regimes into one program.
                                      6. Add Preprocessing

                                      Alternative 19: 55.5% accurate, 11.0× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\\ \mathbf{if}\;x1 \leq -7.4 \cdot 10^{-90}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 3.7 \cdot 10^{-92}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                      (FPCore (x1 x2)
                                       :precision binary64
                                       (let* ((t_0 (+ x1 (* x1 (fma x1 9.0 -2.0)))))
                                         (if (<= x1 -7.4e-90) t_0 (if (<= x1 3.7e-92) (* x2 -6.0) t_0))))
                                      double code(double x1, double x2) {
                                      	double t_0 = x1 + (x1 * fma(x1, 9.0, -2.0));
                                      	double tmp;
                                      	if (x1 <= -7.4e-90) {
                                      		tmp = t_0;
                                      	} else if (x1 <= 3.7e-92) {
                                      		tmp = x2 * -6.0;
                                      	} else {
                                      		tmp = t_0;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(x1, x2)
                                      	t_0 = Float64(x1 + Float64(x1 * fma(x1, 9.0, -2.0)))
                                      	tmp = 0.0
                                      	if (x1 <= -7.4e-90)
                                      		tmp = t_0;
                                      	elseif (x1 <= 3.7e-92)
                                      		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[(x1 * 9.0 + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.4e-90], t$95$0, If[LessEqual[x1, 3.7e-92], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_0 := x1 + x1 \cdot \mathsf{fma}\left(x1, 9, -2\right)\\
                                      \mathbf{if}\;x1 \leq -7.4 \cdot 10^{-90}:\\
                                      \;\;\;\;t\_0\\
                                      
                                      \mathbf{elif}\;x1 \leq 3.7 \cdot 10^{-92}:\\
                                      \;\;\;\;x2 \cdot -6\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_0\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if x1 < -7.40000000000000035e-90 or 3.69999999999999977e-92 < x1

                                        1. Initial program 60.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}{\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. Simplified57.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(4, x2 \cdot \mathsf{fma}\left(x2, 2, -3\right), -2\right)\right), x2 \cdot -6\right)} \]
                                        5. Taylor expanded in x2 around 0

                                          \[\leadsto x1 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 2\right)} \]
                                        6. Step-by-step derivation
                                          1. *-lowering-*.f64N/A

                                            \[\leadsto x1 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 2\right)} \]
                                          2. sub-negN/A

                                            \[\leadsto x1 + x1 \cdot \color{blue}{\left(9 \cdot x1 + \left(\mathsf{neg}\left(2\right)\right)\right)} \]
                                          3. *-commutativeN/A

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

                                            \[\leadsto x1 + x1 \cdot \left(x1 \cdot 9 + \color{blue}{-2}\right) \]
                                          5. accelerator-lowering-fma.f6448.1

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

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

                                        if -7.40000000000000035e-90 < x1 < 3.69999999999999977e-92

                                        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. *-lowering-*.f6464.8

                                            \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                        5. Simplified64.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. *-lowering-*.f6465.2

                                            \[\leadsto \color{blue}{x2 \cdot -6} \]
                                        8. Simplified65.2%

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

                                      Alternative 20: 13.8% accurate, 99.3× speedup?

                                      \[\begin{array}{l} \\ -x1 \end{array} \]
                                      (FPCore (x1 x2) :precision binary64 (- x1))
                                      double code(double x1, double x2) {
                                      	return -x1;
                                      }
                                      
                                      real(8) function code(x1, x2)
                                          real(8), intent (in) :: x1
                                          real(8), intent (in) :: x2
                                          code = -x1
                                      end function
                                      
                                      public static double code(double x1, double x2) {
                                      	return -x1;
                                      }
                                      
                                      def code(x1, x2):
                                      	return -x1
                                      
                                      function code(x1, x2)
                                      	return Float64(-x1)
                                      end
                                      
                                      function tmp = code(x1, x2)
                                      	tmp = -x1;
                                      end
                                      
                                      code[x1_, x2_] := (-x1)
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      -x1
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 75.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 \color{blue}{3}\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) \]
                                      4. Step-by-step derivation
                                        1. Simplified74.7%

                                          \[\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 \color{blue}{3}\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. Taylor expanded in x1 around 0

                                          \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                                        3. Step-by-step derivation
                                          1. mul-1-negN/A

                                            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + \color{blue}{\left(\mathsf{neg}\left(x1\right)\right)}\right)\right) \]
                                          2. unsub-negN/A

                                            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                          3. --lowering--.f64N/A

                                            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 - x1\right)}\right) \]
                                          4. *-commutativeN/A

                                            \[\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                          5. *-lowering-*.f6475.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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(\color{blue}{x2 \cdot -2} - x1\right)\right) \]
                                        4. Simplified75.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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2 - x1\right)}\right) \]
                                        5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

                                            \[\leadsto x1 + \left(\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 + \color{blue}{-3}\right)\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right) \]
                                          10. accelerator-lowering-fma.f6455.7

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

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

                                          \[\leadsto \color{blue}{-3 \cdot x1 + 2 \cdot x1} \]
                                        9. Step-by-step derivation
                                          1. distribute-rgt-outN/A

                                            \[\leadsto \color{blue}{x1 \cdot \left(-3 + 2\right)} \]
                                          2. metadata-evalN/A

                                            \[\leadsto x1 \cdot \color{blue}{-1} \]
                                          3. *-commutativeN/A

                                            \[\leadsto \color{blue}{-1 \cdot x1} \]
                                          4. mul-1-negN/A

                                            \[\leadsto \color{blue}{\mathsf{neg}\left(x1\right)} \]
                                          5. neg-lowering-neg.f6413.9

                                            \[\leadsto \color{blue}{-x1} \]
                                        10. Simplified13.9%

                                          \[\leadsto \color{blue}{-x1} \]
                                        11. Add Preprocessing

                                        Alternative 21: 3.2% accurate, 298.0× speedup?

                                        \[\begin{array}{l} \\ x1 \end{array} \]
                                        (FPCore (x1 x2) :precision binary64 x1)
                                        double code(double x1, double x2) {
                                        	return x1;
                                        }
                                        
                                        real(8) function code(x1, x2)
                                            real(8), intent (in) :: x1
                                            real(8), intent (in) :: x2
                                            code = x1
                                        end function
                                        
                                        public static double code(double x1, double x2) {
                                        	return x1;
                                        }
                                        
                                        def code(x1, x2):
                                        	return x1
                                        
                                        function code(x1, x2)
                                        	return x1
                                        end
                                        
                                        function tmp = code(x1, x2)
                                        	tmp = x1;
                                        end
                                        
                                        code[x1_, x2_] := x1
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        x1
                                        \end{array}
                                        
                                        Derivation
                                        1. Initial program 75.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. *-lowering-*.f6427.1

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

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

                                          \[\leadsto \color{blue}{x1} \]
                                        7. Step-by-step derivation
                                          1. Simplified3.1%

                                            \[\leadsto \color{blue}{x1} \]
                                          2. Add Preprocessing

                                          Reproduce

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