Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 69.9% → 99.4%
Time: 33.0s
Alternatives: 24
Speedup: 5.1×

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 24 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.4% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;6 \cdot {x1}^{4}\\


\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. Simplified99.7%

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

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

      \[\leadsto \color{blue}{6 \cdot {x1}^{4}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.8%

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

Alternative 2: 99.2% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;6 \cdot {x1}^{4}\\


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

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

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

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

Alternative 3: 98.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := t\_0 + 2 \cdot x2\\ t_2 := -1 - x1 \cdot x1\\ t_3 := \frac{x1 - t\_1}{t\_2}\\ t_4 := \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 - t\_3\right)\\ t_5 := x1 \cdot \left(x1 \cdot x1\right)\\ t_6 := x1 \cdot x1 + 1\\ \mathbf{if}\;x1 \leq -4.9 \cdot 10^{+74}:\\ \;\;\;\;6 \cdot {x1}^{4}\\ \mathbf{elif}\;x1 \leq -0.00044:\\ \;\;\;\;x1 + \left(\left(x1 + \left(t\_5 + \left(t\_0 \cdot t\_3 - t\_6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{3 - 2 \cdot x2}{x1}}{x1} - 3\right)\right) + t\_4\right)\right)\right)\right) + 9\right)\\ \mathbf{elif}\;x1 \leq 0.000175:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(3 \cdot \left(3 + \frac{-1}{x1}\right) - \left(\left(\left(t\_0 \cdot \frac{t\_1 - x1}{t\_2} + t\_6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_3 \cdot 4\right) + t\_4\right)\right) - t\_5\right) - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (* x1 3.0)))
        (t_1 (+ t_0 (* 2.0 x2)))
        (t_2 (- -1.0 (* x1 x1)))
        (t_3 (/ (- x1 t_1) t_2))
        (t_4 (* (* (* x1 2.0) t_3) (- 3.0 t_3)))
        (t_5 (* x1 (* x1 x1)))
        (t_6 (+ (* x1 x1) 1.0)))
   (if (<= x1 -4.9e+74)
     (* 6.0 (pow x1 4.0))
     (if (<= x1 -0.00044)
       (+
        x1
        (+
         (+
          x1
          (+
           t_5
           (-
            (* t_0 t_3)
            (*
             t_6
             (+
              (*
               (* x1 x1)
               (+
                6.0
                (* 4.0 (- (/ (+ 1.0 (/ (- 3.0 (* 2.0 x2)) x1)) x1) 3.0))))
              t_4)))))
         9.0))
       (if (<= x1 0.000175)
         (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
         (if (<= x1 5e+153)
           (+
            x1
            (-
             (* 3.0 (+ 3.0 (/ -1.0 x1)))
             (-
              (-
               (+
                (* t_0 (/ (- t_1 x1) t_2))
                (* t_6 (+ (* (* x1 x1) (- 6.0 (* t_3 4.0))) t_4)))
               t_5)
              x1)))
           (+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))))
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = t_0 + (2.0 * x2);
	double t_2 = -1.0 - (x1 * x1);
	double t_3 = (x1 - t_1) / t_2;
	double t_4 = ((x1 * 2.0) * t_3) * (3.0 - t_3);
	double t_5 = x1 * (x1 * x1);
	double t_6 = (x1 * x1) + 1.0;
	double tmp;
	if (x1 <= -4.9e+74) {
		tmp = 6.0 * pow(x1, 4.0);
	} else if (x1 <= -0.00044) {
		tmp = x1 + ((x1 + (t_5 + ((t_0 * t_3) - (t_6 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + ((3.0 - (2.0 * x2)) / x1)) / x1) - 3.0)))) + t_4))))) + 9.0);
	} else if (x1 <= 0.000175) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else if (x1 <= 5e+153) {
		tmp = x1 + ((3.0 * (3.0 + (-1.0 / x1))) - ((((t_0 * ((t_1 - x1) / t_2)) + (t_6 * (((x1 * x1) * (6.0 - (t_3 * 4.0))) + t_4))) - t_5) - x1));
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (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 * 3.0d0)
    t_1 = t_0 + (2.0d0 * x2)
    t_2 = (-1.0d0) - (x1 * x1)
    t_3 = (x1 - t_1) / t_2
    t_4 = ((x1 * 2.0d0) * t_3) * (3.0d0 - t_3)
    t_5 = x1 * (x1 * x1)
    t_6 = (x1 * x1) + 1.0d0
    if (x1 <= (-4.9d+74)) then
        tmp = 6.0d0 * (x1 ** 4.0d0)
    else if (x1 <= (-0.00044d0)) then
        tmp = x1 + ((x1 + (t_5 + ((t_0 * t_3) - (t_6 * (((x1 * x1) * (6.0d0 + (4.0d0 * (((1.0d0 + ((3.0d0 - (2.0d0 * x2)) / x1)) / x1) - 3.0d0)))) + t_4))))) + 9.0d0)
    else if (x1 <= 0.000175d0) then
        tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
    else if (x1 <= 5d+153) then
        tmp = x1 + ((3.0d0 * (3.0d0 + ((-1.0d0) / x1))) - ((((t_0 * ((t_1 - x1) / t_2)) + (t_6 * (((x1 * x1) * (6.0d0 - (t_3 * 4.0d0))) + t_4))) - t_5) - x1))
    else
        tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = t_0 + (2.0 * x2);
	double t_2 = -1.0 - (x1 * x1);
	double t_3 = (x1 - t_1) / t_2;
	double t_4 = ((x1 * 2.0) * t_3) * (3.0 - t_3);
	double t_5 = x1 * (x1 * x1);
	double t_6 = (x1 * x1) + 1.0;
	double tmp;
	if (x1 <= -4.9e+74) {
		tmp = 6.0 * Math.pow(x1, 4.0);
	} else if (x1 <= -0.00044) {
		tmp = x1 + ((x1 + (t_5 + ((t_0 * t_3) - (t_6 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + ((3.0 - (2.0 * x2)) / x1)) / x1) - 3.0)))) + t_4))))) + 9.0);
	} else if (x1 <= 0.000175) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else if (x1 <= 5e+153) {
		tmp = x1 + ((3.0 * (3.0 + (-1.0 / x1))) - ((((t_0 * ((t_1 - x1) / t_2)) + (t_6 * (((x1 * x1) * (6.0 - (t_3 * 4.0))) + t_4))) - t_5) - x1));
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 * (x1 * 3.0)
	t_1 = t_0 + (2.0 * x2)
	t_2 = -1.0 - (x1 * x1)
	t_3 = (x1 - t_1) / t_2
	t_4 = ((x1 * 2.0) * t_3) * (3.0 - t_3)
	t_5 = x1 * (x1 * x1)
	t_6 = (x1 * x1) + 1.0
	tmp = 0
	if x1 <= -4.9e+74:
		tmp = 6.0 * math.pow(x1, 4.0)
	elif x1 <= -0.00044:
		tmp = x1 + ((x1 + (t_5 + ((t_0 * t_3) - (t_6 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + ((3.0 - (2.0 * x2)) / x1)) / x1) - 3.0)))) + t_4))))) + 9.0)
	elif x1 <= 0.000175:
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1
	elif x1 <= 5e+153:
		tmp = x1 + ((3.0 * (3.0 + (-1.0 / x1))) - ((((t_0 * ((t_1 - x1) / t_2)) + (t_6 * (((x1 * x1) * (6.0 - (t_3 * 4.0))) + t_4))) - t_5) - x1))
	else:
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)))
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 * Float64(x1 * 3.0))
	t_1 = Float64(t_0 + Float64(2.0 * x2))
	t_2 = Float64(-1.0 - Float64(x1 * x1))
	t_3 = Float64(Float64(x1 - t_1) / t_2)
	t_4 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 - t_3))
	t_5 = Float64(x1 * Float64(x1 * x1))
	t_6 = Float64(Float64(x1 * x1) + 1.0)
	tmp = 0.0
	if (x1 <= -4.9e+74)
		tmp = Float64(6.0 * (x1 ^ 4.0));
	elseif (x1 <= -0.00044)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_5 + Float64(Float64(t_0 * t_3) - Float64(t_6 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(1.0 + Float64(Float64(3.0 - Float64(2.0 * x2)) / x1)) / x1) - 3.0)))) + t_4))))) + 9.0));
	elseif (x1 <= 0.000175)
		tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1);
	elseif (x1 <= 5e+153)
		tmp = Float64(x1 + Float64(Float64(3.0 * Float64(3.0 + Float64(-1.0 / x1))) - Float64(Float64(Float64(Float64(t_0 * Float64(Float64(t_1 - x1) / t_2)) + Float64(t_6 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_3 * 4.0))) + t_4))) - t_5) - x1)));
	else
		tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 * (x1 * 3.0);
	t_1 = t_0 + (2.0 * x2);
	t_2 = -1.0 - (x1 * x1);
	t_3 = (x1 - t_1) / t_2;
	t_4 = ((x1 * 2.0) * t_3) * (3.0 - t_3);
	t_5 = x1 * (x1 * x1);
	t_6 = (x1 * x1) + 1.0;
	tmp = 0.0;
	if (x1 <= -4.9e+74)
		tmp = 6.0 * (x1 ^ 4.0);
	elseif (x1 <= -0.00044)
		tmp = x1 + ((x1 + (t_5 + ((t_0 * t_3) - (t_6 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + ((3.0 - (2.0 * x2)) / x1)) / x1) - 3.0)))) + t_4))))) + 9.0);
	elseif (x1 <= 0.000175)
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	elseif (x1 <= 5e+153)
		tmp = x1 + ((3.0 * (3.0 + (-1.0 / x1))) - ((((t_0 * ((t_1 - x1) / t_2)) + (t_6 * (((x1 * x1) * (6.0 - (t_3 * 4.0))) + t_4))) - t_5) - x1));
	else
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 - t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 - t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -4.9e+74], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.00044], N[(x1 + N[(N[(x1 + N[(t$95$5 + N[(N[(t$95$0 * t$95$3), $MachinePrecision] - N[(t$95$6 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(1.0 + N[(N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.000175], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 + N[(N[(3.0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(t$95$0 * N[(N[(t$95$1 - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$3 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$5), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := t\_0 + 2 \cdot x2\\
t_2 := -1 - x1 \cdot x1\\
t_3 := \frac{x1 - t\_1}{t\_2}\\
t_4 := \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 - t\_3\right)\\
t_5 := x1 \cdot \left(x1 \cdot x1\right)\\
t_6 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -4.9 \cdot 10^{+74}:\\
\;\;\;\;6 \cdot {x1}^{4}\\

\mathbf{elif}\;x1 \leq -0.00044:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_5 + \left(t\_0 \cdot t\_3 - t\_6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{3 - 2 \cdot x2}{x1}}{x1} - 3\right)\right) + t\_4\right)\right)\right)\right) + 9\right)\\

\mathbf{elif}\;x1 \leq 0.000175:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\

\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(3 \cdot \left(3 + \frac{-1}{x1}\right) - \left(\left(\left(t\_0 \cdot \frac{t\_1 - x1}{t\_2} + t\_6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_3 \cdot 4\right) + t\_4\right)\right) - t\_5\right) - x1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x1 < -4.8999999999999999e74

    1. Initial program 13.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. Simplified13.5%

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

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

    if -4.8999999999999999e74 < x1 < -4.40000000000000016e-4

    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 -inf 99.1%

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

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + -1 \cdot \frac{1 + -1 \cdot \frac{2 \cdot x2 - 3}{x1}}{x1}\right) - 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 -4.40000000000000016e-4 < x1 < 1.74999999999999998e-4

    1. Initial program 99.3%

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

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

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

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

    if 1.74999999999999998e-4 < x1 < 5.00000000000000018e153

    1. Initial program 99.8%

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

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

    if 5.00000000000000018e153 < x1

    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. Simplified0.0%

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

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

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

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

Alternative 4: 98.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := \frac{x1 - \left(t\_0 + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\ t_2 := t\_0 \cdot t\_1\\ t_3 := \left(x1 \cdot 2\right) \cdot t\_1\\ t_4 := x1 \cdot \left(x1 \cdot x1\right)\\ t_5 := x1 \cdot x1 + 1\\ \mathbf{if}\;x1 \leq -4.9 \cdot 10^{+74}:\\ \;\;\;\;6 \cdot {x1}^{4}\\ \mathbf{elif}\;x1 \leq -0.0105:\\ \;\;\;\;x1 + \left(\left(x1 + \left(t\_4 + \left(t\_2 - t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{3 - 2 \cdot x2}{x1}}{x1} - 3\right)\right) + t\_3 \cdot \left(3 - t\_1\right)\right)\right)\right)\right) + 9\right)\\ \mathbf{elif}\;x1 \leq 0.00046:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_5 \cdot \left(t\_3 \cdot \left(t\_1 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_1 \cdot 4 - 6\right)\right) + t\_2\right) + t\_4\right)\right) + 9\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (* x1 3.0)))
        (t_1 (/ (- x1 (+ t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))
        (t_2 (* t_0 t_1))
        (t_3 (* (* x1 2.0) t_1))
        (t_4 (* x1 (* x1 x1)))
        (t_5 (+ (* x1 x1) 1.0)))
   (if (<= x1 -4.9e+74)
     (* 6.0 (pow x1 4.0))
     (if (<= x1 -0.0105)
       (+
        x1
        (+
         (+
          x1
          (+
           t_4
           (-
            t_2
            (*
             t_5
             (+
              (*
               (* x1 x1)
               (+
                6.0
                (* 4.0 (- (/ (+ 1.0 (/ (- 3.0 (* 2.0 x2)) x1)) x1) 3.0))))
              (* t_3 (- 3.0 t_1)))))))
         9.0))
       (if (<= x1 0.00046)
         (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
         (if (<= x1 5e+153)
           (+
            x1
            (+
             (+
              x1
              (+
               (+
                (*
                 t_5
                 (+ (* t_3 (- t_1 3.0)) (* (* x1 x1) (- (* t_1 4.0) 6.0))))
                t_2)
               t_4))
             9.0))
           (+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))))
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1));
	double t_2 = t_0 * t_1;
	double t_3 = (x1 * 2.0) * t_1;
	double t_4 = x1 * (x1 * x1);
	double t_5 = (x1 * x1) + 1.0;
	double tmp;
	if (x1 <= -4.9e+74) {
		tmp = 6.0 * pow(x1, 4.0);
	} else if (x1 <= -0.0105) {
		tmp = x1 + ((x1 + (t_4 + (t_2 - (t_5 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + ((3.0 - (2.0 * x2)) / x1)) / x1) - 3.0)))) + (t_3 * (3.0 - t_1))))))) + 9.0);
	} else if (x1 <= 0.00046) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else if (x1 <= 5e+153) {
		tmp = x1 + ((x1 + (((t_5 * ((t_3 * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + t_2) + t_4)) + 9.0);
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (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) :: tmp
    t_0 = x1 * (x1 * 3.0d0)
    t_1 = (x1 - (t_0 + (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1))
    t_2 = t_0 * t_1
    t_3 = (x1 * 2.0d0) * t_1
    t_4 = x1 * (x1 * x1)
    t_5 = (x1 * x1) + 1.0d0
    if (x1 <= (-4.9d+74)) then
        tmp = 6.0d0 * (x1 ** 4.0d0)
    else if (x1 <= (-0.0105d0)) then
        tmp = x1 + ((x1 + (t_4 + (t_2 - (t_5 * (((x1 * x1) * (6.0d0 + (4.0d0 * (((1.0d0 + ((3.0d0 - (2.0d0 * x2)) / x1)) / x1) - 3.0d0)))) + (t_3 * (3.0d0 - t_1))))))) + 9.0d0)
    else if (x1 <= 0.00046d0) then
        tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
    else if (x1 <= 5d+153) then
        tmp = x1 + ((x1 + (((t_5 * ((t_3 * (t_1 - 3.0d0)) + ((x1 * x1) * ((t_1 * 4.0d0) - 6.0d0)))) + t_2) + t_4)) + 9.0d0)
    else
        tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1));
	double t_2 = t_0 * t_1;
	double t_3 = (x1 * 2.0) * t_1;
	double t_4 = x1 * (x1 * x1);
	double t_5 = (x1 * x1) + 1.0;
	double tmp;
	if (x1 <= -4.9e+74) {
		tmp = 6.0 * Math.pow(x1, 4.0);
	} else if (x1 <= -0.0105) {
		tmp = x1 + ((x1 + (t_4 + (t_2 - (t_5 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + ((3.0 - (2.0 * x2)) / x1)) / x1) - 3.0)))) + (t_3 * (3.0 - t_1))))))) + 9.0);
	} else if (x1 <= 0.00046) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else if (x1 <= 5e+153) {
		tmp = x1 + ((x1 + (((t_5 * ((t_3 * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + t_2) + t_4)) + 9.0);
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 * (x1 * 3.0)
	t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1))
	t_2 = t_0 * t_1
	t_3 = (x1 * 2.0) * t_1
	t_4 = x1 * (x1 * x1)
	t_5 = (x1 * x1) + 1.0
	tmp = 0
	if x1 <= -4.9e+74:
		tmp = 6.0 * math.pow(x1, 4.0)
	elif x1 <= -0.0105:
		tmp = x1 + ((x1 + (t_4 + (t_2 - (t_5 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + ((3.0 - (2.0 * x2)) / x1)) / x1) - 3.0)))) + (t_3 * (3.0 - t_1))))))) + 9.0)
	elif x1 <= 0.00046:
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1
	elif x1 <= 5e+153:
		tmp = x1 + ((x1 + (((t_5 * ((t_3 * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + t_2) + t_4)) + 9.0)
	else:
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)))
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 * Float64(x1 * 3.0))
	t_1 = Float64(Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))
	t_2 = Float64(t_0 * t_1)
	t_3 = Float64(Float64(x1 * 2.0) * t_1)
	t_4 = Float64(x1 * Float64(x1 * x1))
	t_5 = Float64(Float64(x1 * x1) + 1.0)
	tmp = 0.0
	if (x1 <= -4.9e+74)
		tmp = Float64(6.0 * (x1 ^ 4.0));
	elseif (x1 <= -0.0105)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_4 + Float64(t_2 - Float64(t_5 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(1.0 + Float64(Float64(3.0 - Float64(2.0 * x2)) / x1)) / x1) - 3.0)))) + Float64(t_3 * Float64(3.0 - t_1))))))) + 9.0));
	elseif (x1 <= 0.00046)
		tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1);
	elseif (x1 <= 5e+153)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_5 * Float64(Float64(t_3 * Float64(t_1 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_1 * 4.0) - 6.0)))) + t_2) + t_4)) + 9.0));
	else
		tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 * (x1 * 3.0);
	t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1));
	t_2 = t_0 * t_1;
	t_3 = (x1 * 2.0) * t_1;
	t_4 = x1 * (x1 * x1);
	t_5 = (x1 * x1) + 1.0;
	tmp = 0.0;
	if (x1 <= -4.9e+74)
		tmp = 6.0 * (x1 ^ 4.0);
	elseif (x1 <= -0.0105)
		tmp = x1 + ((x1 + (t_4 + (t_2 - (t_5 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + ((3.0 - (2.0 * x2)) / x1)) / x1) - 3.0)))) + (t_3 * (3.0 - t_1))))))) + 9.0);
	elseif (x1 <= 0.00046)
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	elseif (x1 <= 5e+153)
		tmp = x1 + ((x1 + (((t_5 * ((t_3 * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + t_2) + t_4)) + 9.0);
	else
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -4.9e+74], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.0105], N[(x1 + N[(N[(x1 + N[(t$95$4 + N[(t$95$2 - N[(t$95$5 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(1.0 + N[(N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(3.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.00046], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$5 * N[(N[(t$95$3 * N[(t$95$1 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$1 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \frac{x1 - \left(t\_0 + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\
t_2 := t\_0 \cdot t\_1\\
t_3 := \left(x1 \cdot 2\right) \cdot t\_1\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -4.9 \cdot 10^{+74}:\\
\;\;\;\;6 \cdot {x1}^{4}\\

\mathbf{elif}\;x1 \leq -0.0105:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_4 + \left(t\_2 - t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{3 - 2 \cdot x2}{x1}}{x1} - 3\right)\right) + t\_3 \cdot \left(3 - t\_1\right)\right)\right)\right)\right) + 9\right)\\

\mathbf{elif}\;x1 \leq 0.00046:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\

\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_5 \cdot \left(t\_3 \cdot \left(t\_1 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_1 \cdot 4 - 6\right)\right) + t\_2\right) + t\_4\right)\right) + 9\right)\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x1 < -4.8999999999999999e74

    1. Initial program 13.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. Simplified13.5%

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

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

    if -4.8999999999999999e74 < x1 < -0.0105000000000000007

    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 -inf 99.1%

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

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + -1 \cdot \frac{1 + -1 \cdot \frac{2 \cdot x2 - 3}{x1}}{x1}\right) - 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 -0.0105000000000000007 < x1 < 4.6000000000000001e-4

    1. Initial program 99.3%

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

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

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

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

    if 4.6000000000000001e-4 < x1 < 5.00000000000000018e153

    1. Initial program 99.8%

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

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \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 5.00000000000000018e153 < x1

    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. Simplified0.0%

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

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

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

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

Alternative 5: 96.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 6 \cdot {x1}^{4}\\
t_2 := t\_0 + 2 \cdot x2\\
t_3 := -1 - x1 \cdot x1\\
t_4 := \frac{x1 - t\_2}{t\_3}\\
t_5 := 3 - t\_4\\
t_6 := x1 \cdot \left(x1 \cdot x1\right)\\
t_7 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -4.9 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x1 \leq -0.011:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_6 + \left(t\_0 \cdot t\_4 - t\_7 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{3 - 2 \cdot x2}{x1}}{x1} - 3\right)\right) + \left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot t\_5\right)\right)\right)\right) + 9\right)\\

\mathbf{elif}\;x1 \leq 10^{+83}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_7} - \left(x1 + \left(t\_6 - \left(t\_0 \cdot \frac{t\_2 - x1}{t\_3} + t\_7 \cdot \left(\left(x1 \cdot \left(x2 \cdot 4\right)\right) \cdot t\_5 + \left(x1 \cdot x1\right) \cdot \left(6 - t\_4 \cdot 4\right)\right)\right)\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x1 < -4.8999999999999999e74 or 1.00000000000000003e83 < x1

    1. Initial program 21.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. Simplified21.8%

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

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

    if -4.8999999999999999e74 < x1 < -0.010999999999999999

    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 -inf 99.1%

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

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + -1 \cdot \frac{1 + -1 \cdot \frac{2 \cdot x2 - 3}{x1}}{x1}\right) - 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 -0.010999999999999999 < x1 < 1.00000000000000003e83

    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. Step-by-step derivation
      1. add-cube-cbrt99.1%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr99.2%

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

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\left(\left(x1 \cdot \left(x2 \cdot {\left(\sqrt[3]{2}\right)}^{3}\right)\right) \cdot 2\right)} \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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. rem-cube-cbrt96.9%

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\left(x1 \cdot \left(x2 \cdot 4\right)\right)} \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification97.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -4.9 \cdot 10^{+74}:\\ \;\;\;\;6 \cdot {x1}^{4}\\ \mathbf{elif}\;x1 \leq -0.011:\\ \;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} - \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{3 - 2 \cdot x2}{x1}}{x1} - 3\right)\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\right) \cdot \left(3 - \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\right)\right)\right)\right)\right) + 9\right)\\ \mathbf{elif}\;x1 \leq 10^{+83}:\\ \;\;\;\;x1 - \left(3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{x1 \cdot x1 + 1} - \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1} + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot \left(x2 \cdot 4\right)\right) \cdot \left(3 - \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\right) + \left(x1 \cdot x1\right) \cdot \left(6 - \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} \cdot 4\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;6 \cdot {x1}^{4}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 94.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := t\_1 + 2 \cdot x2\\ t_3 := -1 - x1 \cdot x1\\ t_4 := \frac{x1 - t\_2}{t\_3}\\ \mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58} \lor \neg \left(x1 \leq 10^{+83}\right):\\ \;\;\;\;6 \cdot {x1}^{4}\\ \mathbf{else}:\\ \;\;\;\;x1 - \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_0} - \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_1 \cdot \frac{t\_2 - x1}{t\_3} + t\_0 \cdot \left(\left(x1 \cdot \left(x2 \cdot 4\right)\right) \cdot \left(3 - t\_4\right) + \left(x1 \cdot x1\right) \cdot \left(6 - t\_4 \cdot 4\right)\right)\right)\right)\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)))
        (t_3 (- -1.0 (* x1 x1)))
        (t_4 (/ (- x1 t_2) t_3)))
   (if (or (<= x1 -1.45e+58) (not (<= x1 1e+83)))
     (* 6.0 (pow x1 4.0))
     (-
      x1
      (-
       (* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_0))
       (+
        x1
        (-
         (* x1 (* x1 x1))
         (+
          (* t_1 (/ (- t_2 x1) t_3))
          (*
           t_0
           (+
            (* (* x1 (* x2 4.0)) (- 3.0 t_4))
            (* (* x1 x1) (- 6.0 (* t_4 4.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);
	double t_3 = -1.0 - (x1 * x1);
	double t_4 = (x1 - t_2) / t_3;
	double tmp;
	if ((x1 <= -1.45e+58) || !(x1 <= 1e+83)) {
		tmp = 6.0 * pow(x1, 4.0);
	} else {
		tmp = x1 - ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) - (x1 + ((x1 * (x1 * x1)) - ((t_1 * ((t_2 - x1) / t_3)) + (t_0 * (((x1 * (x2 * 4.0)) * (3.0 - t_4)) + ((x1 * x1) * (6.0 - (t_4 * 4.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) :: tmp
    t_0 = (x1 * x1) + 1.0d0
    t_1 = x1 * (x1 * 3.0d0)
    t_2 = t_1 + (2.0d0 * x2)
    t_3 = (-1.0d0) - (x1 * x1)
    t_4 = (x1 - t_2) / t_3
    if ((x1 <= (-1.45d+58)) .or. (.not. (x1 <= 1d+83))) then
        tmp = 6.0d0 * (x1 ** 4.0d0)
    else
        tmp = x1 - ((3.0d0 * ((x1 - (t_1 - (2.0d0 * x2))) / t_0)) - (x1 + ((x1 * (x1 * x1)) - ((t_1 * ((t_2 - x1) / t_3)) + (t_0 * (((x1 * (x2 * 4.0d0)) * (3.0d0 - t_4)) + ((x1 * x1) * (6.0d0 - (t_4 * 4.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);
	double t_3 = -1.0 - (x1 * x1);
	double t_4 = (x1 - t_2) / t_3;
	double tmp;
	if ((x1 <= -1.45e+58) || !(x1 <= 1e+83)) {
		tmp = 6.0 * Math.pow(x1, 4.0);
	} else {
		tmp = x1 - ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) - (x1 + ((x1 * (x1 * x1)) - ((t_1 * ((t_2 - x1) / t_3)) + (t_0 * (((x1 * (x2 * 4.0)) * (3.0 - t_4)) + ((x1 * x1) * (6.0 - (t_4 * 4.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)
	t_3 = -1.0 - (x1 * x1)
	t_4 = (x1 - t_2) / t_3
	tmp = 0
	if (x1 <= -1.45e+58) or not (x1 <= 1e+83):
		tmp = 6.0 * math.pow(x1, 4.0)
	else:
		tmp = x1 - ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) - (x1 + ((x1 * (x1 * x1)) - ((t_1 * ((t_2 - x1) / t_3)) + (t_0 * (((x1 * (x2 * 4.0)) * (3.0 - t_4)) + ((x1 * x1) * (6.0 - (t_4 * 4.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(t_1 + Float64(2.0 * x2))
	t_3 = Float64(-1.0 - Float64(x1 * x1))
	t_4 = Float64(Float64(x1 - t_2) / t_3)
	tmp = 0.0
	if ((x1 <= -1.45e+58) || !(x1 <= 1e+83))
		tmp = Float64(6.0 * (x1 ^ 4.0));
	else
		tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_0)) - Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_1 * Float64(Float64(t_2 - x1) / t_3)) + Float64(t_0 * Float64(Float64(Float64(x1 * Float64(x2 * 4.0)) * Float64(3.0 - t_4)) + Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_4 * 4.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);
	t_3 = -1.0 - (x1 * x1);
	t_4 = (x1 - t_2) / t_3;
	tmp = 0.0;
	if ((x1 <= -1.45e+58) || ~((x1 <= 1e+83)))
		tmp = 6.0 * (x1 ^ 4.0);
	else
		tmp = x1 - ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_0)) - (x1 + ((x1 * (x1 * x1)) - ((t_1 * ((t_2 - x1) / t_3)) + (t_0 * (((x1 * (x2 * 4.0)) * (3.0 - t_4)) + ((x1 * x1) * (6.0 - (t_4 * 4.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[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 - t$95$2), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[Or[LessEqual[x1, -1.45e+58], N[Not[LessEqual[x1, 1e+83]], $MachinePrecision]], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$1 * N[(N[(t$95$2 - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision] * N[(3.0 - t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$4 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := t\_1 + 2 \cdot x2\\
t_3 := -1 - x1 \cdot x1\\
t_4 := \frac{x1 - t\_2}{t\_3}\\
\mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58} \lor \neg \left(x1 \leq 10^{+83}\right):\\
\;\;\;\;6 \cdot {x1}^{4}\\

\mathbf{else}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_0} - \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_1 \cdot \frac{t\_2 - x1}{t\_3} + t\_0 \cdot \left(\left(x1 \cdot \left(x2 \cdot 4\right)\right) \cdot \left(3 - t\_4\right) + \left(x1 \cdot x1\right) \cdot \left(6 - t\_4 \cdot 4\right)\right)\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < -1.45000000000000001e58 or 1.00000000000000003e83 < x1

    1. Initial program 27.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. Simplified27.5%

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

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

    if -1.45000000000000001e58 < x1 < 1.00000000000000003e83

    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. Step-by-step derivation
      1. add-cube-cbrt99.1%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr99.1%

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

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\left(\left(x1 \cdot \left(x2 \cdot {\left(\sqrt[3]{2}\right)}^{3}\right)\right) \cdot 2\right)} \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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. rem-cube-cbrt94.3%

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\left(x1 \cdot \left(x2 \cdot 4\right)\right)} \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58} \lor \neg \left(x1 \leq 10^{+83}\right):\\ \;\;\;\;6 \cdot {x1}^{4}\\ \mathbf{else}:\\ \;\;\;\;x1 - \left(3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{x1 \cdot x1 + 1} - \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1} + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot \left(x2 \cdot 4\right)\right) \cdot \left(3 - \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\right) + \left(x1 \cdot x1\right) \cdot \left(6 - \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} \cdot 4\right)\right)\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 92.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -920000 \lor \neg \left(x1 \leq 1.25 \cdot 10^{+39}\right):\\ \;\;\;\;6 \cdot {x1}^{4}\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (or (<= x1 -920000.0) (not (<= x1 1.25e+39)))
   (* 6.0 (pow x1 4.0))
   (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)))
double code(double x1, double x2) {
	double tmp;
	if ((x1 <= -920000.0) || !(x1 <= 1.25e+39)) {
		tmp = 6.0 * pow(x1, 4.0);
	} else {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: tmp
    if ((x1 <= (-920000.0d0)) .or. (.not. (x1 <= 1.25d+39))) then
        tmp = 6.0d0 * (x1 ** 4.0d0)
    else
        tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if ((x1 <= -920000.0) || !(x1 <= 1.25e+39)) {
		tmp = 6.0 * Math.pow(x1, 4.0);
	} else {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if (x1 <= -920000.0) or not (x1 <= 1.25e+39):
		tmp = 6.0 * math.pow(x1, 4.0)
	else:
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1
	return tmp
function code(x1, x2)
	tmp = 0.0
	if ((x1 <= -920000.0) || !(x1 <= 1.25e+39))
		tmp = Float64(6.0 * (x1 ^ 4.0));
	else
		tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1);
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if ((x1 <= -920000.0) || ~((x1 <= 1.25e+39)))
		tmp = 6.0 * (x1 ^ 4.0);
	else
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[Or[LessEqual[x1, -920000.0], N[Not[LessEqual[x1, 1.25e+39]], $MachinePrecision]], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -920000 \lor \neg \left(x1 \leq 1.25 \cdot 10^{+39}\right):\\
\;\;\;\;6 \cdot {x1}^{4}\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < -9.2e5 or 1.25000000000000004e39 < x1

    1. Initial program 41.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. Simplified41.1%

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

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

    if -9.2e5 < x1 < 1.25000000000000004e39

    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. Simplified99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -920000 \lor \neg \left(x1 \leq 1.25 \cdot 10^{+39}\right):\\ \;\;\;\;6 \cdot {x1}^{4}\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 92.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -72000000:\\ \;\;\;\;{x1}^{4} \cdot \left(6 - \frac{3}{x1}\right)\\ \mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+39}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{else}:\\ \;\;\;\;6 \cdot {x1}^{4}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (<= x1 -72000000.0)
   (* (pow x1 4.0) (- 6.0 (/ 3.0 x1)))
   (if (<= x1 1.25e+39)
     (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
     (* 6.0 (pow x1 4.0)))))
double code(double x1, double x2) {
	double tmp;
	if (x1 <= -72000000.0) {
		tmp = pow(x1, 4.0) * (6.0 - (3.0 / x1));
	} else if (x1 <= 1.25e+39) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else {
		tmp = 6.0 * pow(x1, 4.0);
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: tmp
    if (x1 <= (-72000000.0d0)) then
        tmp = (x1 ** 4.0d0) * (6.0d0 - (3.0d0 / x1))
    else if (x1 <= 1.25d+39) then
        tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
    else
        tmp = 6.0d0 * (x1 ** 4.0d0)
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if (x1 <= -72000000.0) {
		tmp = Math.pow(x1, 4.0) * (6.0 - (3.0 / x1));
	} else if (x1 <= 1.25e+39) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else {
		tmp = 6.0 * Math.pow(x1, 4.0);
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if x1 <= -72000000.0:
		tmp = math.pow(x1, 4.0) * (6.0 - (3.0 / x1))
	elif x1 <= 1.25e+39:
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1
	else:
		tmp = 6.0 * math.pow(x1, 4.0)
	return tmp
function code(x1, x2)
	tmp = 0.0
	if (x1 <= -72000000.0)
		tmp = Float64((x1 ^ 4.0) * Float64(6.0 - Float64(3.0 / x1)));
	elseif (x1 <= 1.25e+39)
		tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1);
	else
		tmp = Float64(6.0 * (x1 ^ 4.0));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if (x1 <= -72000000.0)
		tmp = (x1 ^ 4.0) * (6.0 - (3.0 / x1));
	elseif (x1 <= 1.25e+39)
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	else
		tmp = 6.0 * (x1 ^ 4.0);
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[LessEqual[x1, -72000000.0], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.25e+39], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -72000000:\\
\;\;\;\;{x1}^{4} \cdot \left(6 - \frac{3}{x1}\right)\\

\mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+39}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\

\mathbf{else}:\\
\;\;\;\;6 \cdot {x1}^{4}\\


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

    1. Initial program 40.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. Simplified40.3%

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

      \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{x1}\right)} \]
    5. Step-by-step derivation
      1. associate-*r/83.7%

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

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

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

    if -7.2e7 < x1 < 1.25000000000000004e39

    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. Simplified99.8%

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

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

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

    if 1.25000000000000004e39 < x1

    1. Initial program 41.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. Simplified41.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -72000000:\\ \;\;\;\;{x1}^{4} \cdot \left(6 - \frac{3}{x1}\right)\\ \mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+39}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{else}:\\ \;\;\;\;6 \cdot {x1}^{4}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 92.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 3 - 2 \cdot x2\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := \frac{x1 - \left(t\_2 + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\ t_4 := \left(t\_3 - 3\right) \cdot \left(x1 \cdot 6\right)\\ t_5 := t\_2 \cdot t\_3\\ t_6 := 6 \cdot t\_0\\ t_7 := x1 \cdot x1 + 1\\ \mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(9 - \left(x1 \cdot \left(x1 \cdot \left(12 + \left(\left(x1 \cdot \left(6 + \left(t\_6 - 6 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right) + t\_6\right) - x1\right)\right)\\ \mathbf{elif}\;x1 \leq -3900:\\ \;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_1 + \left(t\_5 + t\_7 \cdot \left(t\_4 - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{t\_0}{x1}}{x1} - 3\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+39}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_1 + \left(t\_5 + t\_7 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right) + t\_4\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (- 3.0 (* 2.0 x2)))
        (t_1 (* x1 (* x1 x1)))
        (t_2 (* x1 (* x1 3.0)))
        (t_3 (/ (- x1 (+ t_2 (* 2.0 x2))) (- -1.0 (* x1 x1))))
        (t_4 (* (- t_3 3.0) (* x1 6.0)))
        (t_5 (* t_2 t_3))
        (t_6 (* 6.0 t_0))
        (t_7 (+ (* x1 x1) 1.0)))
   (if (<= x1 -5.5e+102)
     (+
      x1
      (-
       9.0
       (-
        (*
         x1
         (+
          (*
           x1
           (+
            12.0
            (-
             (- (* x1 (+ 6.0 (- t_6 (* 6.0 (+ 3.0 (* x2 -2.0)))))) (* x2 8.0))
             (* x2 6.0))))
          t_6))
        x1)))
     (if (<= x1 -3900.0)
       (+
        x1
        (+
         9.0
         (+
          x1
          (+
           t_1
           (+
            t_5
            (*
             t_7
             (-
              t_4
              (*
               (* x1 x1)
               (+ 6.0 (* 4.0 (- (/ (+ 1.0 (/ t_0 x1)) x1) 3.0)))))))))))
       (if (<= x1 1.25e+39)
         (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
         (if (<= x1 5e+153)
           (+
            x1
            (+
             9.0
             (+
              x1
              (+
               t_1
               (+ t_5 (* t_7 (+ (* (* x1 x1) (- (* t_3 4.0) 6.0)) t_4)))))))
           (+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))))
double code(double x1, double x2) {
	double t_0 = 3.0 - (2.0 * x2);
	double t_1 = x1 * (x1 * x1);
	double t_2 = x1 * (x1 * 3.0);
	double t_3 = (x1 - (t_2 + (2.0 * x2))) / (-1.0 - (x1 * x1));
	double t_4 = (t_3 - 3.0) * (x1 * 6.0);
	double t_5 = t_2 * t_3;
	double t_6 = 6.0 * t_0;
	double t_7 = (x1 * x1) + 1.0;
	double tmp;
	if (x1 <= -5.5e+102) {
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_6 - (6.0 * (3.0 + (x2 * -2.0)))))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_6)) - x1));
	} else if (x1 <= -3900.0) {
		tmp = x1 + (9.0 + (x1 + (t_1 + (t_5 + (t_7 * (t_4 - ((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0))))))))));
	} else if (x1 <= 1.25e+39) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else if (x1 <= 5e+153) {
		tmp = x1 + (9.0 + (x1 + (t_1 + (t_5 + (t_7 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + t_4))))));
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (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) :: t_7
    real(8) :: tmp
    t_0 = 3.0d0 - (2.0d0 * x2)
    t_1 = x1 * (x1 * x1)
    t_2 = x1 * (x1 * 3.0d0)
    t_3 = (x1 - (t_2 + (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1))
    t_4 = (t_3 - 3.0d0) * (x1 * 6.0d0)
    t_5 = t_2 * t_3
    t_6 = 6.0d0 * t_0
    t_7 = (x1 * x1) + 1.0d0
    if (x1 <= (-5.5d+102)) then
        tmp = x1 + (9.0d0 - ((x1 * ((x1 * (12.0d0 + (((x1 * (6.0d0 + (t_6 - (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))) + t_6)) - x1))
    else if (x1 <= (-3900.0d0)) then
        tmp = x1 + (9.0d0 + (x1 + (t_1 + (t_5 + (t_7 * (t_4 - ((x1 * x1) * (6.0d0 + (4.0d0 * (((1.0d0 + (t_0 / x1)) / x1) - 3.0d0))))))))))
    else if (x1 <= 1.25d+39) then
        tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
    else if (x1 <= 5d+153) then
        tmp = x1 + (9.0d0 + (x1 + (t_1 + (t_5 + (t_7 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + t_4))))))
    else
        tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = 3.0 - (2.0 * x2);
	double t_1 = x1 * (x1 * x1);
	double t_2 = x1 * (x1 * 3.0);
	double t_3 = (x1 - (t_2 + (2.0 * x2))) / (-1.0 - (x1 * x1));
	double t_4 = (t_3 - 3.0) * (x1 * 6.0);
	double t_5 = t_2 * t_3;
	double t_6 = 6.0 * t_0;
	double t_7 = (x1 * x1) + 1.0;
	double tmp;
	if (x1 <= -5.5e+102) {
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_6 - (6.0 * (3.0 + (x2 * -2.0)))))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_6)) - x1));
	} else if (x1 <= -3900.0) {
		tmp = x1 + (9.0 + (x1 + (t_1 + (t_5 + (t_7 * (t_4 - ((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0))))))))));
	} else if (x1 <= 1.25e+39) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else if (x1 <= 5e+153) {
		tmp = x1 + (9.0 + (x1 + (t_1 + (t_5 + (t_7 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + t_4))))));
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = 3.0 - (2.0 * x2)
	t_1 = x1 * (x1 * x1)
	t_2 = x1 * (x1 * 3.0)
	t_3 = (x1 - (t_2 + (2.0 * x2))) / (-1.0 - (x1 * x1))
	t_4 = (t_3 - 3.0) * (x1 * 6.0)
	t_5 = t_2 * t_3
	t_6 = 6.0 * t_0
	t_7 = (x1 * x1) + 1.0
	tmp = 0
	if x1 <= -5.5e+102:
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_6 - (6.0 * (3.0 + (x2 * -2.0)))))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_6)) - x1))
	elif x1 <= -3900.0:
		tmp = x1 + (9.0 + (x1 + (t_1 + (t_5 + (t_7 * (t_4 - ((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0))))))))))
	elif x1 <= 1.25e+39:
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1
	elif x1 <= 5e+153:
		tmp = x1 + (9.0 + (x1 + (t_1 + (t_5 + (t_7 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + t_4))))))
	else:
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)))
	return tmp
function code(x1, x2)
	t_0 = Float64(3.0 - Float64(2.0 * x2))
	t_1 = Float64(x1 * Float64(x1 * x1))
	t_2 = Float64(x1 * Float64(x1 * 3.0))
	t_3 = Float64(Float64(x1 - Float64(t_2 + Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))
	t_4 = Float64(Float64(t_3 - 3.0) * Float64(x1 * 6.0))
	t_5 = Float64(t_2 * t_3)
	t_6 = Float64(6.0 * t_0)
	t_7 = Float64(Float64(x1 * x1) + 1.0)
	tmp = 0.0
	if (x1 <= -5.5e+102)
		tmp = Float64(x1 + Float64(9.0 - Float64(Float64(x1 * Float64(Float64(x1 * Float64(12.0 + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(t_6 - Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))) + t_6)) - x1)));
	elseif (x1 <= -3900.0)
		tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_1 + Float64(t_5 + Float64(t_7 * Float64(t_4 - Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(1.0 + Float64(t_0 / x1)) / x1) - 3.0)))))))))));
	elseif (x1 <= 1.25e+39)
		tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1);
	elseif (x1 <= 5e+153)
		tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_1 + Float64(t_5 + Float64(t_7 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + t_4)))))));
	else
		tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = 3.0 - (2.0 * x2);
	t_1 = x1 * (x1 * x1);
	t_2 = x1 * (x1 * 3.0);
	t_3 = (x1 - (t_2 + (2.0 * x2))) / (-1.0 - (x1 * x1));
	t_4 = (t_3 - 3.0) * (x1 * 6.0);
	t_5 = t_2 * t_3;
	t_6 = 6.0 * t_0;
	t_7 = (x1 * x1) + 1.0;
	tmp = 0.0;
	if (x1 <= -5.5e+102)
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_6 - (6.0 * (3.0 + (x2 * -2.0)))))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_6)) - x1));
	elseif (x1 <= -3900.0)
		tmp = x1 + (9.0 + (x1 + (t_1 + (t_5 + (t_7 * (t_4 - ((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0))))))))));
	elseif (x1 <= 1.25e+39)
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	elseif (x1 <= 5e+153)
		tmp = x1 + (9.0 + (x1 + (t_1 + (t_5 + (t_7 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + t_4))))));
	else
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 - N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(6.0 * t$95$0), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(9.0 - N[(N[(x1 * N[(N[(x1 * N[(12.0 + N[(N[(N[(x1 * N[(6.0 + N[(t$95$6 - N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3900.0], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$1 + N[(t$95$5 + N[(t$95$7 * N[(t$95$4 - N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(1.0 + N[(t$95$0 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.25e+39], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$1 + N[(t$95$5 + N[(t$95$7 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 3 - 2 \cdot x2\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{x1 - \left(t\_2 + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\
t_4 := \left(t\_3 - 3\right) \cdot \left(x1 \cdot 6\right)\\
t_5 := t\_2 \cdot t\_3\\
t_6 := 6 \cdot t\_0\\
t_7 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 - \left(x1 \cdot \left(x1 \cdot \left(12 + \left(\left(x1 \cdot \left(6 + \left(t\_6 - 6 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right) + t\_6\right) - x1\right)\right)\\

\mathbf{elif}\;x1 \leq -3900:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_1 + \left(t\_5 + t\_7 \cdot \left(t\_4 - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{t\_0}{x1}}{x1} - 3\right)\right)\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+39}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\

\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_1 + \left(t\_5 + t\_7 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right) + t\_4\right)\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x1 < -5.49999999999999981e102

    1. Initial program 3.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. Step-by-step derivation
      1. add-cube-cbrt3.0%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr3.0%

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

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

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

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

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

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

    if -5.49999999999999981e102 < x1 < -3900

    1. Initial program 99.1%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt98.9%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr98.9%

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

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

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

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

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

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

    if -3900 < x1 < 1.25000000000000004e39

    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. Simplified99.8%

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

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

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

    if 1.25000000000000004e39 < x1 < 5.00000000000000018e153

    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. Step-by-step derivation
      1. add-cube-cbrt99.8%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr99.8%

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

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

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

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

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(x1 \cdot 6\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    9. Step-by-step derivation
      1. metadata-eval96.0%

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

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

    if 5.00000000000000018e153 < x1

    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. Simplified0.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(9 - \left(x1 \cdot \left(x1 \cdot \left(12 + \left(\left(x1 \cdot \left(6 + \left(6 \cdot \left(3 - 2 \cdot x2\right) - 6 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right) + 6 \cdot \left(3 - 2 \cdot x2\right)\right) - x1\right)\right)\\ \mathbf{elif}\;x1 \leq -3900:\\ \;\;\;\;x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(\frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} - 3\right) \cdot \left(x1 \cdot 6\right) - \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{3 - 2 \cdot x2}{x1}}{x1} - 3\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+39}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} \cdot 4 - 6\right) + \left(\frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} - 3\right) \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 92.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{x1 - \left(t\_1 + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\
t_3 := \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\\
t_4 := t\_1 \cdot t\_2\\
t_5 := 6 \cdot \left(3 - 2 \cdot x2\right)\\
t_6 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 - \left(x1 \cdot \left(x1 \cdot \left(12 + \left(\left(x1 \cdot \left(6 + \left(t\_5 - 6 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right) + t\_5\right) - x1\right)\right)\\

\mathbf{elif}\;x1 \leq -580:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_4 + t\_6 \cdot \left(t\_3 + \left(x1 \cdot 6\right) \cdot \frac{-1}{x1}\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+39}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\

\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_4 + t\_6 \cdot \left(t\_3 + \left(t\_2 - 3\right) \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x1 < -5e102

    1. Initial program 3.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. Step-by-step derivation
      1. add-cube-cbrt3.0%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr3.0%

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

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

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

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

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

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

    if -5e102 < x1 < -580

    1. Initial program 99.1%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt98.9%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr98.9%

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

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

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

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

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

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

    if -580 < x1 < 1.25000000000000004e39

    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. Simplified99.8%

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

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

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

    if 1.25000000000000004e39 < x1 < 5.00000000000000018e153

    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. Step-by-step derivation
      1. add-cube-cbrt99.8%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr99.8%

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

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

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

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

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(x1 \cdot 6\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    9. Step-by-step derivation
      1. metadata-eval96.0%

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

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

    if 5.00000000000000018e153 < x1

    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. Simplified0.0%

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

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

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

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

Alternative 11: 92.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := \frac{x1 - \left(t\_0 + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\ t_2 := 6 \cdot \left(3 - 2 \cdot x2\right)\\ t_3 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_1 + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_1 \cdot 4 - 6\right) + \left(x1 \cdot 6\right) \cdot \frac{-1}{x1}\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(9 - \left(x1 \cdot \left(x1 \cdot \left(12 + \left(\left(x1 \cdot \left(6 + \left(t\_2 - 6 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right) + t\_2\right) - x1\right)\right)\\ \mathbf{elif}\;x1 \leq -1450000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+39}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (* x1 3.0)))
        (t_1 (/ (- x1 (+ t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))
        (t_2 (* 6.0 (- 3.0 (* 2.0 x2))))
        (t_3
         (+
          x1
          (+
           9.0
           (+
            x1
            (+
             (* x1 (* x1 x1))
             (+
              (* t_0 t_1)
              (*
               (+ (* x1 x1) 1.0)
               (+
                (* (* x1 x1) (- (* t_1 4.0) 6.0))
                (* (* x1 6.0) (/ -1.0 x1)))))))))))
   (if (<= x1 -5.5e+102)
     (+
      x1
      (-
       9.0
       (-
        (*
         x1
         (+
          (*
           x1
           (+
            12.0
            (-
             (- (* x1 (+ 6.0 (- t_2 (* 6.0 (+ 3.0 (* x2 -2.0)))))) (* x2 8.0))
             (* x2 6.0))))
          t_2))
        x1)))
     (if (<= x1 -1450000.0)
       t_3
       (if (<= x1 1.25e+39)
         (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
         (if (<= x1 5e+153)
           t_3
           (+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))))))
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1));
	double t_2 = 6.0 * (3.0 - (2.0 * x2));
	double t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_1) + (((x1 * x1) + 1.0) * (((x1 * x1) * ((t_1 * 4.0) - 6.0)) + ((x1 * 6.0) * (-1.0 / x1))))))));
	double tmp;
	if (x1 <= -5.5e+102) {
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_2 - (6.0 * (3.0 + (x2 * -2.0)))))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_2)) - x1));
	} else if (x1 <= -1450000.0) {
		tmp = t_3;
	} else if (x1 <= 1.25e+39) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else if (x1 <= 5e+153) {
		tmp = t_3;
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = x1 * (x1 * 3.0d0)
    t_1 = (x1 - (t_0 + (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1))
    t_2 = 6.0d0 * (3.0d0 - (2.0d0 * x2))
    t_3 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_1) + (((x1 * x1) + 1.0d0) * (((x1 * x1) * ((t_1 * 4.0d0) - 6.0d0)) + ((x1 * 6.0d0) * ((-1.0d0) / x1))))))))
    if (x1 <= (-5.5d+102)) then
        tmp = x1 + (9.0d0 - ((x1 * ((x1 * (12.0d0 + (((x1 * (6.0d0 + (t_2 - (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))) + t_2)) - x1))
    else if (x1 <= (-1450000.0d0)) then
        tmp = t_3
    else if (x1 <= 1.25d+39) then
        tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
    else if (x1 <= 5d+153) then
        tmp = t_3
    else
        tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1));
	double t_2 = 6.0 * (3.0 - (2.0 * x2));
	double t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_1) + (((x1 * x1) + 1.0) * (((x1 * x1) * ((t_1 * 4.0) - 6.0)) + ((x1 * 6.0) * (-1.0 / x1))))))));
	double tmp;
	if (x1 <= -5.5e+102) {
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_2 - (6.0 * (3.0 + (x2 * -2.0)))))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_2)) - x1));
	} else if (x1 <= -1450000.0) {
		tmp = t_3;
	} else if (x1 <= 1.25e+39) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else if (x1 <= 5e+153) {
		tmp = t_3;
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 * (x1 * 3.0)
	t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1))
	t_2 = 6.0 * (3.0 - (2.0 * x2))
	t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_1) + (((x1 * x1) + 1.0) * (((x1 * x1) * ((t_1 * 4.0) - 6.0)) + ((x1 * 6.0) * (-1.0 / x1))))))))
	tmp = 0
	if x1 <= -5.5e+102:
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_2 - (6.0 * (3.0 + (x2 * -2.0)))))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_2)) - x1))
	elif x1 <= -1450000.0:
		tmp = t_3
	elif x1 <= 1.25e+39:
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1
	elif x1 <= 5e+153:
		tmp = t_3
	else:
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)))
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 * Float64(x1 * 3.0))
	t_1 = Float64(Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))
	t_2 = Float64(6.0 * Float64(3.0 - Float64(2.0 * x2)))
	t_3 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_1) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_1 * 4.0) - 6.0)) + Float64(Float64(x1 * 6.0) * Float64(-1.0 / x1)))))))))
	tmp = 0.0
	if (x1 <= -5.5e+102)
		tmp = Float64(x1 + Float64(9.0 - Float64(Float64(x1 * Float64(Float64(x1 * Float64(12.0 + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(t_2 - Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))) + t_2)) - x1)));
	elseif (x1 <= -1450000.0)
		tmp = t_3;
	elseif (x1 <= 1.25e+39)
		tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1);
	elseif (x1 <= 5e+153)
		tmp = t_3;
	else
		tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 * (x1 * 3.0);
	t_1 = (x1 - (t_0 + (2.0 * x2))) / (-1.0 - (x1 * x1));
	t_2 = 6.0 * (3.0 - (2.0 * x2));
	t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_1) + (((x1 * x1) + 1.0) * (((x1 * x1) * ((t_1 * 4.0) - 6.0)) + ((x1 * 6.0) * (-1.0 / x1))))))));
	tmp = 0.0;
	if (x1 <= -5.5e+102)
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_2 - (6.0 * (3.0 + (x2 * -2.0)))))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_2)) - x1));
	elseif (x1 <= -1450000.0)
		tmp = t_3;
	elseif (x1 <= 1.25e+39)
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	elseif (x1 <= 5e+153)
		tmp = t_3;
	else
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(6.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$1), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$1 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * 6.0), $MachinePrecision] * N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(9.0 - N[(N[(x1 * N[(N[(x1 * N[(12.0 + N[(N[(N[(x1 * N[(6.0 + N[(t$95$2 - N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1450000.0], t$95$3, If[LessEqual[x1, 1.25e+39], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 5e+153], t$95$3, N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \frac{x1 - \left(t\_0 + 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\
t_2 := 6 \cdot \left(3 - 2 \cdot x2\right)\\
t_3 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_1 + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_1 \cdot 4 - 6\right) + \left(x1 \cdot 6\right) \cdot \frac{-1}{x1}\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 - \left(x1 \cdot \left(x1 \cdot \left(12 + \left(\left(x1 \cdot \left(6 + \left(t\_2 - 6 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right) + t\_2\right) - x1\right)\right)\\

\mathbf{elif}\;x1 \leq -1450000:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+39}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\

\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x1 < -5.49999999999999981e102

    1. Initial program 3.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. Step-by-step derivation
      1. add-cube-cbrt3.0%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr3.0%

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

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

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

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

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

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

    if -5.49999999999999981e102 < x1 < -1.45e6 or 1.25000000000000004e39 < x1 < 5.00000000000000018e153

    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. Step-by-step derivation
      1. add-cube-cbrt99.4%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr99.4%

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

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

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

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

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

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

    if -1.45e6 < x1 < 1.25000000000000004e39

    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. Simplified99.8%

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

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

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

    if 5.00000000000000018e153 < x1

    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. Simplified0.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(9 - \left(x1 \cdot \left(x1 \cdot \left(12 + \left(\left(x1 \cdot \left(6 + \left(6 \cdot \left(3 - 2 \cdot x2\right) - 6 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right) + 6 \cdot \left(3 - 2 \cdot x2\right)\right) - x1\right)\right)\\ \mathbf{elif}\;x1 \leq -1450000:\\ \;\;\;\;x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} \cdot 4 - 6\right) + \left(x1 \cdot 6\right) \cdot \frac{-1}{x1}\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+39}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{-1 - x1 \cdot x1} \cdot 4 - 6\right) + \left(x1 \cdot 6\right) \cdot \frac{-1}{x1}\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 83.1% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 6 \cdot \left(3 - 2 \cdot x2\right)\\ t_1 := 3 + x2 \cdot -2\\ \mathbf{if}\;x1 \leq -1.3 \cdot 10^{+58}:\\ \;\;\;\;x1 + \left(9 - \left(x1 \cdot \left(x1 \cdot \left(12 + \left(\left(x1 \cdot \left(6 + \left(t\_0 - 6 \cdot t\_1\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right) + t\_0\right) - x1\right)\right)\\ \mathbf{elif}\;x1 \leq 1.9 \cdot 10^{-33}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot \left(9 + -4 \cdot \frac{x2 \cdot t\_1}{x1}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* 6.0 (- 3.0 (* 2.0 x2)))) (t_1 (+ 3.0 (* x2 -2.0))))
   (if (<= x1 -1.3e+58)
     (+
      x1
      (-
       9.0
       (-
        (*
         x1
         (+
          (*
           x1
           (+
            12.0
            (- (- (* x1 (+ 6.0 (- t_0 (* 6.0 t_1)))) (* x2 8.0)) (* x2 6.0))))
          t_0))
        x1)))
     (if (<= x1 1.9e-33)
       (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
       (+
        (* x2 -6.0)
        (* x1 (+ -1.0 (* x1 (+ 9.0 (* -4.0 (/ (* x2 t_1) x1)))))))))))
double code(double x1, double x2) {
	double t_0 = 6.0 * (3.0 - (2.0 * x2));
	double t_1 = 3.0 + (x2 * -2.0);
	double tmp;
	if (x1 <= -1.3e+58) {
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_0 - (6.0 * t_1)))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_0)) - x1));
	} else if (x1 <= 1.9e-33) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * (9.0 + (-4.0 * ((x2 * t_1) / x1))))));
	}
	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) :: tmp
    t_0 = 6.0d0 * (3.0d0 - (2.0d0 * x2))
    t_1 = 3.0d0 + (x2 * (-2.0d0))
    if (x1 <= (-1.3d+58)) then
        tmp = x1 + (9.0d0 - ((x1 * ((x1 * (12.0d0 + (((x1 * (6.0d0 + (t_0 - (6.0d0 * t_1)))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))) + t_0)) - x1))
    else if (x1 <= 1.9d-33) then
        tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
    else
        tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * (9.0d0 + ((-4.0d0) * ((x2 * t_1) / x1))))))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = 6.0 * (3.0 - (2.0 * x2));
	double t_1 = 3.0 + (x2 * -2.0);
	double tmp;
	if (x1 <= -1.3e+58) {
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_0 - (6.0 * t_1)))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_0)) - x1));
	} else if (x1 <= 1.9e-33) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * (9.0 + (-4.0 * ((x2 * t_1) / x1))))));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = 6.0 * (3.0 - (2.0 * x2))
	t_1 = 3.0 + (x2 * -2.0)
	tmp = 0
	if x1 <= -1.3e+58:
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_0 - (6.0 * t_1)))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_0)) - x1))
	elif x1 <= 1.9e-33:
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1
	else:
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * (9.0 + (-4.0 * ((x2 * t_1) / x1))))))
	return tmp
function code(x1, x2)
	t_0 = Float64(6.0 * Float64(3.0 - Float64(2.0 * x2)))
	t_1 = Float64(3.0 + Float64(x2 * -2.0))
	tmp = 0.0
	if (x1 <= -1.3e+58)
		tmp = Float64(x1 + Float64(9.0 - Float64(Float64(x1 * Float64(Float64(x1 * Float64(12.0 + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(t_0 - Float64(6.0 * t_1)))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))) + t_0)) - x1)));
	elseif (x1 <= 1.9e-33)
		tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1);
	else
		tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(-4.0 * Float64(Float64(x2 * t_1) / x1)))))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = 6.0 * (3.0 - (2.0 * x2));
	t_1 = 3.0 + (x2 * -2.0);
	tmp = 0.0;
	if (x1 <= -1.3e+58)
		tmp = x1 + (9.0 - ((x1 * ((x1 * (12.0 + (((x1 * (6.0 + (t_0 - (6.0 * t_1)))) - (x2 * 8.0)) - (x2 * 6.0)))) + t_0)) - x1));
	elseif (x1 <= 1.9e-33)
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	else
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * (9.0 + (-4.0 * ((x2 * t_1) / x1))))));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.3e+58], N[(x1 + N[(9.0 - N[(N[(x1 * N[(N[(x1 * N[(12.0 + N[(N[(N[(x1 * N[(6.0 + N[(t$95$0 - N[(6.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.9e-33], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(-4.0 * N[(N[(x2 * t$95$1), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 6 \cdot \left(3 - 2 \cdot x2\right)\\
t_1 := 3 + x2 \cdot -2\\
\mathbf{if}\;x1 \leq -1.3 \cdot 10^{+58}:\\
\;\;\;\;x1 + \left(9 - \left(x1 \cdot \left(x1 \cdot \left(12 + \left(\left(x1 \cdot \left(6 + \left(t\_0 - 6 \cdot t\_1\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right) + t\_0\right) - x1\right)\right)\\

\mathbf{elif}\;x1 \leq 1.9 \cdot 10^{-33}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot \left(9 + -4 \cdot \frac{x2 \cdot t\_1}{x1}\right)\right)\\


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

    1. Initial program 27.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. Step-by-step derivation
      1. add-cube-cbrt27.1%

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + \color{blue}{{\left(\sqrt[3]{2 \cdot x2}\right)}^{3}}\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{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) \]
    4. Applied egg-rr27.1%

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

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

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

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

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

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

    if -1.29999999999999994e58 < x1 < 1.89999999999999997e-33

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

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

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

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

    if 1.89999999999999997e-33 < x1

    1. Initial program 52.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. Simplified49.9%

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

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

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

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

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

Alternative 13: 78.5% accurate, 3.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58}:\\ \;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(x1 \cdot -12 - 6\right)\\ \mathbf{elif}\;x1 \leq 1.9 \cdot 10^{-33}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot \left(9 + -4 \cdot \frac{x2 \cdot \left(3 + x2 \cdot -2\right)}{x1}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (<= x1 -1.45e+58)
   (+ (* x1 (+ -1.0 (* x1 9.0))) (* x2 (- (* x1 -12.0) 6.0)))
   (if (<= x1 1.9e-33)
     (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
     (+
      (* x2 -6.0)
      (*
       x1
       (+ -1.0 (* x1 (+ 9.0 (* -4.0 (/ (* x2 (+ 3.0 (* x2 -2.0))) x1))))))))))
double code(double x1, double x2) {
	double tmp;
	if (x1 <= -1.45e+58) {
		tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * ((x1 * -12.0) - 6.0));
	} else if (x1 <= 1.9e-33) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * (9.0 + (-4.0 * ((x2 * (3.0 + (x2 * -2.0))) / x1))))));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: tmp
    if (x1 <= (-1.45d+58)) then
        tmp = (x1 * ((-1.0d0) + (x1 * 9.0d0))) + (x2 * ((x1 * (-12.0d0)) - 6.0d0))
    else if (x1 <= 1.9d-33) then
        tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
    else
        tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * (9.0d0 + ((-4.0d0) * ((x2 * (3.0d0 + (x2 * (-2.0d0)))) / x1))))))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if (x1 <= -1.45e+58) {
		tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * ((x1 * -12.0) - 6.0));
	} else if (x1 <= 1.9e-33) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * (9.0 + (-4.0 * ((x2 * (3.0 + (x2 * -2.0))) / x1))))));
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if x1 <= -1.45e+58:
		tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * ((x1 * -12.0) - 6.0))
	elif x1 <= 1.9e-33:
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1
	else:
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * (9.0 + (-4.0 * ((x2 * (3.0 + (x2 * -2.0))) / x1))))))
	return tmp
function code(x1, x2)
	tmp = 0.0
	if (x1 <= -1.45e+58)
		tmp = Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)));
	elseif (x1 <= 1.9e-33)
		tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1);
	else
		tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(9.0 + Float64(-4.0 * Float64(Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))) / x1)))))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if (x1 <= -1.45e+58)
		tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * ((x1 * -12.0) - 6.0));
	elseif (x1 <= 1.9e-33)
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	else
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * (9.0 + (-4.0 * ((x2 * (3.0 + (x2 * -2.0))) / x1))))));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[LessEqual[x1, -1.45e+58], N[(N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.9e-33], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(9.0 + N[(-4.0 * N[(N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(x1 \cdot -12 - 6\right)\\

\mathbf{elif}\;x1 \leq 1.9 \cdot 10^{-33}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\

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


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

    1. Initial program 27.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. Simplified52.1%

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

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

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

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

    if -1.45000000000000001e58 < x1 < 1.89999999999999997e-33

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

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

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

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

    if 1.89999999999999997e-33 < x1

    1. Initial program 52.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. Simplified49.9%

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

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

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

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

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

Alternative 14: 78.4% accurate, 4.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -9 \cdot 10^{+57}:\\ \;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(x1 \cdot -12 - 6\right)\\ \mathbf{elif}\;x1 \leq 4.2 \cdot 10^{-74}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(x2 \cdot \left(x2 \cdot 8 - 12\right) + x1 \cdot 9\right)\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (<= x1 -9e+57)
   (+ (* x1 (+ -1.0 (* x1 9.0))) (* x2 (- (* x1 -12.0) 6.0)))
   (if (<= x1 4.2e-74)
     (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
     (+
      (* x2 -6.0)
      (* x1 (+ -1.0 (+ (* x2 (- (* x2 8.0) 12.0)) (* x1 9.0))))))))
double code(double x1, double x2) {
	double tmp;
	if (x1 <= -9e+57) {
		tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * ((x1 * -12.0) - 6.0));
	} else if (x1 <= 4.2e-74) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * ((x2 * 8.0) - 12.0)) + (x1 * 9.0))));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: tmp
    if (x1 <= (-9d+57)) then
        tmp = (x1 * ((-1.0d0) + (x1 * 9.0d0))) + (x2 * ((x1 * (-12.0d0)) - 6.0d0))
    else if (x1 <= 4.2d-74) then
        tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
    else
        tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + ((x2 * ((x2 * 8.0d0) - 12.0d0)) + (x1 * 9.0d0))))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if (x1 <= -9e+57) {
		tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * ((x1 * -12.0) - 6.0));
	} else if (x1 <= 4.2e-74) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * ((x2 * 8.0) - 12.0)) + (x1 * 9.0))));
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if x1 <= -9e+57:
		tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * ((x1 * -12.0) - 6.0))
	elif x1 <= 4.2e-74:
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1
	else:
		tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * ((x2 * 8.0) - 12.0)) + (x1 * 9.0))))
	return tmp
function code(x1, x2)
	tmp = 0.0
	if (x1 <= -9e+57)
		tmp = Float64(Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)));
	elseif (x1 <= 4.2e-74)
		tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1);
	else
		tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(Float64(x2 * Float64(Float64(x2 * 8.0) - 12.0)) + Float64(x1 * 9.0)))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if (x1 <= -9e+57)
		tmp = (x1 * (-1.0 + (x1 * 9.0))) + (x2 * ((x1 * -12.0) - 6.0));
	elseif (x1 <= 4.2e-74)
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	else
		tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * ((x2 * 8.0) - 12.0)) + (x1 * 9.0))));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[LessEqual[x1, -9e+57], N[(N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e-74], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(N[(x2 * N[(N[(x2 * 8.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9 \cdot 10^{+57}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(x1 \cdot -12 - 6\right)\\

\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{-74}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(x2 \cdot \left(x2 \cdot 8 - 12\right) + x1 \cdot 9\right)\right)\\


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

    1. Initial program 27.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. Simplified52.1%

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

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

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

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

    if -8.99999999999999991e57 < x1 < 4.2e-74

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

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

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

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

    if 4.2e-74 < x1

    1. Initial program 55.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. Simplified52.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -9 \cdot 10^{+57}:\\ \;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(x1 \cdot -12 - 6\right)\\ \mathbf{elif}\;x1 \leq 4.2 \cdot 10^{-74}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(x2 \cdot \left(x2 \cdot 8 - 12\right) + x1 \cdot 9\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 74.2% accurate, 5.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -6 \cdot 10^{+130} \lor \neg \left(x1 \leq 3.5 \cdot 10^{+153}\right):\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 - x1 \cdot \left(x2 \cdot \left(12 - x2 \cdot 8\right) - -1\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (or (<= x1 -6e+130) (not (<= x1 3.5e+153)))
   (+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))
   (- (* x2 -6.0) (* x1 (- (* x2 (- 12.0 (* x2 8.0))) -1.0)))))
double code(double x1, double x2) {
	double tmp;
	if ((x1 <= -6e+130) || !(x1 <= 3.5e+153)) {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	} else {
		tmp = (x2 * -6.0) - (x1 * ((x2 * (12.0 - (x2 * 8.0))) - -1.0));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: tmp
    if ((x1 <= (-6d+130)) .or. (.not. (x1 <= 3.5d+153))) then
        tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
    else
        tmp = (x2 * (-6.0d0)) - (x1 * ((x2 * (12.0d0 - (x2 * 8.0d0))) - (-1.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if ((x1 <= -6e+130) || !(x1 <= 3.5e+153)) {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	} else {
		tmp = (x2 * -6.0) - (x1 * ((x2 * (12.0 - (x2 * 8.0))) - -1.0));
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if (x1 <= -6e+130) or not (x1 <= 3.5e+153):
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)))
	else:
		tmp = (x2 * -6.0) - (x1 * ((x2 * (12.0 - (x2 * 8.0))) - -1.0))
	return tmp
function code(x1, x2)
	tmp = 0.0
	if ((x1 <= -6e+130) || !(x1 <= 3.5e+153))
		tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))));
	else
		tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(Float64(x2 * Float64(12.0 - Float64(x2 * 8.0))) - -1.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if ((x1 <= -6e+130) || ~((x1 <= 3.5e+153)))
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	else
		tmp = (x2 * -6.0) - (x1 * ((x2 * (12.0 - (x2 * 8.0))) - -1.0));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[Or[LessEqual[x1, -6e+130], N[Not[LessEqual[x1, 3.5e+153]], $MachinePrecision]], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(N[(x2 * N[(12.0 - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6 \cdot 10^{+130} \lor \neg \left(x1 \leq 3.5 \cdot 10^{+153}\right):\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(x2 \cdot \left(12 - x2 \cdot 8\right) - -1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < -5.9999999999999999e130 or 3.4999999999999999e153 < x1

    1. Initial program 1.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. Simplified9.5%

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

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

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

    if -5.9999999999999999e130 < x1 < 3.4999999999999999e153

    1. Initial program 96.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. Simplified96.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -6 \cdot 10^{+130} \lor \neg \left(x1 \leq 3.5 \cdot 10^{+153}\right):\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 - x1 \cdot \left(x2 \cdot \left(12 - x2 \cdot 8\right) - -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 78.1% accurate, 5.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58}:\\ \;\;\;\;t\_0 + x2 \cdot \left(x1 \cdot -12 - 6\right)\\ \mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+153}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + t\_0\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (+ -1.0 (* x1 9.0)))))
   (if (<= x1 -1.45e+58)
     (+ t_0 (* x2 (- (* x1 -12.0) 6.0)))
     (if (<= x1 3.5e+153)
       (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
       (+ (* x2 -6.0) t_0)))))
double code(double x1, double x2) {
	double t_0 = x1 * (-1.0 + (x1 * 9.0));
	double tmp;
	if (x1 <= -1.45e+58) {
		tmp = t_0 + (x2 * ((x1 * -12.0) - 6.0));
	} else if (x1 <= 3.5e+153) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else {
		tmp = (x2 * -6.0) + t_0;
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x1 * ((-1.0d0) + (x1 * 9.0d0))
    if (x1 <= (-1.45d+58)) then
        tmp = t_0 + (x2 * ((x1 * (-12.0d0)) - 6.0d0))
    else if (x1 <= 3.5d+153) then
        tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
    else
        tmp = (x2 * (-6.0d0)) + t_0
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 * (-1.0 + (x1 * 9.0));
	double tmp;
	if (x1 <= -1.45e+58) {
		tmp = t_0 + (x2 * ((x1 * -12.0) - 6.0));
	} else if (x1 <= 3.5e+153) {
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	} else {
		tmp = (x2 * -6.0) + t_0;
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 * (-1.0 + (x1 * 9.0))
	tmp = 0
	if x1 <= -1.45e+58:
		tmp = t_0 + (x2 * ((x1 * -12.0) - 6.0))
	elif x1 <= 3.5e+153:
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1
	else:
		tmp = (x2 * -6.0) + t_0
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))
	tmp = 0.0
	if (x1 <= -1.45e+58)
		tmp = Float64(t_0 + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)));
	elseif (x1 <= 3.5e+153)
		tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1);
	else
		tmp = Float64(Float64(x2 * -6.0) + t_0);
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 * (-1.0 + (x1 * 9.0));
	tmp = 0.0;
	if (x1 <= -1.45e+58)
		tmp = t_0 + (x2 * ((x1 * -12.0) - 6.0));
	elseif (x1 <= 3.5e+153)
		tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
	else
		tmp = (x2 * -6.0) + t_0;
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.45e+58], N[(t$95$0 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.5e+153], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58}:\\
\;\;\;\;t\_0 + x2 \cdot \left(x1 \cdot -12 - 6\right)\\

\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+153}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + t\_0\\


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

    1. Initial program 27.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. Simplified52.1%

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

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

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

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

    if -1.45000000000000001e58 < x1 < 3.4999999999999999e153

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

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

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

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

    if 3.4999999999999999e153 < x1

    1. Initial program 2.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58}:\\ \;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(x1 \cdot -12 - 6\right)\\ \mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+153}:\\ \;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 72.2% accurate, 5.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58}:\\ \;\;\;\;t\_0 + x2 \cdot \left(x1 \cdot -12 - 6\right)\\ \mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+153}:\\ \;\;\;\;x2 \cdot -6 - x1 \cdot \left(x2 \cdot \left(12 - x2 \cdot 8\right) - -1\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + t\_0\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (+ -1.0 (* x1 9.0)))))
   (if (<= x1 -1.45e+58)
     (+ t_0 (* x2 (- (* x1 -12.0) 6.0)))
     (if (<= x1 3.5e+153)
       (- (* x2 -6.0) (* x1 (- (* x2 (- 12.0 (* x2 8.0))) -1.0)))
       (+ (* x2 -6.0) t_0)))))
double code(double x1, double x2) {
	double t_0 = x1 * (-1.0 + (x1 * 9.0));
	double tmp;
	if (x1 <= -1.45e+58) {
		tmp = t_0 + (x2 * ((x1 * -12.0) - 6.0));
	} else if (x1 <= 3.5e+153) {
		tmp = (x2 * -6.0) - (x1 * ((x2 * (12.0 - (x2 * 8.0))) - -1.0));
	} else {
		tmp = (x2 * -6.0) + t_0;
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x1 * ((-1.0d0) + (x1 * 9.0d0))
    if (x1 <= (-1.45d+58)) then
        tmp = t_0 + (x2 * ((x1 * (-12.0d0)) - 6.0d0))
    else if (x1 <= 3.5d+153) then
        tmp = (x2 * (-6.0d0)) - (x1 * ((x2 * (12.0d0 - (x2 * 8.0d0))) - (-1.0d0)))
    else
        tmp = (x2 * (-6.0d0)) + t_0
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 * (-1.0 + (x1 * 9.0));
	double tmp;
	if (x1 <= -1.45e+58) {
		tmp = t_0 + (x2 * ((x1 * -12.0) - 6.0));
	} else if (x1 <= 3.5e+153) {
		tmp = (x2 * -6.0) - (x1 * ((x2 * (12.0 - (x2 * 8.0))) - -1.0));
	} else {
		tmp = (x2 * -6.0) + t_0;
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 * (-1.0 + (x1 * 9.0))
	tmp = 0
	if x1 <= -1.45e+58:
		tmp = t_0 + (x2 * ((x1 * -12.0) - 6.0))
	elif x1 <= 3.5e+153:
		tmp = (x2 * -6.0) - (x1 * ((x2 * (12.0 - (x2 * 8.0))) - -1.0))
	else:
		tmp = (x2 * -6.0) + t_0
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0)))
	tmp = 0.0
	if (x1 <= -1.45e+58)
		tmp = Float64(t_0 + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)));
	elseif (x1 <= 3.5e+153)
		tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(Float64(x2 * Float64(12.0 - Float64(x2 * 8.0))) - -1.0)));
	else
		tmp = Float64(Float64(x2 * -6.0) + t_0);
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 * (-1.0 + (x1 * 9.0));
	tmp = 0.0;
	if (x1 <= -1.45e+58)
		tmp = t_0 + (x2 * ((x1 * -12.0) - 6.0));
	elseif (x1 <= 3.5e+153)
		tmp = (x2 * -6.0) - (x1 * ((x2 * (12.0 - (x2 * 8.0))) - -1.0));
	else
		tmp = (x2 * -6.0) + t_0;
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.45e+58], N[(t$95$0 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.5e+153], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(N[(x2 * N[(12.0 - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58}:\\
\;\;\;\;t\_0 + x2 \cdot \left(x1 \cdot -12 - 6\right)\\

\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+153}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(x2 \cdot \left(12 - x2 \cdot 8\right) - -1\right)\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + t\_0\\


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

    1. Initial program 27.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. Simplified52.1%

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

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

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

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

    if -1.45000000000000001e58 < x1 < 3.4999999999999999e153

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

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

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

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

    if 3.4999999999999999e153 < x1

    1. Initial program 2.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.45 \cdot 10^{+58}:\\ \;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right) + x2 \cdot \left(x1 \cdot -12 - 6\right)\\ \mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+153}:\\ \;\;\;\;x2 \cdot -6 - x1 \cdot \left(x2 \cdot \left(12 - x2 \cdot 8\right) - -1\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 68.9% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x2 \leq -1.25 \cdot 10^{+168} \lor \neg \left(x2 \leq 1.6 \cdot 10^{+157}\right):\\ \;\;\;\;x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (or (<= x2 -1.25e+168) (not (<= x2 1.6e+157)))
   (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
   (+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0))))))
double code(double x1, double x2) {
	double tmp;
	if ((x2 <= -1.25e+168) || !(x2 <= 1.6e+157)) {
		tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: tmp
    if ((x2 <= (-1.25d+168)) .or. (.not. (x2 <= 1.6d+157))) then
        tmp = x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
    else
        tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if ((x2 <= -1.25e+168) || !(x2 <= 1.6e+157)) {
		tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
	} else {
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if (x2 <= -1.25e+168) or not (x2 <= 1.6e+157):
		tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))
	else:
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)))
	return tmp
function code(x1, x2)
	tmp = 0.0
	if ((x2 <= -1.25e+168) || !(x2 <= 1.6e+157))
		tmp = Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))));
	else
		tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if ((x2 <= -1.25e+168) || ~((x2 <= 1.6e+157)))
		tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
	else
		tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.25e+168], N[Not[LessEqual[x2, 1.6e+157]], $MachinePrecision]], N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.25 \cdot 10^{+168} \lor \neg \left(x2 \leq 1.6 \cdot 10^{+157}\right):\\
\;\;\;\;x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x2 < -1.24999999999999992e168 or 1.6e157 < x2

    1. Initial program 69.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. Simplified69.0%

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

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

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

    if -1.24999999999999992e168 < x2 < 1.6e157

    1. Initial program 74.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. Simplified76.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x2 \leq -1.25 \cdot 10^{+168} \lor \neg \left(x2 \leq 1.6 \cdot 10^{+157}\right):\\ \;\;\;\;x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 44.1% accurate, 9.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x2 \leq 3.4 \cdot 10^{+220}:\\ \;\;\;\;x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \left(-1 + -6 \cdot \frac{x2}{x1}\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (<= x2 3.4e+220)
   (* x2 (- (- 6.0) (/ x1 x2)))
   (* x1 (+ -1.0 (* -6.0 (/ x2 x1))))))
double code(double x1, double x2) {
	double tmp;
	if (x2 <= 3.4e+220) {
		tmp = x2 * (-6.0 - (x1 / x2));
	} else {
		tmp = x1 * (-1.0 + (-6.0 * (x2 / x1)));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: tmp
    if (x2 <= 3.4d+220) then
        tmp = x2 * (-6.0d0 - (x1 / x2))
    else
        tmp = x1 * ((-1.0d0) + ((-6.0d0) * (x2 / x1)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if (x2 <= 3.4e+220) {
		tmp = x2 * (-6.0 - (x1 / x2));
	} else {
		tmp = x1 * (-1.0 + (-6.0 * (x2 / x1)));
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if x2 <= 3.4e+220:
		tmp = x2 * (-6.0 - (x1 / x2))
	else:
		tmp = x1 * (-1.0 + (-6.0 * (x2 / x1)))
	return tmp
function code(x1, x2)
	tmp = 0.0
	if (x2 <= 3.4e+220)
		tmp = Float64(x2 * Float64(Float64(-6.0) - Float64(x1 / x2)));
	else
		tmp = Float64(x1 * Float64(-1.0 + Float64(-6.0 * Float64(x2 / x1))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if (x2 <= 3.4e+220)
		tmp = x2 * (-6.0 - (x1 / x2));
	else
		tmp = x1 * (-1.0 + (-6.0 * (x2 / x1)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[LessEqual[x2, 3.4e+220], N[(x2 * N[((-6.0) - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(-1.0 + N[(-6.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x2 \leq 3.4 \cdot 10^{+220}:\\
\;\;\;\;x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)\\

\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(-1 + -6 \cdot \frac{x2}{x1}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x2 < 3.4e220

    1. Initial program 74.2%

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

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

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

      \[\leadsto -6 \cdot x2 + \color{blue}{-1 \cdot x1} \]
    6. Step-by-step derivation
      1. mul-1-neg44.9%

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

      \[\leadsto -6 \cdot x2 + \color{blue}{\left(-x1\right)} \]
    8. Taylor expanded in x2 around -inf 49.0%

      \[\leadsto \color{blue}{-1 \cdot \left(x2 \cdot \left(6 + \frac{x1}{x2}\right)\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg49.0%

        \[\leadsto \color{blue}{-x2 \cdot \left(6 + \frac{x1}{x2}\right)} \]
      2. *-commutative49.0%

        \[\leadsto -\color{blue}{\left(6 + \frac{x1}{x2}\right) \cdot x2} \]
      3. distribute-rgt-neg-in49.0%

        \[\leadsto \color{blue}{\left(6 + \frac{x1}{x2}\right) \cdot \left(-x2\right)} \]
      4. +-commutative49.0%

        \[\leadsto \color{blue}{\left(\frac{x1}{x2} + 6\right)} \cdot \left(-x2\right) \]
    10. Simplified49.0%

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

    if 3.4e220 < x2

    1. Initial program 63.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. Simplified63.0%

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

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

      \[\leadsto -6 \cdot x2 + \color{blue}{-1 \cdot x1} \]
    6. Step-by-step derivation
      1. mul-1-neg6.4%

        \[\leadsto -6 \cdot x2 + \color{blue}{\left(-x1\right)} \]
    7. Simplified6.4%

      \[\leadsto -6 \cdot x2 + \color{blue}{\left(-x1\right)} \]
    8. Taylor expanded in x1 around inf 23.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x2 \leq 3.4 \cdot 10^{+220}:\\ \;\;\;\;x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \left(-1 + -6 \cdot \frac{x2}{x1}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 31.4% accurate, 9.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x2 \leq -1.3 \cdot 10^{-175} \lor \neg \left(x2 \leq 1.25 \cdot 10^{-147}\right):\\ \;\;\;\;x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;-x1\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (or (<= x2 -1.3e-175) (not (<= x2 1.25e-147))) (* x2 -6.0) (- x1)))
double code(double x1, double x2) {
	double tmp;
	if ((x2 <= -1.3e-175) || !(x2 <= 1.25e-147)) {
		tmp = x2 * -6.0;
	} else {
		tmp = -x1;
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: tmp
    if ((x2 <= (-1.3d-175)) .or. (.not. (x2 <= 1.25d-147))) then
        tmp = x2 * (-6.0d0)
    else
        tmp = -x1
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if ((x2 <= -1.3e-175) || !(x2 <= 1.25e-147)) {
		tmp = x2 * -6.0;
	} else {
		tmp = -x1;
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if (x2 <= -1.3e-175) or not (x2 <= 1.25e-147):
		tmp = x2 * -6.0
	else:
		tmp = -x1
	return tmp
function code(x1, x2)
	tmp = 0.0
	if ((x2 <= -1.3e-175) || !(x2 <= 1.25e-147))
		tmp = Float64(x2 * -6.0);
	else
		tmp = Float64(-x1);
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if ((x2 <= -1.3e-175) || ~((x2 <= 1.25e-147)))
		tmp = x2 * -6.0;
	else
		tmp = -x1;
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.3e-175], N[Not[LessEqual[x2, 1.25e-147]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], (-x1)]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.3 \cdot 10^{-175} \lor \neg \left(x2 \leq 1.25 \cdot 10^{-147}\right):\\
\;\;\;\;x2 \cdot -6\\

\mathbf{else}:\\
\;\;\;\;-x1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x2 < -1.3e-175 or 1.25000000000000003e-147 < x2

    1. Initial program 72.7%

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

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

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

    if -1.3e-175 < x2 < 1.25000000000000003e-147

    1. Initial program 73.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. Simplified74.8%

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

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

      \[\leadsto -6 \cdot x2 + \color{blue}{-1 \cdot x1} \]
    6. Step-by-step derivation
      1. mul-1-neg60.7%

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

      \[\leadsto -6 \cdot x2 + \color{blue}{\left(-x1\right)} \]
    8. Taylor expanded in x2 around 0 54.3%

      \[\leadsto \color{blue}{-1 \cdot x1} \]
    9. Step-by-step derivation
      1. neg-mul-154.3%

        \[\leadsto \color{blue}{-x1} \]
    10. Simplified54.3%

      \[\leadsto \color{blue}{-x1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.1%

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

Alternative 21: 63.6% accurate, 11.5× speedup?

\[\begin{array}{l} \\ x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right) \end{array} \]
(FPCore (x1 x2) :precision binary64 (+ (* x2 -6.0) (* x1 (+ -1.0 (* x1 9.0)))))
double code(double x1, double x2) {
	return (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    code = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x1 * 9.0d0)))
end function
public static double code(double x1, double x2) {
	return (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
}
def code(x1, x2):
	return (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)))
function code(x1, x2)
	return Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))))
end
function tmp = code(x1, x2)
	tmp = (x2 * -6.0) + (x1 * (-1.0 + (x1 * 9.0)));
end
code[x1_, x2_] := N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right)
\end{array}
Derivation
  1. Initial program 73.0%

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

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

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

    \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(9 \cdot x1 - 1\right)} \]
  6. Final simplification63.4%

    \[\leadsto x2 \cdot -6 + x1 \cdot \left(-1 + x1 \cdot 9\right) \]
  7. Add Preprocessing

Alternative 22: 43.6% accurate, 15.9× speedup?

\[\begin{array}{l} \\ x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right) \end{array} \]
(FPCore (x1 x2) :precision binary64 (* x2 (- (- 6.0) (/ x1 x2))))
double code(double x1, double x2) {
	return x2 * (-6.0 - (x1 / x2));
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    code = x2 * (-6.0d0 - (x1 / x2))
end function
public static double code(double x1, double x2) {
	return x2 * (-6.0 - (x1 / x2));
}
def code(x1, x2):
	return x2 * (-6.0 - (x1 / x2))
function code(x1, x2)
	return Float64(x2 * Float64(Float64(-6.0) - Float64(x1 / x2)))
end
function tmp = code(x1, x2)
	tmp = x2 * (-6.0 - (x1 / x2));
end
code[x1_, x2_] := N[(x2 * N[((-6.0) - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)
\end{array}
Derivation
  1. Initial program 73.0%

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

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

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

    \[\leadsto -6 \cdot x2 + \color{blue}{-1 \cdot x1} \]
  6. Step-by-step derivation
    1. mul-1-neg40.9%

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

    \[\leadsto -6 \cdot x2 + \color{blue}{\left(-x1\right)} \]
  8. Taylor expanded in x2 around -inf 44.5%

    \[\leadsto \color{blue}{-1 \cdot \left(x2 \cdot \left(6 + \frac{x1}{x2}\right)\right)} \]
  9. Step-by-step derivation
    1. mul-1-neg44.5%

      \[\leadsto \color{blue}{-x2 \cdot \left(6 + \frac{x1}{x2}\right)} \]
    2. *-commutative44.5%

      \[\leadsto -\color{blue}{\left(6 + \frac{x1}{x2}\right) \cdot x2} \]
    3. distribute-rgt-neg-in44.5%

      \[\leadsto \color{blue}{\left(6 + \frac{x1}{x2}\right) \cdot \left(-x2\right)} \]
    4. +-commutative44.5%

      \[\leadsto \color{blue}{\left(\frac{x1}{x2} + 6\right)} \cdot \left(-x2\right) \]
  10. Simplified44.5%

    \[\leadsto \color{blue}{\left(\frac{x1}{x2} + 6\right) \cdot \left(-x2\right)} \]
  11. Final simplification44.5%

    \[\leadsto x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right) \]
  12. Add Preprocessing

Alternative 23: 38.0% accurate, 25.4× speedup?

\[\begin{array}{l} \\ x2 \cdot -6 - x1 \end{array} \]
(FPCore (x1 x2) :precision binary64 (- (* x2 -6.0) x1))
double code(double x1, double x2) {
	return (x2 * -6.0) - x1;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    code = (x2 * (-6.0d0)) - x1
end function
public static double code(double x1, double x2) {
	return (x2 * -6.0) - x1;
}
def code(x1, x2):
	return (x2 * -6.0) - x1
function code(x1, x2)
	return Float64(Float64(x2 * -6.0) - x1)
end
function tmp = code(x1, x2)
	tmp = (x2 * -6.0) - x1;
end
code[x1_, x2_] := N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]
\begin{array}{l}

\\
x2 \cdot -6 - x1
\end{array}
Derivation
  1. Initial program 73.0%

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

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

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

    \[\leadsto -6 \cdot x2 + \color{blue}{-1 \cdot x1} \]
  6. Step-by-step derivation
    1. mul-1-neg40.9%

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

    \[\leadsto -6 \cdot x2 + \color{blue}{\left(-x1\right)} \]
  8. Taylor expanded in x2 around 0 40.9%

    \[\leadsto \color{blue}{-6 \cdot x2 - x1} \]
  9. Step-by-step derivation
    1. *-commutative40.9%

      \[\leadsto \color{blue}{x2 \cdot -6} - x1 \]
  10. Simplified40.9%

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

Alternative 24: 14.2% accurate, 63.5× 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 73.0%

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

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

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

    \[\leadsto -6 \cdot x2 + \color{blue}{-1 \cdot x1} \]
  6. Step-by-step derivation
    1. mul-1-neg40.9%

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

    \[\leadsto -6 \cdot x2 + \color{blue}{\left(-x1\right)} \]
  8. Taylor expanded in x2 around 0 15.4%

    \[\leadsto \color{blue}{-1 \cdot x1} \]
  9. Step-by-step derivation
    1. neg-mul-115.4%

      \[\leadsto \color{blue}{-x1} \]
  10. Simplified15.4%

    \[\leadsto \color{blue}{-x1} \]
  11. Add Preprocessing

Reproduce

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