Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 69.9% → 99.0%
Time: 21.3s
Alternatives: 20
Speedup: 7.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 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.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\ t_2 := -1 - x1 \cdot x1\\ t_3 := x1 \cdot \left(x1 \cdot 3\right)\\ t_4 := \left(t\_3 + 2 \cdot x2\right) - x1\\ t_5 := \frac{t\_4}{t\_0}\\ t_6 := \frac{t\_4}{t\_2}\\ t_7 := x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_2 + t\_3 \cdot t\_5\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\\ t_8 := x1 + \left(t\_7 + 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_0}\right)\\ t_9 := \frac{t\_1}{\mathsf{fma}\left(x1, x1, 1\right)}\\ \mathbf{if}\;t\_8 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;x1 + \mathsf{fma}\left(\frac{t\_3 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_9, 4, -6\right), \frac{\left(-3 + t\_9\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot t\_9, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\ \mathbf{elif}\;t\_8 \leq \infty:\\ \;\;\;\;x1 + \left(t\_7 + 3 \cdot 3\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (+ (* x1 x1) 1.0))
        (t_1 (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1))))
        (t_2 (- -1.0 (* x1 x1)))
        (t_3 (* x1 (* x1 3.0)))
        (t_4 (- (+ t_3 (* 2.0 x2)) x1))
        (t_5 (/ t_4 t_0))
        (t_6 (/ t_4 t_2))
        (t_7
         (+
          x1
          (+
           (+
            (*
             (+
              (* (* x1 x1) (+ 6.0 (* 4.0 t_6)))
              (* (* (* x1 2.0) t_5) (+ 3.0 t_6)))
             t_2)
            (* t_3 t_5))
           (* x1 (* x1 x1)))))
        (t_8 (+ x1 (+ t_7 (* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0)))))
        (t_9 (/ t_1 (fma x1 x1 1.0))))
   (if (<= t_8 5e+262)
     (+
      x1
      (fma
       (/ (- t_3 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
       3.0
       (fma
        (fma x1 x1 1.0)
        (fma
         x1
         (* x1 (fma t_9 4.0 -6.0))
         (/ (* (+ -3.0 t_9) (* (* x1 2.0) t_1)) (fma x1 x1 1.0)))
        (fma x1 (* (* x1 3.0) t_9) (fma x1 (* x1 x1) x1)))))
     (if (<= t_8 INFINITY)
       (+ x1 (+ t_7 (* 3.0 3.0)))
       (+ x1 (* (* x1 x1) (* x1 (* x1 6.0))))))))
double code(double x1, double x2) {
	double t_0 = (x1 * x1) + 1.0;
	double t_1 = fma(2.0, x2, fma(x1, (x1 * 3.0), -x1));
	double t_2 = -1.0 - (x1 * x1);
	double t_3 = x1 * (x1 * 3.0);
	double t_4 = (t_3 + (2.0 * x2)) - x1;
	double t_5 = t_4 / t_0;
	double t_6 = t_4 / t_2;
	double t_7 = x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_5) * (3.0 + t_6))) * t_2) + (t_3 * t_5)) + (x1 * (x1 * x1)));
	double t_8 = x1 + (t_7 + (3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)));
	double t_9 = t_1 / fma(x1, x1, 1.0);
	double tmp;
	if (t_8 <= 5e+262) {
		tmp = x1 + fma(((t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_9, 4.0, -6.0)), (((-3.0 + t_9) * ((x1 * 2.0) * t_1)) / fma(x1, x1, 1.0))), fma(x1, ((x1 * 3.0) * t_9), fma(x1, (x1 * x1), x1))));
	} else if (t_8 <= ((double) INFINITY)) {
		tmp = x1 + (t_7 + (3.0 * 3.0));
	} else {
		tmp = x1 + ((x1 * x1) * (x1 * (x1 * 6.0)));
	}
	return tmp;
}
function code(x1, x2)
	t_0 = Float64(Float64(x1 * x1) + 1.0)
	t_1 = fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1)))
	t_2 = Float64(-1.0 - Float64(x1 * x1))
	t_3 = Float64(x1 * Float64(x1 * 3.0))
	t_4 = Float64(Float64(t_3 + Float64(2.0 * x2)) - x1)
	t_5 = Float64(t_4 / t_0)
	t_6 = Float64(t_4 / t_2)
	t_7 = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(3.0 + t_6))) * t_2) + Float64(t_3 * t_5)) + Float64(x1 * Float64(x1 * x1))))
	t_8 = Float64(x1 + Float64(t_7 + Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0))))
	t_9 = Float64(t_1 / fma(x1, x1, 1.0))
	tmp = 0.0
	if (t_8 <= 5e+262)
		tmp = Float64(x1 + fma(Float64(Float64(t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), 3.0, fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_9, 4.0, -6.0)), Float64(Float64(Float64(-3.0 + t_9) * Float64(Float64(x1 * 2.0) * t_1)) / fma(x1, x1, 1.0))), fma(x1, Float64(Float64(x1 * 3.0) * t_9), fma(x1, Float64(x1 * x1), x1)))));
	elseif (t_8 <= Inf)
		tmp = Float64(x1 + Float64(t_7 + Float64(3.0 * 3.0)));
	else
		tmp = Float64(x1 + Float64(Float64(x1 * x1) * Float64(x1 * Float64(x1 * 6.0))));
	end
	return tmp
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 / t$95$2), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] + N[(t$95$3 * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x1 + N[(t$95$7 + N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$8, 5e+262], N[(x1 + N[(N[(N[(t$95$3 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$9 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-3.0 + t$95$9), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * t$95$9), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$8, Infinity], N[(x1 + N[(t$95$7 + N[(3.0 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\
t_2 := -1 - x1 \cdot x1\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \left(t\_3 + 2 \cdot x2\right) - x1\\
t_5 := \frac{t\_4}{t\_0}\\
t_6 := \frac{t\_4}{t\_2}\\
t_7 := x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_2 + t\_3 \cdot t\_5\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\\
t_8 := x1 + \left(t\_7 + 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
t_9 := \frac{t\_1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;t\_8 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;x1 + \mathsf{fma}\left(\frac{t\_3 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_9, 4, -6\right), \frac{\left(-3 + t\_9\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot t\_9, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\

\mathbf{elif}\;t\_8 \leq \infty:\\
\;\;\;\;x1 + \left(t\_7 + 3 \cdot 3\right)\\

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


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

    1. Initial program 99.3%

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

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

    if 5.00000000000000008e262 < (+.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 inf

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

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

      1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 2: 63.6% accurate, 0.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\ t_3 := \frac{t\_2}{t\_0}\\ t_4 := x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\\ t_5 := -1 - x1 \cdot x1\\ t_6 := \frac{t\_2}{t\_5}\\ t_7 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_5 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\ t_8 := x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)\\ \mathbf{if}\;t\_7 \leq -5 \cdot 10^{+263}:\\ \;\;\;\;t\_8\\ \mathbf{elif}\;t\_7 \leq -1 \cdot 10^{-58}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;t\_7 \leq 2 \cdot 10^{-6}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_7 \leq 5 \cdot 10^{+186}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;t\_7 \leq \infty:\\ \;\;\;\;t\_8\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
          (FPCore (x1 x2)
           :precision binary64
           (let* ((t_0 (+ (* x1 x1) 1.0))
                  (t_1 (* x1 (* x1 3.0)))
                  (t_2 (- (+ t_1 (* 2.0 x2)) x1))
                  (t_3 (/ t_2 t_0))
                  (t_4 (* x1 (fma 9.0 x1 -1.0)))
                  (t_5 (- -1.0 (* x1 x1)))
                  (t_6 (/ t_2 t_5))
                  (t_7
                   (+
                    x1
                    (+
                     (+
                      x1
                      (+
                       (+
                        (*
                         (+
                          (* (* x1 x1) (+ 6.0 (* 4.0 t_6)))
                          (* (* (* x1 2.0) t_3) (+ 3.0 t_6)))
                         t_5)
                        (* t_1 t_3))
                       (* x1 (* x1 x1))))
                     (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))))
                  (t_8 (* x2 (* x2 (* x1 8.0)))))
             (if (<= t_7 -5e+263)
               t_8
               (if (<= t_7 -1e-58)
                 (* x2 -6.0)
                 (if (<= t_7 2e-6)
                   t_4
                   (if (<= t_7 5e+186) (* x2 -6.0) (if (<= t_7 INFINITY) t_8 t_4)))))))
          double code(double x1, double x2) {
          	double t_0 = (x1 * x1) + 1.0;
          	double t_1 = x1 * (x1 * 3.0);
          	double t_2 = (t_1 + (2.0 * x2)) - x1;
          	double t_3 = t_2 / t_0;
          	double t_4 = x1 * fma(9.0, x1, -1.0);
          	double t_5 = -1.0 - (x1 * x1);
          	double t_6 = t_2 / t_5;
          	double t_7 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_3) * (3.0 + t_6))) * t_5) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
          	double t_8 = x2 * (x2 * (x1 * 8.0));
          	double tmp;
          	if (t_7 <= -5e+263) {
          		tmp = t_8;
          	} else if (t_7 <= -1e-58) {
          		tmp = x2 * -6.0;
          	} else if (t_7 <= 2e-6) {
          		tmp = t_4;
          	} else if (t_7 <= 5e+186) {
          		tmp = x2 * -6.0;
          	} else if (t_7 <= ((double) INFINITY)) {
          		tmp = t_8;
          	} else {
          		tmp = t_4;
          	}
          	return tmp;
          }
          
          function code(x1, x2)
          	t_0 = Float64(Float64(x1 * x1) + 1.0)
          	t_1 = Float64(x1 * Float64(x1 * 3.0))
          	t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1)
          	t_3 = Float64(t_2 / t_0)
          	t_4 = Float64(x1 * fma(9.0, x1, -1.0))
          	t_5 = Float64(-1.0 - Float64(x1 * x1))
          	t_6 = Float64(t_2 / t_5)
          	t_7 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_6))) * t_5) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0))))
          	t_8 = Float64(x2 * Float64(x2 * Float64(x1 * 8.0)))
          	tmp = 0.0
          	if (t_7 <= -5e+263)
          		tmp = t_8;
          	elseif (t_7 <= -1e-58)
          		tmp = Float64(x2 * -6.0);
          	elseif (t_7 <= 2e-6)
          		tmp = t_4;
          	elseif (t_7 <= 5e+186)
          		tmp = Float64(x2 * -6.0);
          	elseif (t_7 <= Inf)
          		tmp = t_8;
          	else
          		tmp = t_4;
          	end
          	return tmp
          end
          
          code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x2 * N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$7, -5e+263], t$95$8, If[LessEqual[t$95$7, -1e-58], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$7, 2e-6], t$95$4, If[LessEqual[t$95$7, 5e+186], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$7, Infinity], t$95$8, t$95$4]]]]]]]]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := x1 \cdot x1 + 1\\
          t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
          t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
          t_3 := \frac{t\_2}{t\_0}\\
          t_4 := x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\\
          t_5 := -1 - x1 \cdot x1\\
          t_6 := \frac{t\_2}{t\_5}\\
          t_7 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_5 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
          t_8 := x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)\\
          \mathbf{if}\;t\_7 \leq -5 \cdot 10^{+263}:\\
          \;\;\;\;t\_8\\
          
          \mathbf{elif}\;t\_7 \leq -1 \cdot 10^{-58}:\\
          \;\;\;\;x2 \cdot -6\\
          
          \mathbf{elif}\;t\_7 \leq 2 \cdot 10^{-6}:\\
          \;\;\;\;t\_4\\
          
          \mathbf{elif}\;t\_7 \leq 5 \cdot 10^{+186}:\\
          \;\;\;\;x2 \cdot -6\\
          
          \mathbf{elif}\;t\_7 \leq \infty:\\
          \;\;\;\;t\_8\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_4\\
          
          
          \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)))))) < -5.00000000000000022e263 or 4.99999999999999954e186 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

                if -5.00000000000000022e263 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -1e-58 or 1.99999999999999991e-6 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 4.99999999999999954e186

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

                if -1e-58 < (+.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.99999999999999991e-6 or +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 38.4%

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

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

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

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

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

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

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

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

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

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

                Alternative 3: 61.6% accurate, 0.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\ t_3 := \frac{t\_2}{t\_0}\\ t_4 := x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\\ t_5 := -1 - x1 \cdot x1\\ t_6 := \frac{t\_2}{t\_5}\\ t_7 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_5 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\ t_8 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{if}\;t\_7 \leq -5 \cdot 10^{+263}:\\ \;\;\;\;t\_8\\ \mathbf{elif}\;t\_7 \leq -1 \cdot 10^{-58}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;t\_7 \leq 2 \cdot 10^{-6}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_7 \leq 5 \cdot 10^{+186}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;t\_7 \leq \infty:\\ \;\;\;\;t\_8\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
                (FPCore (x1 x2)
                 :precision binary64
                 (let* ((t_0 (+ (* x1 x1) 1.0))
                        (t_1 (* x1 (* x1 3.0)))
                        (t_2 (- (+ t_1 (* 2.0 x2)) x1))
                        (t_3 (/ t_2 t_0))
                        (t_4 (* x1 (fma 9.0 x1 -1.0)))
                        (t_5 (- -1.0 (* x1 x1)))
                        (t_6 (/ t_2 t_5))
                        (t_7
                         (+
                          x1
                          (+
                           (+
                            x1
                            (+
                             (+
                              (*
                               (+
                                (* (* x1 x1) (+ 6.0 (* 4.0 t_6)))
                                (* (* (* x1 2.0) t_3) (+ 3.0 t_6)))
                               t_5)
                              (* t_1 t_3))
                             (* x1 (* x1 x1))))
                           (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))))
                        (t_8 (* 8.0 (* x1 (* x2 x2)))))
                   (if (<= t_7 -5e+263)
                     t_8
                     (if (<= t_7 -1e-58)
                       (* x2 -6.0)
                       (if (<= t_7 2e-6)
                         t_4
                         (if (<= t_7 5e+186) (* x2 -6.0) (if (<= t_7 INFINITY) t_8 t_4)))))))
                double code(double x1, double x2) {
                	double t_0 = (x1 * x1) + 1.0;
                	double t_1 = x1 * (x1 * 3.0);
                	double t_2 = (t_1 + (2.0 * x2)) - x1;
                	double t_3 = t_2 / t_0;
                	double t_4 = x1 * fma(9.0, x1, -1.0);
                	double t_5 = -1.0 - (x1 * x1);
                	double t_6 = t_2 / t_5;
                	double t_7 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_3) * (3.0 + t_6))) * t_5) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
                	double t_8 = 8.0 * (x1 * (x2 * x2));
                	double tmp;
                	if (t_7 <= -5e+263) {
                		tmp = t_8;
                	} else if (t_7 <= -1e-58) {
                		tmp = x2 * -6.0;
                	} else if (t_7 <= 2e-6) {
                		tmp = t_4;
                	} else if (t_7 <= 5e+186) {
                		tmp = x2 * -6.0;
                	} else if (t_7 <= ((double) INFINITY)) {
                		tmp = t_8;
                	} else {
                		tmp = t_4;
                	}
                	return tmp;
                }
                
                function code(x1, x2)
                	t_0 = Float64(Float64(x1 * x1) + 1.0)
                	t_1 = Float64(x1 * Float64(x1 * 3.0))
                	t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1)
                	t_3 = Float64(t_2 / t_0)
                	t_4 = Float64(x1 * fma(9.0, x1, -1.0))
                	t_5 = Float64(-1.0 - Float64(x1 * x1))
                	t_6 = Float64(t_2 / t_5)
                	t_7 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_6))) * t_5) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0))))
                	t_8 = Float64(8.0 * Float64(x1 * Float64(x2 * x2)))
                	tmp = 0.0
                	if (t_7 <= -5e+263)
                		tmp = t_8;
                	elseif (t_7 <= -1e-58)
                		tmp = Float64(x2 * -6.0);
                	elseif (t_7 <= 2e-6)
                		tmp = t_4;
                	elseif (t_7 <= 5e+186)
                		tmp = Float64(x2 * -6.0);
                	elseif (t_7 <= Inf)
                		tmp = t_8;
                	else
                		tmp = t_4;
                	end
                	return tmp
                end
                
                code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$7, -5e+263], t$95$8, If[LessEqual[t$95$7, -1e-58], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$7, 2e-6], t$95$4, If[LessEqual[t$95$7, 5e+186], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$7, Infinity], t$95$8, t$95$4]]]]]]]]]]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := x1 \cdot x1 + 1\\
                t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
                t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
                t_3 := \frac{t\_2}{t\_0}\\
                t_4 := x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\\
                t_5 := -1 - x1 \cdot x1\\
                t_6 := \frac{t\_2}{t\_5}\\
                t_7 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_5 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
                t_8 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
                \mathbf{if}\;t\_7 \leq -5 \cdot 10^{+263}:\\
                \;\;\;\;t\_8\\
                
                \mathbf{elif}\;t\_7 \leq -1 \cdot 10^{-58}:\\
                \;\;\;\;x2 \cdot -6\\
                
                \mathbf{elif}\;t\_7 \leq 2 \cdot 10^{-6}:\\
                \;\;\;\;t\_4\\
                
                \mathbf{elif}\;t\_7 \leq 5 \cdot 10^{+186}:\\
                \;\;\;\;x2 \cdot -6\\
                
                \mathbf{elif}\;t\_7 \leq \infty:\\
                \;\;\;\;t\_8\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_4\\
                
                
                \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)))))) < -5.00000000000000022e263 or 4.99999999999999954e186 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                    if -5.00000000000000022e263 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -1e-58 or 1.99999999999999991e-6 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 4.99999999999999954e186

                    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

                    if -1e-58 < (+.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.99999999999999991e-6 or +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 38.4%

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

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

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

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

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

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

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

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

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

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

                    Alternative 4: 75.4% accurate, 0.3× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\ t_3 := \frac{t\_2}{t\_0}\\ t_4 := x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\\ t_5 := -1 - x1 \cdot x1\\ t_6 := \frac{t\_2}{t\_5}\\ t_7 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_5 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\ t_8 := x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)\\ \mathbf{if}\;t\_7 \leq -5 \cdot 10^{+263}:\\ \;\;\;\;t\_8\\ \mathbf{elif}\;t\_7 \leq 5 \cdot 10^{+186}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, t\_4\right)\\ \mathbf{elif}\;t\_7 \leq \infty:\\ \;\;\;\;t\_8\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
                    (FPCore (x1 x2)
                     :precision binary64
                     (let* ((t_0 (+ (* x1 x1) 1.0))
                            (t_1 (* x1 (* x1 3.0)))
                            (t_2 (- (+ t_1 (* 2.0 x2)) x1))
                            (t_3 (/ t_2 t_0))
                            (t_4 (* x1 (fma 9.0 x1 -1.0)))
                            (t_5 (- -1.0 (* x1 x1)))
                            (t_6 (/ t_2 t_5))
                            (t_7
                             (+
                              x1
                              (+
                               (+
                                x1
                                (+
                                 (+
                                  (*
                                   (+
                                    (* (* x1 x1) (+ 6.0 (* 4.0 t_6)))
                                    (* (* (* x1 2.0) t_3) (+ 3.0 t_6)))
                                   t_5)
                                  (* t_1 t_3))
                                 (* x1 (* x1 x1))))
                               (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))))
                            (t_8 (* x2 (* x2 (* x1 8.0)))))
                       (if (<= t_7 -5e+263)
                         t_8
                         (if (<= t_7 5e+186) (fma x2 -6.0 t_4) (if (<= t_7 INFINITY) t_8 t_4)))))
                    double code(double x1, double x2) {
                    	double t_0 = (x1 * x1) + 1.0;
                    	double t_1 = x1 * (x1 * 3.0);
                    	double t_2 = (t_1 + (2.0 * x2)) - x1;
                    	double t_3 = t_2 / t_0;
                    	double t_4 = x1 * fma(9.0, x1, -1.0);
                    	double t_5 = -1.0 - (x1 * x1);
                    	double t_6 = t_2 / t_5;
                    	double t_7 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_3) * (3.0 + t_6))) * t_5) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
                    	double t_8 = x2 * (x2 * (x1 * 8.0));
                    	double tmp;
                    	if (t_7 <= -5e+263) {
                    		tmp = t_8;
                    	} else if (t_7 <= 5e+186) {
                    		tmp = fma(x2, -6.0, t_4);
                    	} else if (t_7 <= ((double) INFINITY)) {
                    		tmp = t_8;
                    	} else {
                    		tmp = t_4;
                    	}
                    	return tmp;
                    }
                    
                    function code(x1, x2)
                    	t_0 = Float64(Float64(x1 * x1) + 1.0)
                    	t_1 = Float64(x1 * Float64(x1 * 3.0))
                    	t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1)
                    	t_3 = Float64(t_2 / t_0)
                    	t_4 = Float64(x1 * fma(9.0, x1, -1.0))
                    	t_5 = Float64(-1.0 - Float64(x1 * x1))
                    	t_6 = Float64(t_2 / t_5)
                    	t_7 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_6))) * t_5) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0))))
                    	t_8 = Float64(x2 * Float64(x2 * Float64(x1 * 8.0)))
                    	tmp = 0.0
                    	if (t_7 <= -5e+263)
                    		tmp = t_8;
                    	elseif (t_7 <= 5e+186)
                    		tmp = fma(x2, -6.0, t_4);
                    	elseif (t_7 <= Inf)
                    		tmp = t_8;
                    	else
                    		tmp = t_4;
                    	end
                    	return tmp
                    end
                    
                    code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(9.0 * x1 + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x2 * N[(x2 * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$7, -5e+263], t$95$8, If[LessEqual[t$95$7, 5e+186], N[(x2 * -6.0 + t$95$4), $MachinePrecision], If[LessEqual[t$95$7, Infinity], t$95$8, t$95$4]]]]]]]]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := x1 \cdot x1 + 1\\
                    t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
                    t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
                    t_3 := \frac{t\_2}{t\_0}\\
                    t_4 := x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\\
                    t_5 := -1 - x1 \cdot x1\\
                    t_6 := \frac{t\_2}{t\_5}\\
                    t_7 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_6\right)\right) \cdot t\_5 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
                    t_8 := x2 \cdot \left(x2 \cdot \left(x1 \cdot 8\right)\right)\\
                    \mathbf{if}\;t\_7 \leq -5 \cdot 10^{+263}:\\
                    \;\;\;\;t\_8\\
                    
                    \mathbf{elif}\;t\_7 \leq 5 \cdot 10^{+186}:\\
                    \;\;\;\;\mathsf{fma}\left(x2, -6, t\_4\right)\\
                    
                    \mathbf{elif}\;t\_7 \leq \infty:\\
                    \;\;\;\;t\_8\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_4\\
                    
                    
                    \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)))))) < -5.00000000000000022e263 or 4.99999999999999954e186 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

                          if -5.00000000000000022e263 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 4.99999999999999954e186

                          1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

                              1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

                              Alternative 5: 50.2% accurate, 0.3× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\ t_3 := \frac{t\_2}{t\_0}\\ t_4 := -1 - x1 \cdot x1\\ t_5 := \frac{t\_2}{t\_4}\\ t_6 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_5\right)\right) \cdot t\_4 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\ \mathbf{if}\;t\_6 \leq -1 \cdot 10^{-58}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;t\_6 \leq 10^{-25}:\\ \;\;\;\;-x1\\ \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+186}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \left(x1 \cdot 9\right)\\ \end{array} \end{array} \]
                              (FPCore (x1 x2)
                               :precision binary64
                               (let* ((t_0 (+ (* x1 x1) 1.0))
                                      (t_1 (* x1 (* x1 3.0)))
                                      (t_2 (- (+ t_1 (* 2.0 x2)) x1))
                                      (t_3 (/ t_2 t_0))
                                      (t_4 (- -1.0 (* x1 x1)))
                                      (t_5 (/ t_2 t_4))
                                      (t_6
                                       (+
                                        x1
                                        (+
                                         (+
                                          x1
                                          (+
                                           (+
                                            (*
                                             (+
                                              (* (* x1 x1) (+ 6.0 (* 4.0 t_5)))
                                              (* (* (* x1 2.0) t_3) (+ 3.0 t_5)))
                                             t_4)
                                            (* t_1 t_3))
                                           (* x1 (* x1 x1))))
                                         (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
                                 (if (<= t_6 -1e-58)
                                   (* x2 -6.0)
                                   (if (<= t_6 1e-25)
                                     (- x1)
                                     (if (<= t_6 5e+186) (* x2 -6.0) (* x1 (* x1 9.0)))))))
                              double code(double x1, double x2) {
                              	double t_0 = (x1 * x1) + 1.0;
                              	double t_1 = x1 * (x1 * 3.0);
                              	double t_2 = (t_1 + (2.0 * x2)) - x1;
                              	double t_3 = t_2 / t_0;
                              	double t_4 = -1.0 - (x1 * x1);
                              	double t_5 = t_2 / t_4;
                              	double t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
                              	double tmp;
                              	if (t_6 <= -1e-58) {
                              		tmp = x2 * -6.0;
                              	} else if (t_6 <= 1e-25) {
                              		tmp = -x1;
                              	} else if (t_6 <= 5e+186) {
                              		tmp = x2 * -6.0;
                              	} else {
                              		tmp = x1 * (x1 * 9.0);
                              	}
                              	return tmp;
                              }
                              
                              real(8) function code(x1, x2)
                                  real(8), intent (in) :: x1
                                  real(8), intent (in) :: x2
                                  real(8) :: t_0
                                  real(8) :: t_1
                                  real(8) :: t_2
                                  real(8) :: t_3
                                  real(8) :: t_4
                                  real(8) :: t_5
                                  real(8) :: t_6
                                  real(8) :: tmp
                                  t_0 = (x1 * x1) + 1.0d0
                                  t_1 = x1 * (x1 * 3.0d0)
                                  t_2 = (t_1 + (2.0d0 * x2)) - x1
                                  t_3 = t_2 / t_0
                                  t_4 = (-1.0d0) - (x1 * x1)
                                  t_5 = t_2 / t_4
                                  t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0d0 + (4.0d0 * t_5))) + (((x1 * 2.0d0) * t_3) * (3.0d0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)))
                                  if (t_6 <= (-1d-58)) then
                                      tmp = x2 * (-6.0d0)
                                  else if (t_6 <= 1d-25) then
                                      tmp = -x1
                                  else if (t_6 <= 5d+186) then
                                      tmp = x2 * (-6.0d0)
                                  else
                                      tmp = x1 * (x1 * 9.0d0)
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x1, double x2) {
                              	double t_0 = (x1 * x1) + 1.0;
                              	double t_1 = x1 * (x1 * 3.0);
                              	double t_2 = (t_1 + (2.0 * x2)) - x1;
                              	double t_3 = t_2 / t_0;
                              	double t_4 = -1.0 - (x1 * x1);
                              	double t_5 = t_2 / t_4;
                              	double t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
                              	double tmp;
                              	if (t_6 <= -1e-58) {
                              		tmp = x2 * -6.0;
                              	} else if (t_6 <= 1e-25) {
                              		tmp = -x1;
                              	} else if (t_6 <= 5e+186) {
                              		tmp = x2 * -6.0;
                              	} else {
                              		tmp = x1 * (x1 * 9.0);
                              	}
                              	return tmp;
                              }
                              
                              def code(x1, x2):
                              	t_0 = (x1 * x1) + 1.0
                              	t_1 = x1 * (x1 * 3.0)
                              	t_2 = (t_1 + (2.0 * x2)) - x1
                              	t_3 = t_2 / t_0
                              	t_4 = -1.0 - (x1 * x1)
                              	t_5 = t_2 / t_4
                              	t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)))
                              	tmp = 0
                              	if t_6 <= -1e-58:
                              		tmp = x2 * -6.0
                              	elif t_6 <= 1e-25:
                              		tmp = -x1
                              	elif t_6 <= 5e+186:
                              		tmp = x2 * -6.0
                              	else:
                              		tmp = x1 * (x1 * 9.0)
                              	return tmp
                              
                              function code(x1, x2)
                              	t_0 = Float64(Float64(x1 * x1) + 1.0)
                              	t_1 = Float64(x1 * Float64(x1 * 3.0))
                              	t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1)
                              	t_3 = Float64(t_2 / t_0)
                              	t_4 = Float64(-1.0 - Float64(x1 * x1))
                              	t_5 = Float64(t_2 / t_4)
                              	t_6 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_5))) * t_4) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0))))
                              	tmp = 0.0
                              	if (t_6 <= -1e-58)
                              		tmp = Float64(x2 * -6.0);
                              	elseif (t_6 <= 1e-25)
                              		tmp = Float64(-x1);
                              	elseif (t_6 <= 5e+186)
                              		tmp = Float64(x2 * -6.0);
                              	else
                              		tmp = Float64(x1 * Float64(x1 * 9.0));
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x1, x2)
                              	t_0 = (x1 * x1) + 1.0;
                              	t_1 = x1 * (x1 * 3.0);
                              	t_2 = (t_1 + (2.0 * x2)) - x1;
                              	t_3 = t_2 / t_0;
                              	t_4 = -1.0 - (x1 * x1);
                              	t_5 = t_2 / t_4;
                              	t_6 = x1 + ((x1 + ((((((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5))) * t_4) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
                              	tmp = 0.0;
                              	if (t_6 <= -1e-58)
                              		tmp = x2 * -6.0;
                              	elseif (t_6 <= 1e-25)
                              		tmp = -x1;
                              	elseif (t_6 <= 5e+186)
                              		tmp = x2 * -6.0;
                              	else
                              		tmp = x1 * (x1 * 9.0);
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(x1 + N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, -1e-58], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$6, 1e-25], (-x1), If[LessEqual[t$95$6, 5e+186], N[(x2 * -6.0), $MachinePrecision], N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_0 := x1 \cdot x1 + 1\\
                              t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
                              t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
                              t_3 := \frac{t\_2}{t\_0}\\
                              t_4 := -1 - x1 \cdot x1\\
                              t_5 := \frac{t\_2}{t\_4}\\
                              t_6 := x1 + \left(\left(x1 + \left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_5\right)\right) \cdot t\_4 + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
                              \mathbf{if}\;t\_6 \leq -1 \cdot 10^{-58}:\\
                              \;\;\;\;x2 \cdot -6\\
                              
                              \mathbf{elif}\;t\_6 \leq 10^{-25}:\\
                              \;\;\;\;-x1\\
                              
                              \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+186}:\\
                              \;\;\;\;x2 \cdot -6\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;x1 \cdot \left(x1 \cdot 9\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)))))) < -1e-58 or 1.00000000000000004e-25 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 4.99999999999999954e186

                                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

                                if -1e-58 < (+.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.00000000000000004e-25

                                1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto -x1 \]

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

                                    1. Initial program 37.3%

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 6: 92.2% accurate, 0.3× speedup?

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

                                        1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

                                          if 1e22 < (+.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 \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{3}\right) \]
                                          4. Step-by-step derivation
                                            1. Applied rewrites88.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 \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{3}\right) \]

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

                                            1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 7: 81.8% accurate, 0.5× speedup?

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

                                                  1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

                                                      if -5.00000000000000022e263 < (+.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.00000000000000001e78

                                                      1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

                                                          if 1.00000000000000001e78 < (+.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 46.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 8: 99.2% accurate, 0.5× speedup?

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

                                                                1. Initial program 99.4%

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

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

                                                                1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    Alternative 9: 95.6% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

                                                                      if -31000 < x1 < 4.8e21

                                                                      1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

                                                                        if 4.8e21 < x1

                                                                        1. Initial program 41.1%

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

                                                                          \[\leadsto x1 + \color{blue}{{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. lower-*.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. lower-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. lower--.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. lower-/.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. Applied rewrites95.6%

                                                                          \[\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)} \]
                                                                      10. Recombined 3 regimes into one program.
                                                                      11. Final simplification96.1%

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

                                                                      Alternative 10: 95.3% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

                                                                            \[\leadsto x1 + \mathsf{fma}\left(\left(x1 \cdot \left(6 + \left(\frac{\mathsf{fma}\left(x2, 8, -12\right)}{x1 \cdot x1} + \frac{9}{x1 \cdot x1}\right)\right)\right) \cdot \left(x1 \cdot x1\right), \color{blue}{x1}, \frac{x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)}{x1 \cdot -0.3333333333333333}\right) \]
                                                                          3. Applied rewrites93.6%

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

                                                                          if -31000 < x1 < 4.8e21

                                                                          1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

                                                                            if 4.8e21 < x1

                                                                            1. Initial program 41.1%

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

                                                                              \[\leadsto x1 + \color{blue}{{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. lower-*.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. lower-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. lower--.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. lower-/.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. Applied rewrites95.6%

                                                                              \[\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)} \]
                                                                          10. Recombined 3 regimes into one program.
                                                                          11. Final simplification96.1%

                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -31000:\\ \;\;\;\;x1 + \mathsf{fma}\left(x1 \cdot \left(x1 \cdot \mathsf{fma}\left(\frac{1}{x1 \cdot x1}, \mathsf{fma}\left(x2, 8, -3\right), 6\right)\right), x1 \cdot x1, -3 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\ \;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(x1, \mathsf{fma}\left(12, x1, \mathsf{fma}\left(x2, 8, -12\right)\right), -6\right), x1 \cdot \mathsf{fma}\left(9, x1, -1\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} \]
                                                                          12. Add Preprocessing

                                                                          Alternative 11: 95.3% accurate, 4.0× speedup?

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto x1 + \mathsf{fma}\left(\left(x1 \cdot \left(6 + \left(\frac{\mathsf{fma}\left(x2, 8, -12\right)}{x1 \cdot x1} + \frac{9}{x1 \cdot x1}\right)\right)\right) \cdot \left(x1 \cdot x1\right), \color{blue}{x1}, \frac{x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)}{x1 \cdot -0.3333333333333333}\right) \]
                                                                              3. Applied rewrites93.6%

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

                                                                              if -31000 < x1 < 4.8e21

                                                                              1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

                                                                                if 4.8e21 < x1

                                                                                1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  Alternative 12: 88.3% accurate, 6.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        if -31000 < x1 < -1.6200000000000001e-174 or 1.29999999999999992e-209 < x1 < 4.8e21

                                                                                        1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

                                                                                          if -1.6200000000000001e-174 < x1 < 1.29999999999999992e-209

                                                                                          1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

                                                                                              if 4.8e21 < x1

                                                                                              1. Initial program 41.1%

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

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

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

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

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

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

                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -31000:\\ \;\;\;\;x1 + x1 \cdot \left(x1 \cdot \mathsf{fma}\left(x1, \mathsf{fma}\left(6, x1, -3\right), -3\right)\right)\\ \mathbf{elif}\;x1 \leq -1.62 \cdot 10^{-174}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(x2, \mathsf{fma}\left(x2, 8, -12\right), -1\right)\right)\\ \mathbf{elif}\;x1 \leq 1.3 \cdot 10^{-209}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(9, x1, -1\right)\right)\\ \mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\ \;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(x2, \mathsf{fma}\left(x2, 8, -12\right), -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\ \end{array} \]
                                                                                              9. Add Preprocessing

                                                                                              Alternative 13: 95.6% accurate, 6.2× speedup?

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

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

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

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

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

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

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

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

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

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

                                                                                                  if -31000 < x1 < 4.8e21

                                                                                                  1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

                                                                                                    if 4.8e21 < x1

                                                                                                    1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                      Alternative 14: 95.5% accurate, 6.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                            if -31000 < x1 < 4.8e21

                                                                                                            1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

                                                                                                            Alternative 15: 95.1% accurate, 6.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                  if -31000 < x1 < 4.8e21

                                                                                                                  1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                    Alternative 16: 92.8% accurate, 7.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                          if -31000 < x1 < 4.8e21

                                                                                                                          1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                              if 4.8e21 < x1

                                                                                                                              1. Initial program 41.1%

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

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

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

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

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

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

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

                                                                                                                              Alternative 17: 30.3% accurate, 9.6× speedup?

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

                                                                                                                                1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

                                                                                                                                if -4.99999999999999966e-103 < (*.f64 #s(literal 2 binary64) x2) < 2.0000000000000001e-62

                                                                                                                                1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

                                                                                                                                      \[\leadsto -x1 \]

                                                                                                                                    if 2.0000000000000001e-62 < (*.f64 #s(literal 2 binary64) x2)

                                                                                                                                    1. Initial program 81.5%

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

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

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

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

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

                                                                                                                                  Alternative 18: 30.1% accurate, 10.6× speedup?

                                                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-103}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;2 \cdot x2 \leq 2 \cdot 10^{-62}:\\ \;\;\;\;-x1\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6\\ \end{array} \end{array} \]
                                                                                                                                  (FPCore (x1 x2)
                                                                                                                                   :precision binary64
                                                                                                                                   (if (<= (* 2.0 x2) -5e-103)
                                                                                                                                     (* x2 -6.0)
                                                                                                                                     (if (<= (* 2.0 x2) 2e-62) (- x1) (* x2 -6.0))))
                                                                                                                                  double code(double x1, double x2) {
                                                                                                                                  	double tmp;
                                                                                                                                  	if ((2.0 * x2) <= -5e-103) {
                                                                                                                                  		tmp = x2 * -6.0;
                                                                                                                                  	} else if ((2.0 * x2) <= 2e-62) {
                                                                                                                                  		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) <= (-5d-103)) then
                                                                                                                                          tmp = x2 * (-6.0d0)
                                                                                                                                      else if ((2.0d0 * x2) <= 2d-62) 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) <= -5e-103) {
                                                                                                                                  		tmp = x2 * -6.0;
                                                                                                                                  	} else if ((2.0 * x2) <= 2e-62) {
                                                                                                                                  		tmp = -x1;
                                                                                                                                  	} else {
                                                                                                                                  		tmp = x2 * -6.0;
                                                                                                                                  	}
                                                                                                                                  	return tmp;
                                                                                                                                  }
                                                                                                                                  
                                                                                                                                  def code(x1, x2):
                                                                                                                                  	tmp = 0
                                                                                                                                  	if (2.0 * x2) <= -5e-103:
                                                                                                                                  		tmp = x2 * -6.0
                                                                                                                                  	elif (2.0 * x2) <= 2e-62:
                                                                                                                                  		tmp = -x1
                                                                                                                                  	else:
                                                                                                                                  		tmp = x2 * -6.0
                                                                                                                                  	return tmp
                                                                                                                                  
                                                                                                                                  function code(x1, x2)
                                                                                                                                  	tmp = 0.0
                                                                                                                                  	if (Float64(2.0 * x2) <= -5e-103)
                                                                                                                                  		tmp = Float64(x2 * -6.0);
                                                                                                                                  	elseif (Float64(2.0 * x2) <= 2e-62)
                                                                                                                                  		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) <= -5e-103)
                                                                                                                                  		tmp = x2 * -6.0;
                                                                                                                                  	elseif ((2.0 * x2) <= 2e-62)
                                                                                                                                  		tmp = -x1;
                                                                                                                                  	else
                                                                                                                                  		tmp = x2 * -6.0;
                                                                                                                                  	end
                                                                                                                                  	tmp_2 = tmp;
                                                                                                                                  end
                                                                                                                                  
                                                                                                                                  code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -5e-103], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[N[(2.0 * x2), $MachinePrecision], 2e-62], (-x1), N[(x2 * -6.0), $MachinePrecision]]]
                                                                                                                                  
                                                                                                                                  \begin{array}{l}
                                                                                                                                  
                                                                                                                                  \\
                                                                                                                                  \begin{array}{l}
                                                                                                                                  \mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-103}:\\
                                                                                                                                  \;\;\;\;x2 \cdot -6\\
                                                                                                                                  
                                                                                                                                  \mathbf{elif}\;2 \cdot x2 \leq 2 \cdot 10^{-62}:\\
                                                                                                                                  \;\;\;\;-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) < -4.99999999999999966e-103 or 2.0000000000000001e-62 < (*.f64 #s(literal 2 binary64) x2)

                                                                                                                                    1. Initial program 75.3%

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

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

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

                                                                                                                                        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
                                                                                                                                    5. Applied rewrites36.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. lower-*.f6436.8

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

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

                                                                                                                                    if -4.99999999999999966e-103 < (*.f64 #s(literal 2 binary64) x2) < 2.0000000000000001e-62

                                                                                                                                    1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                      Alternative 19: 54.1% accurate, 12.4× speedup?

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

                                                                                                                                        1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

                                                                                                                                          if -1.74999999999999996e-48 < x1 < 5.60000000000000019e-86

                                                                                                                                          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

                                                                                                                                        Alternative 20: 13.7% 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 69.5%

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

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

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

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

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

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

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

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

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

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

                                                                                                                                              \[\leadsto -x1 \]
                                                                                                                                            2. Add Preprocessing

                                                                                                                                            Reproduce

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