Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 70.2% → 99.5%
Time: 56.2s
Alternatives: 27
Speedup: 1.4×

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

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

Initial Program: 70.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
t_3 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + t_0 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \leq \infty:\\
\;\;\;\;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_3, 4, -6\right), t_3 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_3 + -3\right)\right)\right), \left(3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\mathsf{fma}\left(x1 \cdot 3, x1, x2 + x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} + {x1}^{3}\right)\right)\\

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

Alternative 2: 99.5% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
t_3 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + t_0 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \leq \infty:\\
\;\;\;\;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_3, 4, -6\right), t_3 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_3 + -3\right)\right)\right), {x1}^{3} + \left(3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{t_0 - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right)\\

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

Alternative 3: 99.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + t_0 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)\\
\mathbf{if}\;t_3 \leq \infty:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 99.6%

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

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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

Alternative 4: 98.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 6 \cdot {x1}^{4}\\ t_1 := x1 \cdot x1 + 1\\ t_2 := 3 \cdot \left(x2 \cdot -2\right)\\ t_3 := \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{t_1}\\ \mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\ \;\;\;\;x1 \cdot 2 + t_0\\ \mathbf{elif}\;x1 \leq 2.4 \cdot 10^{+49}:\\ \;\;\;\;x1 + \left(t_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\right) + x1 \cdot \left(\left(x1 \cdot 3\right) \cdot \left(3 - \frac{1}{x1}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + t_0\right) + t_2\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* 6.0 (pow x1 4.0)))
        (t_1 (+ (* x1 x1) 1.0))
        (t_2 (* 3.0 (* x2 -2.0)))
        (t_3 (/ (- (+ (* x1 (* x1 3.0)) (* 2.0 x2)) x1) t_1)))
   (if (<= x1 -5.5e+102)
     (+ (* x1 2.0) t_0)
     (if (<= x1 2.4e+49)
       (+
        x1
        (+
         t_2
         (+
          x1
          (+
           (* x1 (* x1 x1))
           (+
            (*
             t_1
             (+
              (* (* (* x1 2.0) t_3) (- t_3 3.0))
              (* (* x1 x1) (- (* t_3 4.0) 6.0))))
            (* x1 (* (* x1 3.0) (- 3.0 (/ 1.0 x1)))))))))
       (+ x1 (+ (+ x1 t_0) t_2))))))
double code(double x1, double x2) {
	double t_0 = 6.0 * pow(x1, 4.0);
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = 3.0 * (x2 * -2.0);
	double t_3 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_1;
	double tmp;
	if (x1 <= -5.5e+102) {
		tmp = (x1 * 2.0) + t_0;
	} else if (x1 <= 2.4e+49) {
		tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (x1 * ((x1 * 3.0) * (3.0 - (1.0 / x1))))))));
	} else {
		tmp = x1 + ((x1 + t_0) + t_2);
	}
	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 = 6.0d0 * (x1 ** 4.0d0)
    t_1 = (x1 * x1) + 1.0d0
    t_2 = 3.0d0 * (x2 * (-2.0d0))
    t_3 = (((x1 * (x1 * 3.0d0)) + (2.0d0 * x2)) - x1) / t_1
    if (x1 <= (-5.5d+102)) then
        tmp = (x1 * 2.0d0) + t_0
    else if (x1 <= 2.4d+49) then
        tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)))) + (x1 * ((x1 * 3.0d0) * (3.0d0 - (1.0d0 / x1))))))))
    else
        tmp = x1 + ((x1 + t_0) + t_2)
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = 6.0 * Math.pow(x1, 4.0);
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = 3.0 * (x2 * -2.0);
	double t_3 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_1;
	double tmp;
	if (x1 <= -5.5e+102) {
		tmp = (x1 * 2.0) + t_0;
	} else if (x1 <= 2.4e+49) {
		tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (x1 * ((x1 * 3.0) * (3.0 - (1.0 / x1))))))));
	} else {
		tmp = x1 + ((x1 + t_0) + t_2);
	}
	return tmp;
}
def code(x1, x2):
	t_0 = 6.0 * math.pow(x1, 4.0)
	t_1 = (x1 * x1) + 1.0
	t_2 = 3.0 * (x2 * -2.0)
	t_3 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_1
	tmp = 0
	if x1 <= -5.5e+102:
		tmp = (x1 * 2.0) + t_0
	elif x1 <= 2.4e+49:
		tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (x1 * ((x1 * 3.0) * (3.0 - (1.0 / x1))))))))
	else:
		tmp = x1 + ((x1 + t_0) + t_2)
	return tmp
function code(x1, x2)
	t_0 = Float64(6.0 * (x1 ^ 4.0))
	t_1 = Float64(Float64(x1 * x1) + 1.0)
	t_2 = Float64(3.0 * Float64(x2 * -2.0))
	t_3 = Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) + Float64(2.0 * x2)) - x1) / t_1)
	tmp = 0.0
	if (x1 <= -5.5e+102)
		tmp = Float64(Float64(x1 * 2.0) + t_0);
	elseif (x1 <= 2.4e+49)
		tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(x1 * Float64(Float64(x1 * 3.0) * Float64(3.0 - Float64(1.0 / x1)))))))));
	else
		tmp = Float64(x1 + Float64(Float64(x1 + t_0) + t_2));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = 6.0 * (x1 ^ 4.0);
	t_1 = (x1 * x1) + 1.0;
	t_2 = 3.0 * (x2 * -2.0);
	t_3 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_1;
	tmp = 0.0;
	if (x1 <= -5.5e+102)
		tmp = (x1 * 2.0) + t_0;
	elseif (x1 <= 2.4e+49)
		tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (x1 * ((x1 * 3.0) * (3.0 - (1.0 / x1))))))));
	else
		tmp = x1 + ((x1 + t_0) + t_2);
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(N[(x1 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[x1, 2.4e+49], N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * N[(3.0 - N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + t$95$0), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x1 \leq 2.4 \cdot 10^{+49}:\\
\;\;\;\;x1 + \left(t_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\right) + x1 \cdot \left(\left(x1 \cdot 3\right) \cdot \left(3 - \frac{1}{x1}\right)\right)\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + t_0\right) + t_2\right)\\


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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

    if -5.49999999999999981e102 < x1 < 2.4e49

    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. Taylor expanded in x1 around 0 75.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}{\left(-2 \cdot x2\right)}\right) \]
    3. Step-by-step derivation
      1. *-commutative75.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}{\left(x2 \cdot -2\right)}\right) \]
    4. Simplified75.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}{\left(x2 \cdot -2\right)}\right) \]
    5. Taylor expanded in x1 around inf 92.6%

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

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

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

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

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

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

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

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

    if 2.4e49 < x1

    1. Initial program 42.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. Taylor expanded in x1 around 0 42.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\ \;\;\;\;x1 \cdot 2 + 6 \cdot {x1}^{4}\\ \mathbf{elif}\;x1 \leq 2.4 \cdot 10^{+49}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + x1 \cdot \left(\left(x1 \cdot 3\right) \cdot \left(3 - \frac{1}{x1}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\ \end{array} \]

Alternative 5: 98.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102} \lor \neg \left(x1 \leq 2.4 \cdot 10^{+49}\right):\\ \;\;\;\;x1 \cdot 2 + 6 \cdot {x1}^{4}\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_1\right) \cdot \left(t_1 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_1 \cdot 4 - 6\right)\right) + x1 \cdot \left(\left(x1 \cdot 3\right) \cdot \left(3 - \frac{1}{x1}\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)) (* 2.0 x2)) x1) t_0)))
   (if (or (<= x1 -5.5e+102) (not (<= x1 2.4e+49)))
     (+ (* x1 2.0) (* 6.0 (pow x1 4.0)))
     (+
      x1
      (+
       (* 3.0 (* x2 -2.0))
       (+
        x1
        (+
         (* x1 (* x1 x1))
         (+
          (*
           t_0
           (+
            (* (* (* x1 2.0) t_1) (- t_1 3.0))
            (* (* x1 x1) (- (* t_1 4.0) 6.0))))
          (* x1 (* (* x1 3.0) (- 3.0 (/ 1.0 x1))))))))))))
double code(double x1, double x2) {
	double t_0 = (x1 * x1) + 1.0;
	double t_1 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_0;
	double tmp;
	if ((x1 <= -5.5e+102) || !(x1 <= 2.4e+49)) {
		tmp = (x1 * 2.0) + (6.0 * pow(x1, 4.0));
	} else {
		tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_1) * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + (x1 * ((x1 * 3.0) * (3.0 - (1.0 / 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 = (x1 * x1) + 1.0d0
    t_1 = (((x1 * (x1 * 3.0d0)) + (2.0d0 * x2)) - x1) / t_0
    if ((x1 <= (-5.5d+102)) .or. (.not. (x1 <= 2.4d+49))) then
        tmp = (x1 * 2.0d0) + (6.0d0 * (x1 ** 4.0d0))
    else
        tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_1) * (t_1 - 3.0d0)) + ((x1 * x1) * ((t_1 * 4.0d0) - 6.0d0)))) + (x1 * ((x1 * 3.0d0) * (3.0d0 - (1.0d0 / x1))))))))
    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)) + (2.0 * x2)) - x1) / t_0;
	double tmp;
	if ((x1 <= -5.5e+102) || !(x1 <= 2.4e+49)) {
		tmp = (x1 * 2.0) + (6.0 * Math.pow(x1, 4.0));
	} else {
		tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_1) * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + (x1 * ((x1 * 3.0) * (3.0 - (1.0 / x1))))))));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x1 * x1) + 1.0
	t_1 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_0
	tmp = 0
	if (x1 <= -5.5e+102) or not (x1 <= 2.4e+49):
		tmp = (x1 * 2.0) + (6.0 * math.pow(x1, 4.0))
	else:
		tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_1) * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + (x1 * ((x1 * 3.0) * (3.0 - (1.0 / x1))))))))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x1 * x1) + 1.0)
	t_1 = Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) + Float64(2.0 * x2)) - x1) / t_0)
	tmp = 0.0
	if ((x1 <= -5.5e+102) || !(x1 <= 2.4e+49))
		tmp = Float64(Float64(x1 * 2.0) + Float64(6.0 * (x1 ^ 4.0)));
	else
		tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_1) * Float64(t_1 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_1 * 4.0) - 6.0)))) + Float64(x1 * Float64(Float64(x1 * 3.0) * Float64(3.0 - Float64(1.0 / x1)))))))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (x1 * x1) + 1.0;
	t_1 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_0;
	tmp = 0.0;
	if ((x1 <= -5.5e+102) || ~((x1 <= 2.4e+49)))
		tmp = (x1 * 2.0) + (6.0 * (x1 ^ 4.0));
	else
		tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_1) * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + (x1 * ((x1 * 3.0) * (3.0 - (1.0 / x1))))))));
	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[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[Or[LessEqual[x1, -5.5e+102], N[Not[LessEqual[x1, 2.4e+49]], $MachinePrecision]], N[(N[(x1 * 2.0), $MachinePrecision] + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$1), $MachinePrecision] * 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] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * N[(3.0 - N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102} \lor \neg \left(x1 \leq 2.4 \cdot 10^{+49}\right):\\
\;\;\;\;x1 \cdot 2 + 6 \cdot {x1}^{4}\\

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


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

    1. Initial program 24.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. Taylor expanded in x1 around 0 24.0%

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

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

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

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

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

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

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

    if -5.49999999999999981e102 < x1 < 2.4e49

    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. Taylor expanded in x1 around 0 75.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}{\left(-2 \cdot x2\right)}\right) \]
    3. Step-by-step derivation
      1. *-commutative75.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}{\left(x2 \cdot -2\right)}\right) \]
    4. Simplified75.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}{\left(x2 \cdot -2\right)}\right) \]
    5. Taylor expanded in x1 around inf 92.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102} \lor \neg \left(x1 \leq 2.4 \cdot 10^{+49}\right):\\ \;\;\;\;x1 \cdot 2 + 6 \cdot {x1}^{4}\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + x1 \cdot \left(\left(x1 \cdot 3\right) \cdot \left(3 - \frac{1}{x1}\right)\right)\right)\right)\right)\right)\\ \end{array} \]

Alternative 6: 86.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_0 := \left(x2 \cdot x2\right) \cdot 36\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -2.7 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{t_0 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + x1 \cdot \left(\left(x1 \cdot 3\right) \cdot \left(3 - \frac{1}{x1}\right)\right)\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_0}{x1 - x2 \cdot -6}\\


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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr41.0%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr41.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval41.0%

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

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

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

    if -2.69999999999999993e103 < x1 < 1.35000000000000003e154

    1. Initial program 98.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. Taylor expanded in x1 around 0 77.9%

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

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

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

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \color{blue}{\left(3 - \frac{1}{x1}\right)}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    6. Step-by-step derivation
      1. pow192.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) + \color{blue}{{\left(\left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \left(3 - \frac{1}{x1}\right)\right)}^{1}}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. *-commutative92.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(\color{blue}{\left(x1 \cdot \left(3 \cdot x1\right)\right)} \cdot \left(3 - \frac{1}{x1}\right)\right)}^{1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      3. *-commutative92.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(x1 \cdot \color{blue}{\left(x1 \cdot 3\right)}\right) \cdot \left(3 - \frac{1}{x1}\right)\right)}^{1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    7. Applied egg-rr92.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) + \color{blue}{{\left(\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \left(3 - \frac{1}{x1}\right)\right)}^{1}}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    8. Step-by-step derivation
      1. unpow192.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) + \color{blue}{\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \left(3 - \frac{1}{x1}\right)}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. associate-*l*98.4%

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

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -2.7 \cdot 10^{+103}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + x1 \cdot \left(\left(x1 \cdot 3\right) \cdot \left(3 - \frac{1}{x1}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 7: 79.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 3 \cdot t_0\\ t_2 := x1 \cdot x1 + 1\\ t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\ t_4 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\ t_5 := t_4 - 3\\ t_6 := \left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot t_5\\ t_7 := \left(x2 \cdot x2\right) \cdot 36\\ t_8 := 3 \cdot \left(x2 \cdot -2\right)\\ t_9 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\ t_10 := x1 + t_9\\ t_11 := x1 \cdot \left(x1 \cdot x1\right)\\ \mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\ \;\;\;\;x1 + \left(t_10 + \frac{t_7 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -3.2 \cdot 10^{+21}:\\ \;\;\;\;x1 + \left(t_8 + \left(x1 + \left(t_11 + \left(t_1 + t_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_4 \cdot 4 - 6\right) + t_5 \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -2.7 \cdot 10^{-235}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_11 + \left(t_2 \cdot t_9 + t_0 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{-210}:\\ \;\;\;\;x1 + \left(t_8 + \left(x1 + \left(t_11 + \left(t_1 + t_2 \cdot \left(t_6 + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 0.00032:\\ \;\;\;\;x1 + \left(t_3 + t_10\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(t_8 + \left(x1 + \left(t_11 + \left(t_2 \cdot \left(t_6 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 - \frac{1}{x1}\right) - 6\right)\right) + t_1\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_7}{x1 - x2 \cdot -6}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (* x1 3.0)))
        (t_1 (* 3.0 t_0))
        (t_2 (+ (* x1 x1) 1.0))
        (t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2)))
        (t_4 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
        (t_5 (- t_4 3.0))
        (t_6 (* (* (* x1 2.0) t_4) t_5))
        (t_7 (* (* x2 x2) 36.0))
        (t_8 (* 3.0 (* x2 -2.0)))
        (t_9 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
        (t_10 (+ x1 t_9))
        (t_11 (* x1 (* x1 x1))))
   (if (<= x1 -3.3e+94)
     (+ x1 (+ t_10 (/ (- t_7 (* (* x1 x1) 9.0)) (- (* x2 -6.0) (* x1 -3.0)))))
     (if (<= x1 -3.2e+21)
       (+
        x1
        (+
         t_8
         (+
          x1
          (+
           t_11
           (+
            t_1
            (*
             t_2
             (+
              (* (* x1 x1) (- (* t_4 4.0) 6.0))
              (* t_5 (* (* x1 2.0) 3.0)))))))))
       (if (<= x1 -2.7e-235)
         (+
          x1
          (+ t_3 (+ x1 (+ t_11 (+ (* t_2 t_9) (* t_0 (- (* 2.0 x2) x1)))))))
         (if (<= x1 3.4e-210)
           (+
            x1
            (+ t_8 (+ x1 (+ t_11 (+ t_1 (* t_2 (+ t_6 (* x1 (* x1 6.0)))))))))
           (if (<= x1 0.00032)
             (+ x1 (+ t_3 t_10))
             (if (<= x1 1.35e+154)
               (+
                x1
                (+
                 t_8
                 (+
                  x1
                  (+
                   t_11
                   (+
                    (*
                     t_2
                     (+ t_6 (* (* x1 x1) (- (* 4.0 (- 3.0 (/ 1.0 x1))) 6.0))))
                    t_1)))))
               (/ (- (* x1 x1) t_7) (- x1 (* x2 -6.0)))))))))))
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = 3.0 * t_0;
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
	double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
	double t_5 = t_4 - 3.0;
	double t_6 = ((x1 * 2.0) * t_4) * t_5;
	double t_7 = (x2 * x2) * 36.0;
	double t_8 = 3.0 * (x2 * -2.0);
	double t_9 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	double t_10 = x1 + t_9;
	double t_11 = x1 * (x1 * x1);
	double tmp;
	if (x1 <= -3.3e+94) {
		tmp = x1 + (t_10 + ((t_7 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -3.2e+21) {
		tmp = x1 + (t_8 + (x1 + (t_11 + (t_1 + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (t_5 * ((x1 * 2.0) * 3.0))))))));
	} else if (x1 <= -2.7e-235) {
		tmp = x1 + (t_3 + (x1 + (t_11 + ((t_2 * t_9) + (t_0 * ((2.0 * x2) - x1))))));
	} else if (x1 <= 3.4e-210) {
		tmp = x1 + (t_8 + (x1 + (t_11 + (t_1 + (t_2 * (t_6 + (x1 * (x1 * 6.0))))))));
	} else if (x1 <= 0.00032) {
		tmp = x1 + (t_3 + t_10);
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_8 + (x1 + (t_11 + ((t_2 * (t_6 + ((x1 * x1) * ((4.0 * (3.0 - (1.0 / x1))) - 6.0)))) + t_1))));
	} else {
		tmp = ((x1 * x1) - t_7) / (x1 - (x2 * -6.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_10
    real(8) :: t_11
    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) :: t_8
    real(8) :: t_9
    real(8) :: tmp
    t_0 = x1 * (x1 * 3.0d0)
    t_1 = 3.0d0 * t_0
    t_2 = (x1 * x1) + 1.0d0
    t_3 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)
    t_4 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
    t_5 = t_4 - 3.0d0
    t_6 = ((x1 * 2.0d0) * t_4) * t_5
    t_7 = (x2 * x2) * 36.0d0
    t_8 = 3.0d0 * (x2 * (-2.0d0))
    t_9 = 4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))
    t_10 = x1 + t_9
    t_11 = x1 * (x1 * x1)
    if (x1 <= (-3.3d+94)) then
        tmp = x1 + (t_10 + ((t_7 - ((x1 * x1) * 9.0d0)) / ((x2 * (-6.0d0)) - (x1 * (-3.0d0)))))
    else if (x1 <= (-3.2d+21)) then
        tmp = x1 + (t_8 + (x1 + (t_11 + (t_1 + (t_2 * (((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)) + (t_5 * ((x1 * 2.0d0) * 3.0d0))))))))
    else if (x1 <= (-2.7d-235)) then
        tmp = x1 + (t_3 + (x1 + (t_11 + ((t_2 * t_9) + (t_0 * ((2.0d0 * x2) - x1))))))
    else if (x1 <= 3.4d-210) then
        tmp = x1 + (t_8 + (x1 + (t_11 + (t_1 + (t_2 * (t_6 + (x1 * (x1 * 6.0d0))))))))
    else if (x1 <= 0.00032d0) then
        tmp = x1 + (t_3 + t_10)
    else if (x1 <= 1.35d+154) then
        tmp = x1 + (t_8 + (x1 + (t_11 + ((t_2 * (t_6 + ((x1 * x1) * ((4.0d0 * (3.0d0 - (1.0d0 / x1))) - 6.0d0)))) + t_1))))
    else
        tmp = ((x1 * x1) - t_7) / (x1 - (x2 * (-6.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 = 3.0 * t_0;
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
	double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
	double t_5 = t_4 - 3.0;
	double t_6 = ((x1 * 2.0) * t_4) * t_5;
	double t_7 = (x2 * x2) * 36.0;
	double t_8 = 3.0 * (x2 * -2.0);
	double t_9 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	double t_10 = x1 + t_9;
	double t_11 = x1 * (x1 * x1);
	double tmp;
	if (x1 <= -3.3e+94) {
		tmp = x1 + (t_10 + ((t_7 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -3.2e+21) {
		tmp = x1 + (t_8 + (x1 + (t_11 + (t_1 + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (t_5 * ((x1 * 2.0) * 3.0))))))));
	} else if (x1 <= -2.7e-235) {
		tmp = x1 + (t_3 + (x1 + (t_11 + ((t_2 * t_9) + (t_0 * ((2.0 * x2) - x1))))));
	} else if (x1 <= 3.4e-210) {
		tmp = x1 + (t_8 + (x1 + (t_11 + (t_1 + (t_2 * (t_6 + (x1 * (x1 * 6.0))))))));
	} else if (x1 <= 0.00032) {
		tmp = x1 + (t_3 + t_10);
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_8 + (x1 + (t_11 + ((t_2 * (t_6 + ((x1 * x1) * ((4.0 * (3.0 - (1.0 / x1))) - 6.0)))) + t_1))));
	} else {
		tmp = ((x1 * x1) - t_7) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 * (x1 * 3.0)
	t_1 = 3.0 * t_0
	t_2 = (x1 * x1) + 1.0
	t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)
	t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2
	t_5 = t_4 - 3.0
	t_6 = ((x1 * 2.0) * t_4) * t_5
	t_7 = (x2 * x2) * 36.0
	t_8 = 3.0 * (x2 * -2.0)
	t_9 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))
	t_10 = x1 + t_9
	t_11 = x1 * (x1 * x1)
	tmp = 0
	if x1 <= -3.3e+94:
		tmp = x1 + (t_10 + ((t_7 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))))
	elif x1 <= -3.2e+21:
		tmp = x1 + (t_8 + (x1 + (t_11 + (t_1 + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (t_5 * ((x1 * 2.0) * 3.0))))))))
	elif x1 <= -2.7e-235:
		tmp = x1 + (t_3 + (x1 + (t_11 + ((t_2 * t_9) + (t_0 * ((2.0 * x2) - x1))))))
	elif x1 <= 3.4e-210:
		tmp = x1 + (t_8 + (x1 + (t_11 + (t_1 + (t_2 * (t_6 + (x1 * (x1 * 6.0))))))))
	elif x1 <= 0.00032:
		tmp = x1 + (t_3 + t_10)
	elif x1 <= 1.35e+154:
		tmp = x1 + (t_8 + (x1 + (t_11 + ((t_2 * (t_6 + ((x1 * x1) * ((4.0 * (3.0 - (1.0 / x1))) - 6.0)))) + t_1))))
	else:
		tmp = ((x1 * x1) - t_7) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 * Float64(x1 * 3.0))
	t_1 = Float64(3.0 * t_0)
	t_2 = Float64(Float64(x1 * x1) + 1.0)
	t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2))
	t_4 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2)
	t_5 = Float64(t_4 - 3.0)
	t_6 = Float64(Float64(Float64(x1 * 2.0) * t_4) * t_5)
	t_7 = Float64(Float64(x2 * x2) * 36.0)
	t_8 = Float64(3.0 * Float64(x2 * -2.0))
	t_9 = Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))
	t_10 = Float64(x1 + t_9)
	t_11 = Float64(x1 * Float64(x1 * x1))
	tmp = 0.0
	if (x1 <= -3.3e+94)
		tmp = Float64(x1 + Float64(t_10 + Float64(Float64(t_7 - Float64(Float64(x1 * x1) * 9.0)) / Float64(Float64(x2 * -6.0) - Float64(x1 * -3.0)))));
	elseif (x1 <= -3.2e+21)
		tmp = Float64(x1 + Float64(t_8 + Float64(x1 + Float64(t_11 + Float64(t_1 + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)) + Float64(t_5 * Float64(Float64(x1 * 2.0) * 3.0)))))))));
	elseif (x1 <= -2.7e-235)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_11 + Float64(Float64(t_2 * t_9) + Float64(t_0 * Float64(Float64(2.0 * x2) - x1)))))));
	elseif (x1 <= 3.4e-210)
		tmp = Float64(x1 + Float64(t_8 + Float64(x1 + Float64(t_11 + Float64(t_1 + Float64(t_2 * Float64(t_6 + Float64(x1 * Float64(x1 * 6.0)))))))));
	elseif (x1 <= 0.00032)
		tmp = Float64(x1 + Float64(t_3 + t_10));
	elseif (x1 <= 1.35e+154)
		tmp = Float64(x1 + Float64(t_8 + Float64(x1 + Float64(t_11 + Float64(Float64(t_2 * Float64(t_6 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 - Float64(1.0 / x1))) - 6.0)))) + t_1)))));
	else
		tmp = Float64(Float64(Float64(x1 * x1) - t_7) / Float64(x1 - Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 * (x1 * 3.0);
	t_1 = 3.0 * t_0;
	t_2 = (x1 * x1) + 1.0;
	t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
	t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
	t_5 = t_4 - 3.0;
	t_6 = ((x1 * 2.0) * t_4) * t_5;
	t_7 = (x2 * x2) * 36.0;
	t_8 = 3.0 * (x2 * -2.0);
	t_9 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	t_10 = x1 + t_9;
	t_11 = x1 * (x1 * x1);
	tmp = 0.0;
	if (x1 <= -3.3e+94)
		tmp = x1 + (t_10 + ((t_7 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	elseif (x1 <= -3.2e+21)
		tmp = x1 + (t_8 + (x1 + (t_11 + (t_1 + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (t_5 * ((x1 * 2.0) * 3.0))))))));
	elseif (x1 <= -2.7e-235)
		tmp = x1 + (t_3 + (x1 + (t_11 + ((t_2 * t_9) + (t_0 * ((2.0 * x2) - x1))))));
	elseif (x1 <= 3.4e-210)
		tmp = x1 + (t_8 + (x1 + (t_11 + (t_1 + (t_2 * (t_6 + (x1 * (x1 * 6.0))))))));
	elseif (x1 <= 0.00032)
		tmp = x1 + (t_3 + t_10);
	elseif (x1 <= 1.35e+154)
		tmp = x1 + (t_8 + (x1 + (t_11 + ((t_2 * (t_6 + ((x1 * x1) * ((4.0 * (3.0 - (1.0 / x1))) - 6.0)))) + t_1))));
	else
		tmp = ((x1 * x1) - t_7) / (x1 - (x2 * -6.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[(3.0 * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 - 3.0), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]}, Block[{t$95$8 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$10 = N[(x1 + t$95$9), $MachinePrecision]}, Block[{t$95$11 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.3e+94], N[(x1 + N[(t$95$10 + N[(N[(t$95$7 - N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.2e+21], N[(x1 + N[(t$95$8 + N[(x1 + N[(t$95$11 + N[(t$95$1 + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 * N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.7e-235], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$11 + N[(N[(t$95$2 * t$95$9), $MachinePrecision] + N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.4e-210], N[(x1 + N[(t$95$8 + N[(x1 + N[(t$95$11 + N[(t$95$1 + N[(t$95$2 * N[(t$95$6 + N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.00032], N[(x1 + N[(t$95$3 + t$95$10), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$8 + N[(x1 + N[(t$95$11 + N[(N[(t$95$2 * N[(t$95$6 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 - N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - t$95$7), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 3 \cdot t_0\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\
t_4 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\
t_5 := t_4 - 3\\
t_6 := \left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot t_5\\
t_7 := \left(x2 \cdot x2\right) \cdot 36\\
t_8 := 3 \cdot \left(x2 \cdot -2\right)\\
t_9 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_10 := x1 + t_9\\
t_11 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\
\;\;\;\;x1 + \left(t_10 + \frac{t_7 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq -3.2 \cdot 10^{+21}:\\
\;\;\;\;x1 + \left(t_8 + \left(x1 + \left(t_11 + \left(t_1 + t_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_4 \cdot 4 - 6\right) + t_5 \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right)\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq -2.7 \cdot 10^{-235}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_11 + \left(t_2 \cdot t_9 + t_0 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 3.4 \cdot 10^{-210}:\\
\;\;\;\;x1 + \left(t_8 + \left(x1 + \left(t_11 + \left(t_1 + t_2 \cdot \left(t_6 + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 0.00032:\\
\;\;\;\;x1 + \left(t_3 + t_10\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_8 + \left(x1 + \left(t_11 + \left(t_2 \cdot \left(t_6 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 - \frac{1}{x1}\right) - 6\right)\right) + t_1\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_7}{x1 - x2 \cdot -6}\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if x1 < -3.3e94

    1. Initial program 4.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. Taylor expanded in x1 around 0 2.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr41.5%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr41.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval41.5%

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

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

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

    if -3.3e94 < x1 < -3.2e21

    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. Taylor expanded in x1 around 0 99.4%

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

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

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

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

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

    if -3.2e21 < x1 < -2.7000000000000002e-235

    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. Taylor expanded in x1 around 0 91.9%

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

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

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

    if -2.7000000000000002e-235 < x1 < 3.39999999999999974e-210

    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. Taylor expanded in x1 around 0 93.4%

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

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

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

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

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + 6 \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. associate-*r*93.4%

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

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

    if 3.39999999999999974e-210 < x1 < 3.20000000000000026e-4

    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. Taylor expanded in x1 around 0 95.4%

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

    if 3.20000000000000026e-4 < x1 < 1.35000000000000003e154

    1. Initial program 93.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. Taylor expanded in x1 around 0 93.1%

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

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

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

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

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -3.2 \cdot 10^{+21}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right) + \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -2.7 \cdot 10^{-235}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 3.4 \cdot 10^{-210}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 0.00032:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 - \frac{1}{x1}\right) - 6\right)\right) + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 8: 85.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_0 := \left(x2 \cdot x2\right) \cdot 36\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -5.4 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{t_0 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + x1 \cdot -3\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_0}{x1 - x2 \cdot -6}\\


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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr41.0%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr41.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval41.0%

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

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

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

    if -5.39999999999999985e103 < x1 < 1.35000000000000003e154

    1. Initial program 98.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. Taylor expanded in x1 around 0 77.9%

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

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

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

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

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

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

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.4 \cdot 10^{+103}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right) + x1 \cdot -3\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 9: 80.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ t_3 := 3 - \frac{1}{x1}\\ t_4 := \left(x2 \cdot x2\right) \cdot 36\\ t_5 := 3 \cdot \left(x2 \cdot -2\right)\\ t_6 := x1 \cdot \left(x1 \cdot x1\right)\\ t_7 := \left(x1 \cdot 2\right) \cdot t_2\\ \mathbf{if}\;x1 \leq -3.2 \cdot 10^{+103}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{t_4 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq 0.00037:\\ \;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_6 + \left(t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right) + t_7 \cdot \left(\left(x2 + x2\right) - 3\right)\right) + t_0 \cdot t_3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_6 + \left(t_1 \cdot \left(t_7 \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_0\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_4}{x1 - x2 \cdot -6}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (* x1 3.0)))
        (t_1 (+ (* x1 x1) 1.0))
        (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
        (t_3 (- 3.0 (/ 1.0 x1)))
        (t_4 (* (* x2 x2) 36.0))
        (t_5 (* 3.0 (* x2 -2.0)))
        (t_6 (* x1 (* x1 x1)))
        (t_7 (* (* x1 2.0) t_2)))
   (if (<= x1 -3.2e+103)
     (+
      x1
      (+
       (+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
       (/ (- t_4 (* (* x1 x1) 9.0)) (- (* x2 -6.0) (* x1 -3.0)))))
     (if (<= x1 0.00037)
       (+
        x1
        (+
         t_5
         (+
          x1
          (+
           t_6
           (+
            (*
             t_1
             (+ (* (* x1 x1) (- (* t_2 4.0) 6.0)) (* t_7 (- (+ x2 x2) 3.0))))
            (* t_0 t_3))))))
       (if (<= x1 1.35e+154)
         (+
          x1
          (+
           t_5
           (+
            x1
            (+
             t_6
             (+
              (* t_1 (+ (* t_7 (- t_2 3.0)) (* (* x1 x1) (- (* 4.0 t_3) 6.0))))
              (* 3.0 t_0))))))
         (/ (- (* x1 x1) t_4) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	double t_3 = 3.0 - (1.0 / x1);
	double t_4 = (x2 * x2) * 36.0;
	double t_5 = 3.0 * (x2 * -2.0);
	double t_6 = x1 * (x1 * x1);
	double t_7 = (x1 * 2.0) * t_2;
	double tmp;
	if (x1 <= -3.2e+103) {
		tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + ((t_4 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= 0.00037) {
		tmp = x1 + (t_5 + (x1 + (t_6 + ((t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (t_7 * ((x2 + x2) - 3.0)))) + (t_0 * t_3)))));
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_5 + (x1 + (t_6 + ((t_1 * ((t_7 * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_0)))));
	} else {
		tmp = ((x1 * x1) - t_4) / (x1 - (x2 * -6.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 = x1 * (x1 * 3.0d0)
    t_1 = (x1 * x1) + 1.0d0
    t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
    t_3 = 3.0d0 - (1.0d0 / x1)
    t_4 = (x2 * x2) * 36.0d0
    t_5 = 3.0d0 * (x2 * (-2.0d0))
    t_6 = x1 * (x1 * x1)
    t_7 = (x1 * 2.0d0) * t_2
    if (x1 <= (-3.2d+103)) then
        tmp = x1 + ((x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) + ((t_4 - ((x1 * x1) * 9.0d0)) / ((x2 * (-6.0d0)) - (x1 * (-3.0d0)))))
    else if (x1 <= 0.00037d0) then
        tmp = x1 + (t_5 + (x1 + (t_6 + ((t_1 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + (t_7 * ((x2 + x2) - 3.0d0)))) + (t_0 * t_3)))))
    else if (x1 <= 1.35d+154) then
        tmp = x1 + (t_5 + (x1 + (t_6 + ((t_1 * ((t_7 * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_3) - 6.0d0)))) + (3.0d0 * t_0)))))
    else
        tmp = ((x1 * x1) - t_4) / (x1 - (x2 * (-6.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	double t_3 = 3.0 - (1.0 / x1);
	double t_4 = (x2 * x2) * 36.0;
	double t_5 = 3.0 * (x2 * -2.0);
	double t_6 = x1 * (x1 * x1);
	double t_7 = (x1 * 2.0) * t_2;
	double tmp;
	if (x1 <= -3.2e+103) {
		tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + ((t_4 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= 0.00037) {
		tmp = x1 + (t_5 + (x1 + (t_6 + ((t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (t_7 * ((x2 + x2) - 3.0)))) + (t_0 * t_3)))));
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_5 + (x1 + (t_6 + ((t_1 * ((t_7 * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_0)))));
	} else {
		tmp = ((x1 * x1) - t_4) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 * (x1 * 3.0)
	t_1 = (x1 * x1) + 1.0
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1
	t_3 = 3.0 - (1.0 / x1)
	t_4 = (x2 * x2) * 36.0
	t_5 = 3.0 * (x2 * -2.0)
	t_6 = x1 * (x1 * x1)
	t_7 = (x1 * 2.0) * t_2
	tmp = 0
	if x1 <= -3.2e+103:
		tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + ((t_4 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))))
	elif x1 <= 0.00037:
		tmp = x1 + (t_5 + (x1 + (t_6 + ((t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (t_7 * ((x2 + x2) - 3.0)))) + (t_0 * t_3)))))
	elif x1 <= 1.35e+154:
		tmp = x1 + (t_5 + (x1 + (t_6 + ((t_1 * ((t_7 * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_0)))))
	else:
		tmp = ((x1 * x1) - t_4) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 * Float64(x1 * 3.0))
	t_1 = Float64(Float64(x1 * x1) + 1.0)
	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
	t_3 = Float64(3.0 - Float64(1.0 / x1))
	t_4 = Float64(Float64(x2 * x2) * 36.0)
	t_5 = Float64(3.0 * Float64(x2 * -2.0))
	t_6 = Float64(x1 * Float64(x1 * x1))
	t_7 = Float64(Float64(x1 * 2.0) * t_2)
	tmp = 0.0
	if (x1 <= -3.2e+103)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(Float64(t_4 - Float64(Float64(x1 * x1) * 9.0)) / Float64(Float64(x2 * -6.0) - Float64(x1 * -3.0)))));
	elseif (x1 <= 0.00037)
		tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_6 + Float64(Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(t_7 * Float64(Float64(x2 + x2) - 3.0)))) + Float64(t_0 * t_3))))));
	elseif (x1 <= 1.35e+154)
		tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_6 + Float64(Float64(t_1 * Float64(Float64(t_7 * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(3.0 * t_0))))));
	else
		tmp = Float64(Float64(Float64(x1 * x1) - t_4) / Float64(x1 - Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 * (x1 * 3.0);
	t_1 = (x1 * x1) + 1.0;
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	t_3 = 3.0 - (1.0 / x1);
	t_4 = (x2 * x2) * 36.0;
	t_5 = 3.0 * (x2 * -2.0);
	t_6 = x1 * (x1 * x1);
	t_7 = (x1 * 2.0) * t_2;
	tmp = 0.0;
	if (x1 <= -3.2e+103)
		tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + ((t_4 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	elseif (x1 <= 0.00037)
		tmp = x1 + (t_5 + (x1 + (t_6 + ((t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (t_7 * ((x2 + x2) - 3.0)))) + (t_0 * t_3)))));
	elseif (x1 <= 1.35e+154)
		tmp = x1 + (t_5 + (x1 + (t_6 + ((t_1 * ((t_7 * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_0)))));
	else
		tmp = ((x1 * x1) - t_4) / (x1 - (x2 * -6.0));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 - N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[x1, -3.2e+103], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 - N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.00037], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$6 + N[(N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$7 * N[(N[(x2 + x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$6 + N[(N[(t$95$1 * N[(N[(t$95$7 * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - t$95$4), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
t_3 := 3 - \frac{1}{x1}\\
t_4 := \left(x2 \cdot x2\right) \cdot 36\\
t_5 := 3 \cdot \left(x2 \cdot -2\right)\\
t_6 := x1 \cdot \left(x1 \cdot x1\right)\\
t_7 := \left(x1 \cdot 2\right) \cdot t_2\\
\mathbf{if}\;x1 \leq -3.2 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{t_4 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq 0.00037:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_6 + \left(t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right) + t_7 \cdot \left(\left(x2 + x2\right) - 3\right)\right) + t_0 \cdot t_3\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_6 + \left(t_1 \cdot \left(t_7 \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_0\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_4}{x1 - x2 \cdot -6}\\


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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr41.0%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr41.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval41.0%

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

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

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

    if -3.19999999999999993e103 < x1 < 3.6999999999999999e-4

    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. Taylor expanded in x1 around 0 74.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}{\left(-2 \cdot x2\right)}\right) \]
    3. Step-by-step derivation
      1. *-commutative74.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}{\left(x2 \cdot -2\right)}\right) \]
    4. Simplified74.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}{\left(x2 \cdot -2\right)}\right) \]
    5. Taylor expanded in x1 around inf 92.2%

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

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

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

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

    if 3.6999999999999999e-4 < x1 < 1.35000000000000003e154

    1. Initial program 93.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. Taylor expanded in x1 around 0 93.1%

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

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

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

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

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.2 \cdot 10^{+103}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq 0.00037:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\left(x2 + x2\right) - 3\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \left(3 - \frac{1}{x1}\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 - \frac{1}{x1}\right) - 6\right)\right) + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 10: 80.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x2 \cdot x2\right) \cdot 36\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := x1 \cdot x1 + 1\\ t_3 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\\ t_4 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\ t_5 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\ t_6 := x1 + t_5\\ t_7 := x1 \cdot \left(x1 \cdot x1\right)\\ t_8 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(t_7 + \left(3 \cdot t_1 + t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -3.6 \cdot 10^{+103}:\\ \;\;\;\;x1 + \left(t_6 + \frac{t_0 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -0.0255:\\ \;\;\;\;t_8\\ \mathbf{elif}\;x1 \leq -3.2 \cdot 10^{-235}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_7 + \left(t_1 \cdot t_4 + t_2 \cdot t_5\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 2 \cdot 10^{-210}:\\ \;\;\;\;t_8\\ \mathbf{elif}\;x1 \leq 0.000385:\\ \;\;\;\;x1 + \left(t_3 + t_6\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;t_8\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_0}{x1 - x2 \cdot -6}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* (* x2 x2) 36.0))
        (t_1 (* x1 (* x1 3.0)))
        (t_2 (+ (* x1 x1) 1.0))
        (t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2)))
        (t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
        (t_5 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
        (t_6 (+ x1 t_5))
        (t_7 (* x1 (* x1 x1)))
        (t_8
         (+
          x1
          (+
           (* 3.0 (* x2 -2.0))
           (+
            x1
            (+
             t_7
             (+
              (* 3.0 t_1)
              (*
               t_2
               (+ (* (* (* x1 2.0) t_4) (- t_4 3.0)) (* x1 (* x1 6.0)))))))))))
   (if (<= x1 -3.6e+103)
     (+ x1 (+ t_6 (/ (- t_0 (* (* x1 x1) 9.0)) (- (* x2 -6.0) (* x1 -3.0)))))
     (if (<= x1 -0.0255)
       t_8
       (if (<= x1 -3.2e-235)
         (+ x1 (+ t_3 (+ x1 (+ t_7 (+ (* t_1 t_4) (* t_2 t_5))))))
         (if (<= x1 2e-210)
           t_8
           (if (<= x1 0.000385)
             (+ x1 (+ t_3 t_6))
             (if (<= x1 1.35e+154)
               t_8
               (/ (- (* x1 x1) t_0) (- x1 (* x2 -6.0)))))))))))
double code(double x1, double x2) {
	double t_0 = (x2 * x2) * 36.0;
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
	double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
	double t_5 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	double t_6 = x1 + t_5;
	double t_7 = x1 * (x1 * x1);
	double t_8 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_7 + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x1 * (x1 * 6.0))))))));
	double tmp;
	if (x1 <= -3.6e+103) {
		tmp = x1 + (t_6 + ((t_0 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -0.0255) {
		tmp = t_8;
	} else if (x1 <= -3.2e-235) {
		tmp = x1 + (t_3 + (x1 + (t_7 + ((t_1 * t_4) + (t_2 * t_5)))));
	} else if (x1 <= 2e-210) {
		tmp = t_8;
	} else if (x1 <= 0.000385) {
		tmp = x1 + (t_3 + t_6);
	} else if (x1 <= 1.35e+154) {
		tmp = t_8;
	} else {
		tmp = ((x1 * x1) - t_0) / (x1 - (x2 * -6.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) :: t_8
    real(8) :: tmp
    t_0 = (x2 * x2) * 36.0d0
    t_1 = x1 * (x1 * 3.0d0)
    t_2 = (x1 * x1) + 1.0d0
    t_3 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)
    t_4 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
    t_5 = 4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))
    t_6 = x1 + t_5
    t_7 = x1 * (x1 * x1)
    t_8 = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (t_7 + ((3.0d0 * t_1) + (t_2 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + (x1 * (x1 * 6.0d0))))))))
    if (x1 <= (-3.6d+103)) then
        tmp = x1 + (t_6 + ((t_0 - ((x1 * x1) * 9.0d0)) / ((x2 * (-6.0d0)) - (x1 * (-3.0d0)))))
    else if (x1 <= (-0.0255d0)) then
        tmp = t_8
    else if (x1 <= (-3.2d-235)) then
        tmp = x1 + (t_3 + (x1 + (t_7 + ((t_1 * t_4) + (t_2 * t_5)))))
    else if (x1 <= 2d-210) then
        tmp = t_8
    else if (x1 <= 0.000385d0) then
        tmp = x1 + (t_3 + t_6)
    else if (x1 <= 1.35d+154) then
        tmp = t_8
    else
        tmp = ((x1 * x1) - t_0) / (x1 - (x2 * (-6.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = (x2 * x2) * 36.0;
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
	double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
	double t_5 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	double t_6 = x1 + t_5;
	double t_7 = x1 * (x1 * x1);
	double t_8 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_7 + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x1 * (x1 * 6.0))))))));
	double tmp;
	if (x1 <= -3.6e+103) {
		tmp = x1 + (t_6 + ((t_0 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -0.0255) {
		tmp = t_8;
	} else if (x1 <= -3.2e-235) {
		tmp = x1 + (t_3 + (x1 + (t_7 + ((t_1 * t_4) + (t_2 * t_5)))));
	} else if (x1 <= 2e-210) {
		tmp = t_8;
	} else if (x1 <= 0.000385) {
		tmp = x1 + (t_3 + t_6);
	} else if (x1 <= 1.35e+154) {
		tmp = t_8;
	} else {
		tmp = ((x1 * x1) - t_0) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x2 * x2) * 36.0
	t_1 = x1 * (x1 * 3.0)
	t_2 = (x1 * x1) + 1.0
	t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)
	t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2
	t_5 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))
	t_6 = x1 + t_5
	t_7 = x1 * (x1 * x1)
	t_8 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_7 + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x1 * (x1 * 6.0))))))))
	tmp = 0
	if x1 <= -3.6e+103:
		tmp = x1 + (t_6 + ((t_0 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))))
	elif x1 <= -0.0255:
		tmp = t_8
	elif x1 <= -3.2e-235:
		tmp = x1 + (t_3 + (x1 + (t_7 + ((t_1 * t_4) + (t_2 * t_5)))))
	elif x1 <= 2e-210:
		tmp = t_8
	elif x1 <= 0.000385:
		tmp = x1 + (t_3 + t_6)
	elif x1 <= 1.35e+154:
		tmp = t_8
	else:
		tmp = ((x1 * x1) - t_0) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x2 * x2) * 36.0)
	t_1 = Float64(x1 * Float64(x1 * 3.0))
	t_2 = Float64(Float64(x1 * x1) + 1.0)
	t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2))
	t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)
	t_5 = Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))
	t_6 = Float64(x1 + t_5)
	t_7 = Float64(x1 * Float64(x1 * x1))
	t_8 = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(t_7 + Float64(Float64(3.0 * t_1) + Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(x1 * Float64(x1 * 6.0)))))))))
	tmp = 0.0
	if (x1 <= -3.6e+103)
		tmp = Float64(x1 + Float64(t_6 + Float64(Float64(t_0 - Float64(Float64(x1 * x1) * 9.0)) / Float64(Float64(x2 * -6.0) - Float64(x1 * -3.0)))));
	elseif (x1 <= -0.0255)
		tmp = t_8;
	elseif (x1 <= -3.2e-235)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_7 + Float64(Float64(t_1 * t_4) + Float64(t_2 * t_5))))));
	elseif (x1 <= 2e-210)
		tmp = t_8;
	elseif (x1 <= 0.000385)
		tmp = Float64(x1 + Float64(t_3 + t_6));
	elseif (x1 <= 1.35e+154)
		tmp = t_8;
	else
		tmp = Float64(Float64(Float64(x1 * x1) - t_0) / Float64(x1 - Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (x2 * x2) * 36.0;
	t_1 = x1 * (x1 * 3.0);
	t_2 = (x1 * x1) + 1.0;
	t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
	t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
	t_5 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	t_6 = x1 + t_5;
	t_7 = x1 * (x1 * x1);
	t_8 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_7 + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x1 * (x1 * 6.0))))))));
	tmp = 0.0;
	if (x1 <= -3.6e+103)
		tmp = x1 + (t_6 + ((t_0 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	elseif (x1 <= -0.0255)
		tmp = t_8;
	elseif (x1 <= -3.2e-235)
		tmp = x1 + (t_3 + (x1 + (t_7 + ((t_1 * t_4) + (t_2 * t_5)))));
	elseif (x1 <= 2e-210)
		tmp = t_8;
	elseif (x1 <= 0.000385)
		tmp = x1 + (t_3 + t_6);
	elseif (x1 <= 1.35e+154)
		tmp = t_8;
	else
		tmp = ((x1 * x1) - t_0) / (x1 - (x2 * -6.0));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$7 + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.6e+103], N[(x1 + N[(t$95$6 + N[(N[(t$95$0 - N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.0255], t$95$8, If[LessEqual[x1, -3.2e-235], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$7 + N[(N[(t$95$1 * t$95$4), $MachinePrecision] + N[(t$95$2 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e-210], t$95$8, If[LessEqual[x1, 0.000385], N[(x1 + N[(t$95$3 + t$95$6), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$8, N[(N[(N[(x1 * x1), $MachinePrecision] - t$95$0), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x2 \cdot x2\right) \cdot 36\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\\
t_4 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\
t_5 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_6 := x1 + t_5\\
t_7 := x1 \cdot \left(x1 \cdot x1\right)\\
t_8 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(t_7 + \left(3 \cdot t_1 + t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3.6 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(t_6 + \frac{t_0 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq -0.0255:\\
\;\;\;\;t_8\\

\mathbf{elif}\;x1 \leq -3.2 \cdot 10^{-235}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_7 + \left(t_1 \cdot t_4 + t_2 \cdot t_5\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 2 \cdot 10^{-210}:\\
\;\;\;\;t_8\\

\mathbf{elif}\;x1 \leq 0.000385:\\
\;\;\;\;x1 + \left(t_3 + t_6\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_8\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_0}{x1 - x2 \cdot -6}\\


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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr41.0%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr41.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval41.0%

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

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

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

    if -3.60000000000000017e103 < x1 < -0.0254999999999999984 or -3.2000000000000001e-235 < x1 < 2.0000000000000001e-210 or 3.8499999999999998e-4 < x1 < 1.35000000000000003e154

    1. Initial program 97.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. Taylor expanded in x1 around 0 94.0%

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

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

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

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

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + 6 \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. associate-*r*89.3%

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

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

    if -0.0254999999999999984 < x1 < -3.2000000000000001e-235

    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. Taylor expanded in x1 around 0 97.2%

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

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

    if 2.0000000000000001e-210 < x1 < 3.8499999999999998e-4

    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. Taylor expanded in x1 around 0 95.4%

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.6 \cdot 10^{+103}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -0.0255:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -3.2 \cdot 10^{-235}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{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}{x1 \cdot x1 + 1} + \left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 2 \cdot 10^{-210}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 0.000385:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 11: 79.2% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 3 \cdot t_0\\ t_2 := \left(x2 \cdot x2\right) \cdot 36\\ t_3 := 3 \cdot \left(x2 \cdot -2\right)\\ t_4 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\ t_5 := x1 + t_4\\ t_6 := x1 \cdot \left(x1 \cdot x1\right)\\ t_7 := x1 \cdot x1 + 1\\ t_8 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_7}\\ t_9 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_7}\\ t_10 := t_9 - 3\\ t_11 := x1 + \left(t_3 + \left(x1 + \left(t_6 + \left(t_1 + t_7 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_9\right) \cdot t_10 + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\ \;\;\;\;x1 + \left(t_5 + \frac{t_2 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -3.2 \cdot 10^{+21}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_6 + \left(t_1 + t_7 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_9 \cdot 4 - 6\right) + t_10 \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -2.45 \cdot 10^{-235}:\\ \;\;\;\;x1 + \left(t_8 + \left(x1 + \left(t_6 + \left(t_7 \cdot t_4 + t_0 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.25 \cdot 10^{-210}:\\ \;\;\;\;t_11\\ \mathbf{elif}\;x1 \leq 0.0003:\\ \;\;\;\;x1 + \left(t_8 + t_5\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;t_11\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_2}{x1 - x2 \cdot -6}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (* x1 3.0)))
        (t_1 (* 3.0 t_0))
        (t_2 (* (* x2 x2) 36.0))
        (t_3 (* 3.0 (* x2 -2.0)))
        (t_4 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
        (t_5 (+ x1 t_4))
        (t_6 (* x1 (* x1 x1)))
        (t_7 (+ (* x1 x1) 1.0))
        (t_8 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_7)))
        (t_9 (/ (- (+ t_0 (* 2.0 x2)) x1) t_7))
        (t_10 (- t_9 3.0))
        (t_11
         (+
          x1
          (+
           t_3
           (+
            x1
            (+
             t_6
             (+
              t_1
              (* t_7 (+ (* (* (* x1 2.0) t_9) t_10) (* x1 (* x1 6.0)))))))))))
   (if (<= x1 -3.3e+94)
     (+ x1 (+ t_5 (/ (- t_2 (* (* x1 x1) 9.0)) (- (* x2 -6.0) (* x1 -3.0)))))
     (if (<= x1 -3.2e+21)
       (+
        x1
        (+
         t_3
         (+
          x1
          (+
           t_6
           (+
            t_1
            (*
             t_7
             (+
              (* (* x1 x1) (- (* t_9 4.0) 6.0))
              (* t_10 (* (* x1 2.0) 3.0)))))))))
       (if (<= x1 -2.45e-235)
         (+
          x1
          (+ t_8 (+ x1 (+ t_6 (+ (* t_7 t_4) (* t_0 (- (* 2.0 x2) x1)))))))
         (if (<= x1 1.25e-210)
           t_11
           (if (<= x1 0.0003)
             (+ x1 (+ t_8 t_5))
             (if (<= x1 1.35e+154)
               t_11
               (/ (- (* x1 x1) t_2) (- x1 (* x2 -6.0)))))))))))
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = 3.0 * t_0;
	double t_2 = (x2 * x2) * 36.0;
	double t_3 = 3.0 * (x2 * -2.0);
	double t_4 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	double t_5 = x1 + t_4;
	double t_6 = x1 * (x1 * x1);
	double t_7 = (x1 * x1) + 1.0;
	double t_8 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_7);
	double t_9 = ((t_0 + (2.0 * x2)) - x1) / t_7;
	double t_10 = t_9 - 3.0;
	double t_11 = x1 + (t_3 + (x1 + (t_6 + (t_1 + (t_7 * ((((x1 * 2.0) * t_9) * t_10) + (x1 * (x1 * 6.0))))))));
	double tmp;
	if (x1 <= -3.3e+94) {
		tmp = x1 + (t_5 + ((t_2 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -3.2e+21) {
		tmp = x1 + (t_3 + (x1 + (t_6 + (t_1 + (t_7 * (((x1 * x1) * ((t_9 * 4.0) - 6.0)) + (t_10 * ((x1 * 2.0) * 3.0))))))));
	} else if (x1 <= -2.45e-235) {
		tmp = x1 + (t_8 + (x1 + (t_6 + ((t_7 * t_4) + (t_0 * ((2.0 * x2) - x1))))));
	} else if (x1 <= 1.25e-210) {
		tmp = t_11;
	} else if (x1 <= 0.0003) {
		tmp = x1 + (t_8 + t_5);
	} else if (x1 <= 1.35e+154) {
		tmp = t_11;
	} else {
		tmp = ((x1 * x1) - t_2) / (x1 - (x2 * -6.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_10
    real(8) :: t_11
    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) :: t_8
    real(8) :: t_9
    real(8) :: tmp
    t_0 = x1 * (x1 * 3.0d0)
    t_1 = 3.0d0 * t_0
    t_2 = (x2 * x2) * 36.0d0
    t_3 = 3.0d0 * (x2 * (-2.0d0))
    t_4 = 4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))
    t_5 = x1 + t_4
    t_6 = x1 * (x1 * x1)
    t_7 = (x1 * x1) + 1.0d0
    t_8 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_7)
    t_9 = ((t_0 + (2.0d0 * x2)) - x1) / t_7
    t_10 = t_9 - 3.0d0
    t_11 = x1 + (t_3 + (x1 + (t_6 + (t_1 + (t_7 * ((((x1 * 2.0d0) * t_9) * t_10) + (x1 * (x1 * 6.0d0))))))))
    if (x1 <= (-3.3d+94)) then
        tmp = x1 + (t_5 + ((t_2 - ((x1 * x1) * 9.0d0)) / ((x2 * (-6.0d0)) - (x1 * (-3.0d0)))))
    else if (x1 <= (-3.2d+21)) then
        tmp = x1 + (t_3 + (x1 + (t_6 + (t_1 + (t_7 * (((x1 * x1) * ((t_9 * 4.0d0) - 6.0d0)) + (t_10 * ((x1 * 2.0d0) * 3.0d0))))))))
    else if (x1 <= (-2.45d-235)) then
        tmp = x1 + (t_8 + (x1 + (t_6 + ((t_7 * t_4) + (t_0 * ((2.0d0 * x2) - x1))))))
    else if (x1 <= 1.25d-210) then
        tmp = t_11
    else if (x1 <= 0.0003d0) then
        tmp = x1 + (t_8 + t_5)
    else if (x1 <= 1.35d+154) then
        tmp = t_11
    else
        tmp = ((x1 * x1) - t_2) / (x1 - (x2 * (-6.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 = 3.0 * t_0;
	double t_2 = (x2 * x2) * 36.0;
	double t_3 = 3.0 * (x2 * -2.0);
	double t_4 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	double t_5 = x1 + t_4;
	double t_6 = x1 * (x1 * x1);
	double t_7 = (x1 * x1) + 1.0;
	double t_8 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_7);
	double t_9 = ((t_0 + (2.0 * x2)) - x1) / t_7;
	double t_10 = t_9 - 3.0;
	double t_11 = x1 + (t_3 + (x1 + (t_6 + (t_1 + (t_7 * ((((x1 * 2.0) * t_9) * t_10) + (x1 * (x1 * 6.0))))))));
	double tmp;
	if (x1 <= -3.3e+94) {
		tmp = x1 + (t_5 + ((t_2 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -3.2e+21) {
		tmp = x1 + (t_3 + (x1 + (t_6 + (t_1 + (t_7 * (((x1 * x1) * ((t_9 * 4.0) - 6.0)) + (t_10 * ((x1 * 2.0) * 3.0))))))));
	} else if (x1 <= -2.45e-235) {
		tmp = x1 + (t_8 + (x1 + (t_6 + ((t_7 * t_4) + (t_0 * ((2.0 * x2) - x1))))));
	} else if (x1 <= 1.25e-210) {
		tmp = t_11;
	} else if (x1 <= 0.0003) {
		tmp = x1 + (t_8 + t_5);
	} else if (x1 <= 1.35e+154) {
		tmp = t_11;
	} else {
		tmp = ((x1 * x1) - t_2) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 * (x1 * 3.0)
	t_1 = 3.0 * t_0
	t_2 = (x2 * x2) * 36.0
	t_3 = 3.0 * (x2 * -2.0)
	t_4 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))
	t_5 = x1 + t_4
	t_6 = x1 * (x1 * x1)
	t_7 = (x1 * x1) + 1.0
	t_8 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_7)
	t_9 = ((t_0 + (2.0 * x2)) - x1) / t_7
	t_10 = t_9 - 3.0
	t_11 = x1 + (t_3 + (x1 + (t_6 + (t_1 + (t_7 * ((((x1 * 2.0) * t_9) * t_10) + (x1 * (x1 * 6.0))))))))
	tmp = 0
	if x1 <= -3.3e+94:
		tmp = x1 + (t_5 + ((t_2 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))))
	elif x1 <= -3.2e+21:
		tmp = x1 + (t_3 + (x1 + (t_6 + (t_1 + (t_7 * (((x1 * x1) * ((t_9 * 4.0) - 6.0)) + (t_10 * ((x1 * 2.0) * 3.0))))))))
	elif x1 <= -2.45e-235:
		tmp = x1 + (t_8 + (x1 + (t_6 + ((t_7 * t_4) + (t_0 * ((2.0 * x2) - x1))))))
	elif x1 <= 1.25e-210:
		tmp = t_11
	elif x1 <= 0.0003:
		tmp = x1 + (t_8 + t_5)
	elif x1 <= 1.35e+154:
		tmp = t_11
	else:
		tmp = ((x1 * x1) - t_2) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 * Float64(x1 * 3.0))
	t_1 = Float64(3.0 * t_0)
	t_2 = Float64(Float64(x2 * x2) * 36.0)
	t_3 = Float64(3.0 * Float64(x2 * -2.0))
	t_4 = Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))
	t_5 = Float64(x1 + t_4)
	t_6 = Float64(x1 * Float64(x1 * x1))
	t_7 = Float64(Float64(x1 * x1) + 1.0)
	t_8 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_7))
	t_9 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_7)
	t_10 = Float64(t_9 - 3.0)
	t_11 = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_6 + Float64(t_1 + Float64(t_7 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_9) * t_10) + Float64(x1 * Float64(x1 * 6.0)))))))))
	tmp = 0.0
	if (x1 <= -3.3e+94)
		tmp = Float64(x1 + Float64(t_5 + Float64(Float64(t_2 - Float64(Float64(x1 * x1) * 9.0)) / Float64(Float64(x2 * -6.0) - Float64(x1 * -3.0)))));
	elseif (x1 <= -3.2e+21)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_6 + Float64(t_1 + Float64(t_7 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_9 * 4.0) - 6.0)) + Float64(t_10 * Float64(Float64(x1 * 2.0) * 3.0)))))))));
	elseif (x1 <= -2.45e-235)
		tmp = Float64(x1 + Float64(t_8 + Float64(x1 + Float64(t_6 + Float64(Float64(t_7 * t_4) + Float64(t_0 * Float64(Float64(2.0 * x2) - x1)))))));
	elseif (x1 <= 1.25e-210)
		tmp = t_11;
	elseif (x1 <= 0.0003)
		tmp = Float64(x1 + Float64(t_8 + t_5));
	elseif (x1 <= 1.35e+154)
		tmp = t_11;
	else
		tmp = Float64(Float64(Float64(x1 * x1) - t_2) / Float64(x1 - Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 * (x1 * 3.0);
	t_1 = 3.0 * t_0;
	t_2 = (x2 * x2) * 36.0;
	t_3 = 3.0 * (x2 * -2.0);
	t_4 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	t_5 = x1 + t_4;
	t_6 = x1 * (x1 * x1);
	t_7 = (x1 * x1) + 1.0;
	t_8 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_7);
	t_9 = ((t_0 + (2.0 * x2)) - x1) / t_7;
	t_10 = t_9 - 3.0;
	t_11 = x1 + (t_3 + (x1 + (t_6 + (t_1 + (t_7 * ((((x1 * 2.0) * t_9) * t_10) + (x1 * (x1 * 6.0))))))));
	tmp = 0.0;
	if (x1 <= -3.3e+94)
		tmp = x1 + (t_5 + ((t_2 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	elseif (x1 <= -3.2e+21)
		tmp = x1 + (t_3 + (x1 + (t_6 + (t_1 + (t_7 * (((x1 * x1) * ((t_9 * 4.0) - 6.0)) + (t_10 * ((x1 * 2.0) * 3.0))))))));
	elseif (x1 <= -2.45e-235)
		tmp = x1 + (t_8 + (x1 + (t_6 + ((t_7 * t_4) + (t_0 * ((2.0 * x2) - x1))))));
	elseif (x1 <= 1.25e-210)
		tmp = t_11;
	elseif (x1 <= 0.0003)
		tmp = x1 + (t_8 + t_5);
	elseif (x1 <= 1.35e+154)
		tmp = t_11;
	else
		tmp = ((x1 * x1) - t_2) / (x1 - (x2 * -6.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[(3.0 * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + 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]}, Block[{t$95$8 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$7), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$7), $MachinePrecision]}, Block[{t$95$10 = N[(t$95$9 - 3.0), $MachinePrecision]}, Block[{t$95$11 = N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$6 + N[(t$95$1 + N[(t$95$7 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$9), $MachinePrecision] * t$95$10), $MachinePrecision] + N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.3e+94], N[(x1 + N[(t$95$5 + N[(N[(t$95$2 - N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.2e+21], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$6 + N[(t$95$1 + N[(t$95$7 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$9 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$10 * N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.45e-235], N[(x1 + N[(t$95$8 + N[(x1 + N[(t$95$6 + N[(N[(t$95$7 * t$95$4), $MachinePrecision] + N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.25e-210], t$95$11, If[LessEqual[x1, 0.0003], N[(x1 + N[(t$95$8 + t$95$5), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$11, N[(N[(N[(x1 * x1), $MachinePrecision] - t$95$2), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 3 \cdot t_0\\
t_2 := \left(x2 \cdot x2\right) \cdot 36\\
t_3 := 3 \cdot \left(x2 \cdot -2\right)\\
t_4 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_5 := x1 + t_4\\
t_6 := x1 \cdot \left(x1 \cdot x1\right)\\
t_7 := x1 \cdot x1 + 1\\
t_8 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_7}\\
t_9 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_7}\\
t_10 := t_9 - 3\\
t_11 := x1 + \left(t_3 + \left(x1 + \left(t_6 + \left(t_1 + t_7 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_9\right) \cdot t_10 + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\
\;\;\;\;x1 + \left(t_5 + \frac{t_2 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq -3.2 \cdot 10^{+21}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_6 + \left(t_1 + t_7 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_9 \cdot 4 - 6\right) + t_10 \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right)\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq -2.45 \cdot 10^{-235}:\\
\;\;\;\;x1 + \left(t_8 + \left(x1 + \left(t_6 + \left(t_7 \cdot t_4 + t_0 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.25 \cdot 10^{-210}:\\
\;\;\;\;t_11\\

\mathbf{elif}\;x1 \leq 0.0003:\\
\;\;\;\;x1 + \left(t_8 + t_5\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_11\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_2}{x1 - x2 \cdot -6}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x1 < -3.3e94

    1. Initial program 4.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. Taylor expanded in x1 around 0 2.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr41.5%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr41.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval41.5%

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

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

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

    if -3.3e94 < x1 < -3.2e21

    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. Taylor expanded in x1 around 0 99.4%

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

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

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

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

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

    if -3.2e21 < x1 < -2.44999999999999983e-235

    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. Taylor expanded in x1 around 0 91.9%

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

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

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

    if -2.44999999999999983e-235 < x1 < 1.2500000000000001e-210 or 2.99999999999999974e-4 < x1 < 1.35000000000000003e154

    1. Initial program 97.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. Taylor expanded in x1 around 0 93.3%

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

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

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

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \color{blue}{3}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    6. Taylor expanded in x1 around inf 92.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) + \color{blue}{6 \cdot {x1}^{2}}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    7. Step-by-step derivation
      1. unpow292.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) + 6 \cdot \color{blue}{\left(x1 \cdot x1\right)}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. associate-*r*92.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) + \color{blue}{\left(6 \cdot x1\right) \cdot x1}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    8. Simplified92.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) + \color{blue}{\left(6 \cdot x1\right) \cdot x1}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]

    if 1.2500000000000001e-210 < x1 < 2.99999999999999974e-4

    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. Taylor expanded in x1 around 0 95.4%

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -3.2 \cdot 10^{+21}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4 - 6\right) + \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -2.45 \cdot 10^{-235}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.25 \cdot 10^{-210}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 0.0003:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 12: 67.7% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\ t_2 := x1 \cdot x1 + 1\\ t_3 := t_2 \cdot t_1\\ t_4 := x1 \cdot \left(x1 \cdot x1\right)\\ t_5 := \left(x2 \cdot x2\right) \cdot 36\\ t_6 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\ \mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\ \;\;\;\;x1 + \left(\left(x1 + t_1\right) + \frac{t_5 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -2.1 \cdot 10^{-93}:\\ \;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_4 + \left(t_3 + t_0 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(t_6 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_4 + \left(t_0 \cdot \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2} + t_3\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_5}{x1 - x2 \cdot -6}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (* x1 3.0)))
        (t_1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
        (t_2 (+ (* x1 x1) 1.0))
        (t_3 (* t_2 t_1))
        (t_4 (* x1 (* x1 x1)))
        (t_5 (* (* x2 x2) 36.0))
        (t_6 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))
   (if (<= x1 -3.3e+94)
     (+
      x1
      (+ (+ x1 t_1) (/ (- t_5 (* (* x1 x1) 9.0)) (- (* x2 -6.0) (* x1 -3.0)))))
     (if (<= x1 -2.1e-93)
       (+ x1 (+ t_6 (+ x1 (+ t_4 (+ t_3 (* t_0 (- (* 2.0 x2) x1)))))))
       (if (<= x1 8.2e-247)
         (+ x1 (+ t_6 (+ x1 (* 4.0 (* -3.0 (* x1 x2))))))
         (if (<= x1 1.35e+154)
           (+
            x1
            (+
             t_6
             (+ x1 (+ t_4 (+ (* t_0 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2)) t_3)))))
           (/ (- (* x1 x1) t_5) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = t_2 * t_1;
	double t_4 = x1 * (x1 * x1);
	double t_5 = (x2 * x2) * 36.0;
	double t_6 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
	double tmp;
	if (x1 <= -3.3e+94) {
		tmp = x1 + ((x1 + t_1) + ((t_5 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -2.1e-93) {
		tmp = x1 + (t_6 + (x1 + (t_4 + (t_3 + (t_0 * ((2.0 * x2) - x1))))));
	} else if (x1 <= 8.2e-247) {
		tmp = x1 + (t_6 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_6 + (x1 + (t_4 + ((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_2)) + t_3))));
	} else {
		tmp = ((x1 * x1) - t_5) / (x1 - (x2 * -6.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 = 4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))
    t_2 = (x1 * x1) + 1.0d0
    t_3 = t_2 * t_1
    t_4 = x1 * (x1 * x1)
    t_5 = (x2 * x2) * 36.0d0
    t_6 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)
    if (x1 <= (-3.3d+94)) then
        tmp = x1 + ((x1 + t_1) + ((t_5 - ((x1 * x1) * 9.0d0)) / ((x2 * (-6.0d0)) - (x1 * (-3.0d0)))))
    else if (x1 <= (-2.1d-93)) then
        tmp = x1 + (t_6 + (x1 + (t_4 + (t_3 + (t_0 * ((2.0d0 * x2) - x1))))))
    else if (x1 <= 8.2d-247) then
        tmp = x1 + (t_6 + (x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))))
    else if (x1 <= 1.35d+154) then
        tmp = x1 + (t_6 + (x1 + (t_4 + ((t_0 * (((t_0 + (2.0d0 * x2)) - x1) / t_2)) + t_3))))
    else
        tmp = ((x1 * x1) - t_5) / (x1 - (x2 * (-6.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 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = t_2 * t_1;
	double t_4 = x1 * (x1 * x1);
	double t_5 = (x2 * x2) * 36.0;
	double t_6 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
	double tmp;
	if (x1 <= -3.3e+94) {
		tmp = x1 + ((x1 + t_1) + ((t_5 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -2.1e-93) {
		tmp = x1 + (t_6 + (x1 + (t_4 + (t_3 + (t_0 * ((2.0 * x2) - x1))))));
	} else if (x1 <= 8.2e-247) {
		tmp = x1 + (t_6 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_6 + (x1 + (t_4 + ((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_2)) + t_3))));
	} else {
		tmp = ((x1 * x1) - t_5) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 * (x1 * 3.0)
	t_1 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))
	t_2 = (x1 * x1) + 1.0
	t_3 = t_2 * t_1
	t_4 = x1 * (x1 * x1)
	t_5 = (x2 * x2) * 36.0
	t_6 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)
	tmp = 0
	if x1 <= -3.3e+94:
		tmp = x1 + ((x1 + t_1) + ((t_5 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))))
	elif x1 <= -2.1e-93:
		tmp = x1 + (t_6 + (x1 + (t_4 + (t_3 + (t_0 * ((2.0 * x2) - x1))))))
	elif x1 <= 8.2e-247:
		tmp = x1 + (t_6 + (x1 + (4.0 * (-3.0 * (x1 * x2)))))
	elif x1 <= 1.35e+154:
		tmp = x1 + (t_6 + (x1 + (t_4 + ((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_2)) + t_3))))
	else:
		tmp = ((x1 * x1) - t_5) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 * Float64(x1 * 3.0))
	t_1 = Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))
	t_2 = Float64(Float64(x1 * x1) + 1.0)
	t_3 = Float64(t_2 * t_1)
	t_4 = Float64(x1 * Float64(x1 * x1))
	t_5 = Float64(Float64(x2 * x2) * 36.0)
	t_6 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2))
	tmp = 0.0
	if (x1 <= -3.3e+94)
		tmp = Float64(x1 + Float64(Float64(x1 + t_1) + Float64(Float64(t_5 - Float64(Float64(x1 * x1) * 9.0)) / Float64(Float64(x2 * -6.0) - Float64(x1 * -3.0)))));
	elseif (x1 <= -2.1e-93)
		tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_4 + Float64(t_3 + Float64(t_0 * Float64(Float64(2.0 * x2) - x1)))))));
	elseif (x1 <= 8.2e-247)
		tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2))))));
	elseif (x1 <= 1.35e+154)
		tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_4 + Float64(Float64(t_0 * Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2)) + t_3)))));
	else
		tmp = Float64(Float64(Float64(x1 * x1) - t_5) / Float64(x1 - Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 * (x1 * 3.0);
	t_1 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	t_2 = (x1 * x1) + 1.0;
	t_3 = t_2 * t_1;
	t_4 = x1 * (x1 * x1);
	t_5 = (x2 * x2) * 36.0;
	t_6 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
	tmp = 0.0;
	if (x1 <= -3.3e+94)
		tmp = x1 + ((x1 + t_1) + ((t_5 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	elseif (x1 <= -2.1e-93)
		tmp = x1 + (t_6 + (x1 + (t_4 + (t_3 + (t_0 * ((2.0 * x2) - x1))))));
	elseif (x1 <= 8.2e-247)
		tmp = x1 + (t_6 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	elseif (x1 <= 1.35e+154)
		tmp = x1 + (t_6 + (x1 + (t_4 + ((t_0 * (((t_0 + (2.0 * x2)) - x1) / t_2)) + t_3))));
	else
		tmp = ((x1 * x1) - t_5) / (x1 - (x2 * -6.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[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.3e+94], N[(x1 + N[(N[(x1 + t$95$1), $MachinePrecision] + N[(N[(t$95$5 - N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.1e-93], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$4 + N[(t$95$3 + N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.2e-247], N[(x1 + N[(t$95$6 + N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$4 + N[(N[(t$95$0 * N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - t$95$5), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := t_2 \cdot t_1\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := \left(x2 \cdot x2\right) \cdot 36\\
t_6 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\
\;\;\;\;x1 + \left(\left(x1 + t_1\right) + \frac{t_5 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq -2.1 \cdot 10^{-93}:\\
\;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_4 + \left(t_3 + t_0 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\
\;\;\;\;x1 + \left(t_6 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_4 + \left(t_0 \cdot \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2} + t_3\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_5}{x1 - x2 \cdot -6}\\


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

    1. Initial program 4.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. Taylor expanded in x1 around 0 2.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr41.5%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr41.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval41.5%

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

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

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

    if -3.3e94 < x1 < -2.1000000000000001e-93

    1. Initial program 99.2%

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

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

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

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

    if -2.1000000000000001e-93 < x1 < 8.1999999999999997e-247

    1. Initial program 99.6%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(-3 \cdot \left(x1 \cdot x2\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Step-by-step derivation
      1. *-commutative96.2%

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

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

    if 8.1999999999999997e-247 < x1 < 1.35000000000000003e154

    1. Initial program 97.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. Taylor expanded in x1 around 0 81.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 \color{blue}{\left(\left(-1 \cdot x1 + 2 \cdot x2\right) - 3\right)} + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Taylor expanded in x1 around 0 82.2%

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -2.1 \cdot 10^{-93}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{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}{x1 \cdot x1 + 1} + \left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 13: 67.6% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x1 \cdot x1\right) \cdot 9\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\ t_3 := x1 \cdot x1 + 1\\ t_4 := t_3 \cdot t_2\\ t_5 := x1 \cdot \left(x1 \cdot x1\right)\\ t_6 := \left(x2 \cdot x2\right) \cdot 36\\ t_7 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_3}\\ \mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\ \;\;\;\;x1 + \left(\left(x1 + t_2\right) + \frac{t_6 - t_0}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -2.1 \cdot 10^{-93}:\\ \;\;\;\;x1 + \left(t_7 + \left(x1 + \left(t_5 + \left(t_4 + t_1 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 8 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(t_7 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(t_7 + \left(x1 + \left(t_5 + \left(t_0 + t_4\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_6}{x1 - x2 \cdot -6}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* (* x1 x1) 9.0))
        (t_1 (* x1 (* x1 3.0)))
        (t_2 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
        (t_3 (+ (* x1 x1) 1.0))
        (t_4 (* t_3 t_2))
        (t_5 (* x1 (* x1 x1)))
        (t_6 (* (* x2 x2) 36.0))
        (t_7 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_3))))
   (if (<= x1 -3.3e+94)
     (+ x1 (+ (+ x1 t_2) (/ (- t_6 t_0) (- (* x2 -6.0) (* x1 -3.0)))))
     (if (<= x1 -2.1e-93)
       (+ x1 (+ t_7 (+ x1 (+ t_5 (+ t_4 (* t_1 (- (* 2.0 x2) x1)))))))
       (if (<= x1 8e-247)
         (+ x1 (+ t_7 (+ x1 (* 4.0 (* -3.0 (* x1 x2))))))
         (if (<= x1 1.35e+154)
           (+ x1 (+ t_7 (+ x1 (+ t_5 (+ t_0 t_4)))))
           (/ (- (* x1 x1) t_6) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
	double t_0 = (x1 * x1) * 9.0;
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	double t_3 = (x1 * x1) + 1.0;
	double t_4 = t_3 * t_2;
	double t_5 = x1 * (x1 * x1);
	double t_6 = (x2 * x2) * 36.0;
	double t_7 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3);
	double tmp;
	if (x1 <= -3.3e+94) {
		tmp = x1 + ((x1 + t_2) + ((t_6 - t_0) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -2.1e-93) {
		tmp = x1 + (t_7 + (x1 + (t_5 + (t_4 + (t_1 * ((2.0 * x2) - x1))))));
	} else if (x1 <= 8e-247) {
		tmp = x1 + (t_7 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_7 + (x1 + (t_5 + (t_0 + t_4))));
	} else {
		tmp = ((x1 * x1) - t_6) / (x1 - (x2 * -6.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 = (x1 * x1) * 9.0d0
    t_1 = x1 * (x1 * 3.0d0)
    t_2 = 4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))
    t_3 = (x1 * x1) + 1.0d0
    t_4 = t_3 * t_2
    t_5 = x1 * (x1 * x1)
    t_6 = (x2 * x2) * 36.0d0
    t_7 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_3)
    if (x1 <= (-3.3d+94)) then
        tmp = x1 + ((x1 + t_2) + ((t_6 - t_0) / ((x2 * (-6.0d0)) - (x1 * (-3.0d0)))))
    else if (x1 <= (-2.1d-93)) then
        tmp = x1 + (t_7 + (x1 + (t_5 + (t_4 + (t_1 * ((2.0d0 * x2) - x1))))))
    else if (x1 <= 8d-247) then
        tmp = x1 + (t_7 + (x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))))
    else if (x1 <= 1.35d+154) then
        tmp = x1 + (t_7 + (x1 + (t_5 + (t_0 + t_4))))
    else
        tmp = ((x1 * x1) - t_6) / (x1 - (x2 * (-6.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = (x1 * x1) * 9.0;
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	double t_3 = (x1 * x1) + 1.0;
	double t_4 = t_3 * t_2;
	double t_5 = x1 * (x1 * x1);
	double t_6 = (x2 * x2) * 36.0;
	double t_7 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3);
	double tmp;
	if (x1 <= -3.3e+94) {
		tmp = x1 + ((x1 + t_2) + ((t_6 - t_0) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -2.1e-93) {
		tmp = x1 + (t_7 + (x1 + (t_5 + (t_4 + (t_1 * ((2.0 * x2) - x1))))));
	} else if (x1 <= 8e-247) {
		tmp = x1 + (t_7 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_7 + (x1 + (t_5 + (t_0 + t_4))));
	} else {
		tmp = ((x1 * x1) - t_6) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x1 * x1) * 9.0
	t_1 = x1 * (x1 * 3.0)
	t_2 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))
	t_3 = (x1 * x1) + 1.0
	t_4 = t_3 * t_2
	t_5 = x1 * (x1 * x1)
	t_6 = (x2 * x2) * 36.0
	t_7 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)
	tmp = 0
	if x1 <= -3.3e+94:
		tmp = x1 + ((x1 + t_2) + ((t_6 - t_0) / ((x2 * -6.0) - (x1 * -3.0))))
	elif x1 <= -2.1e-93:
		tmp = x1 + (t_7 + (x1 + (t_5 + (t_4 + (t_1 * ((2.0 * x2) - x1))))))
	elif x1 <= 8e-247:
		tmp = x1 + (t_7 + (x1 + (4.0 * (-3.0 * (x1 * x2)))))
	elif x1 <= 1.35e+154:
		tmp = x1 + (t_7 + (x1 + (t_5 + (t_0 + t_4))))
	else:
		tmp = ((x1 * x1) - t_6) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x1 * x1) * 9.0)
	t_1 = Float64(x1 * Float64(x1 * 3.0))
	t_2 = Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))
	t_3 = Float64(Float64(x1 * x1) + 1.0)
	t_4 = Float64(t_3 * t_2)
	t_5 = Float64(x1 * Float64(x1 * x1))
	t_6 = Float64(Float64(x2 * x2) * 36.0)
	t_7 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_3))
	tmp = 0.0
	if (x1 <= -3.3e+94)
		tmp = Float64(x1 + Float64(Float64(x1 + t_2) + Float64(Float64(t_6 - t_0) / Float64(Float64(x2 * -6.0) - Float64(x1 * -3.0)))));
	elseif (x1 <= -2.1e-93)
		tmp = Float64(x1 + Float64(t_7 + Float64(x1 + Float64(t_5 + Float64(t_4 + Float64(t_1 * Float64(Float64(2.0 * x2) - x1)))))));
	elseif (x1 <= 8e-247)
		tmp = Float64(x1 + Float64(t_7 + Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2))))));
	elseif (x1 <= 1.35e+154)
		tmp = Float64(x1 + Float64(t_7 + Float64(x1 + Float64(t_5 + Float64(t_0 + t_4)))));
	else
		tmp = Float64(Float64(Float64(x1 * x1) - t_6) / Float64(x1 - Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (x1 * x1) * 9.0;
	t_1 = x1 * (x1 * 3.0);
	t_2 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
	t_3 = (x1 * x1) + 1.0;
	t_4 = t_3 * t_2;
	t_5 = x1 * (x1 * x1);
	t_6 = (x2 * x2) * 36.0;
	t_7 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3);
	tmp = 0.0;
	if (x1 <= -3.3e+94)
		tmp = x1 + ((x1 + t_2) + ((t_6 - t_0) / ((x2 * -6.0) - (x1 * -3.0))));
	elseif (x1 <= -2.1e-93)
		tmp = x1 + (t_7 + (x1 + (t_5 + (t_4 + (t_1 * ((2.0 * x2) - x1))))));
	elseif (x1 <= 8e-247)
		tmp = x1 + (t_7 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	elseif (x1 <= 1.35e+154)
		tmp = x1 + (t_7 + (x1 + (t_5 + (t_0 + t_4))));
	else
		tmp = ((x1 * x1) - t_6) / (x1 - (x2 * -6.0));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.3e+94], N[(x1 + N[(N[(x1 + t$95$2), $MachinePrecision] + N[(N[(t$95$6 - t$95$0), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.1e-93], N[(x1 + N[(t$95$7 + N[(x1 + N[(t$95$5 + N[(t$95$4 + N[(t$95$1 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8e-247], N[(x1 + N[(t$95$7 + N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$7 + N[(x1 + N[(t$95$5 + N[(t$95$0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - t$95$6), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot 9\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := t_3 \cdot t_2\\
t_5 := x1 \cdot \left(x1 \cdot x1\right)\\
t_6 := \left(x2 \cdot x2\right) \cdot 36\\
t_7 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_3}\\
\mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\
\;\;\;\;x1 + \left(\left(x1 + t_2\right) + \frac{t_6 - t_0}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq -2.1 \cdot 10^{-93}:\\
\;\;\;\;x1 + \left(t_7 + \left(x1 + \left(t_5 + \left(t_4 + t_1 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 8 \cdot 10^{-247}:\\
\;\;\;\;x1 + \left(t_7 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_7 + \left(x1 + \left(t_5 + \left(t_0 + t_4\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_6}{x1 - x2 \cdot -6}\\


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

    1. Initial program 4.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. Taylor expanded in x1 around 0 2.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr41.5%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr41.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval41.5%

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

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

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

    if -3.3e94 < x1 < -2.1000000000000001e-93

    1. Initial program 99.2%

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

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

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

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

    if -2.1000000000000001e-93 < x1 < 8.0000000000000002e-247

    1. Initial program 99.6%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(-3 \cdot \left(x1 \cdot x2\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Step-by-step derivation
      1. *-commutative96.2%

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

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

    if 8.0000000000000002e-247 < x1 < 1.35000000000000003e154

    1. Initial program 97.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. Taylor expanded in x1 around 0 81.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 \color{blue}{\left(\left(-1 \cdot x1 + 2 \cdot x2\right) - 3\right)} + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Taylor expanded in x1 around 0 82.2%

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

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

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

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

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.3 \cdot 10^{+94}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -2.1 \cdot 10^{-93}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 8 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1\right) \cdot 9 + \left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 14: 69.4% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := \left(x2 \cdot x2\right) \cdot 36\\ t_2 := \left(x1 \cdot x1\right) \cdot 9\\ t_3 := x2 \cdot \left(2 \cdot x2 - 3\right)\\ t_4 := 4 \cdot \left(x1 \cdot t_3\right)\\ t_5 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(\left(x1 + t_4\right) + \frac{t_1 - t_2}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -2.1 \cdot 10^{-226}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_3 - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 6 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(t_5 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(t_5 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_2 + t_0 \cdot t_4\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_1}{x1 - x2 \cdot -6}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (+ (* x1 x1) 1.0))
        (t_1 (* (* x2 x2) 36.0))
        (t_2 (* (* x1 x1) 9.0))
        (t_3 (* x2 (- (* 2.0 x2) 3.0)))
        (t_4 (* 4.0 (* x1 t_3)))
        (t_5 (* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) t_0))))
   (if (<= x1 -3.8e+154)
     (+ x1 (+ (+ x1 t_4) (/ (- t_1 t_2) (- (* x2 -6.0) (* x1 -3.0)))))
     (if (<= x1 -2.1e-226)
       (+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 t_3) 2.0))))
       (if (<= x1 6e-247)
         (+ x1 (+ t_5 (+ x1 (* 4.0 (* -3.0 (* x1 x2))))))
         (if (<= x1 1.35e+154)
           (+ x1 (+ t_5 (+ x1 (+ (* x1 (* x1 x1)) (+ t_2 (* t_0 t_4))))))
           (/ (- (* x1 x1) t_1) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
	double t_0 = (x1 * x1) + 1.0;
	double t_1 = (x2 * x2) * 36.0;
	double t_2 = (x1 * x1) * 9.0;
	double t_3 = x2 * ((2.0 * x2) - 3.0);
	double t_4 = 4.0 * (x1 * t_3);
	double t_5 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / t_0);
	double tmp;
	if (x1 <= -3.8e+154) {
		tmp = x1 + ((x1 + t_4) + ((t_1 - t_2) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -2.1e-226) {
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_3) - 2.0)));
	} else if (x1 <= 6e-247) {
		tmp = x1 + (t_5 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_5 + (x1 + ((x1 * (x1 * x1)) + (t_2 + (t_0 * t_4)))));
	} else {
		tmp = ((x1 * x1) - t_1) / (x1 - (x2 * -6.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) + 1.0d0
    t_1 = (x2 * x2) * 36.0d0
    t_2 = (x1 * x1) * 9.0d0
    t_3 = x2 * ((2.0d0 * x2) - 3.0d0)
    t_4 = 4.0d0 * (x1 * t_3)
    t_5 = 3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / t_0)
    if (x1 <= (-3.8d+154)) then
        tmp = x1 + ((x1 + t_4) + ((t_1 - t_2) / ((x2 * (-6.0d0)) - (x1 * (-3.0d0)))))
    else if (x1 <= (-2.1d-226)) then
        tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * t_3) - 2.0d0)))
    else if (x1 <= 6d-247) then
        tmp = x1 + (t_5 + (x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))))
    else if (x1 <= 1.35d+154) then
        tmp = x1 + (t_5 + (x1 + ((x1 * (x1 * x1)) + (t_2 + (t_0 * t_4)))))
    else
        tmp = ((x1 * x1) - t_1) / (x1 - (x2 * (-6.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 = (x2 * x2) * 36.0;
	double t_2 = (x1 * x1) * 9.0;
	double t_3 = x2 * ((2.0 * x2) - 3.0);
	double t_4 = 4.0 * (x1 * t_3);
	double t_5 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / t_0);
	double tmp;
	if (x1 <= -3.8e+154) {
		tmp = x1 + ((x1 + t_4) + ((t_1 - t_2) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -2.1e-226) {
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_3) - 2.0)));
	} else if (x1 <= 6e-247) {
		tmp = x1 + (t_5 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_5 + (x1 + ((x1 * (x1 * x1)) + (t_2 + (t_0 * t_4)))));
	} else {
		tmp = ((x1 * x1) - t_1) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x1 * x1) + 1.0
	t_1 = (x2 * x2) * 36.0
	t_2 = (x1 * x1) * 9.0
	t_3 = x2 * ((2.0 * x2) - 3.0)
	t_4 = 4.0 * (x1 * t_3)
	t_5 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / t_0)
	tmp = 0
	if x1 <= -3.8e+154:
		tmp = x1 + ((x1 + t_4) + ((t_1 - t_2) / ((x2 * -6.0) - (x1 * -3.0))))
	elif x1 <= -2.1e-226:
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_3) - 2.0)))
	elif x1 <= 6e-247:
		tmp = x1 + (t_5 + (x1 + (4.0 * (-3.0 * (x1 * x2)))))
	elif x1 <= 1.35e+154:
		tmp = x1 + (t_5 + (x1 + ((x1 * (x1 * x1)) + (t_2 + (t_0 * t_4)))))
	else:
		tmp = ((x1 * x1) - t_1) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x1 * x1) + 1.0)
	t_1 = Float64(Float64(x2 * x2) * 36.0)
	t_2 = Float64(Float64(x1 * x1) * 9.0)
	t_3 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))
	t_4 = Float64(4.0 * Float64(x1 * t_3))
	t_5 = Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / t_0))
	tmp = 0.0
	if (x1 <= -3.8e+154)
		tmp = Float64(x1 + Float64(Float64(x1 + t_4) + Float64(Float64(t_1 - t_2) / Float64(Float64(x2 * -6.0) - Float64(x1 * -3.0)))));
	elseif (x1 <= -2.1e-226)
		tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * t_3) - 2.0))));
	elseif (x1 <= 6e-247)
		tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2))))));
	elseif (x1 <= 1.35e+154)
		tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(t_2 + Float64(t_0 * t_4))))));
	else
		tmp = Float64(Float64(Float64(x1 * x1) - t_1) / Float64(x1 - Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (x1 * x1) + 1.0;
	t_1 = (x2 * x2) * 36.0;
	t_2 = (x1 * x1) * 9.0;
	t_3 = x2 * ((2.0 * x2) - 3.0);
	t_4 = 4.0 * (x1 * t_3);
	t_5 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / t_0);
	tmp = 0.0;
	if (x1 <= -3.8e+154)
		tmp = x1 + ((x1 + t_4) + ((t_1 - t_2) / ((x2 * -6.0) - (x1 * -3.0))));
	elseif (x1 <= -2.1e-226)
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_3) - 2.0)));
	elseif (x1 <= 6e-247)
		tmp = x1 + (t_5 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	elseif (x1 <= 1.35e+154)
		tmp = x1 + (t_5 + (x1 + ((x1 * (x1 * x1)) + (t_2 + (t_0 * t_4)))));
	else
		tmp = ((x1 * x1) - t_1) / (x1 - (x2 * -6.0));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$3 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(4.0 * N[(x1 * t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.8e+154], N[(x1 + N[(N[(x1 + t$95$4), $MachinePrecision] + N[(N[(t$95$1 - t$95$2), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.1e-226], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * t$95$3), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6e-247], N[(x1 + N[(t$95$5 + N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$5 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 + N[(t$95$0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - t$95$1), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \left(x2 \cdot x2\right) \cdot 36\\
t_2 := \left(x1 \cdot x1\right) \cdot 9\\
t_3 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_4 := 4 \cdot \left(x1 \cdot t_3\right)\\
t_5 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -3.8 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + t_4\right) + \frac{t_1 - t_2}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq -2.1 \cdot 10^{-226}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_3 - 2\right)\right)\\

\mathbf{elif}\;x1 \leq 6 \cdot 10^{-247}:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_2 + t_0 \cdot t_4\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_1}{x1 - x2 \cdot -6}\\


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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr50.0%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr50.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval50.0%

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

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

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

    if -3.7999999999999998e154 < x1 < -2.1000000000000002e-226

    1. Initial program 88.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. Taylor expanded in x1 around 0 59.2%

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

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

    if -2.1000000000000002e-226 < x1 < 5.9999999999999995e-247

    1. Initial program 99.7%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(-3 \cdot \left(x1 \cdot x2\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Step-by-step derivation
      1. *-commutative96.3%

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

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

    if 5.9999999999999995e-247 < x1 < 1.35000000000000003e154

    1. Initial program 97.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. Taylor expanded in x1 around 0 81.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 \color{blue}{\left(\left(-1 \cdot x1 + 2 \cdot x2\right) - 3\right)} + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Taylor expanded in x1 around 0 82.2%

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

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

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

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

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -2.1 \cdot 10^{-226}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 6 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1\right) \cdot 9 + \left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 15: 69.6% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x2 \cdot x2\right) \cdot 36\\ t_1 := x2 \cdot \left(2 \cdot x2 - 3\right)\\ t_2 := 4 \cdot \left(x1 \cdot t_1\right)\\ t_3 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\\ \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(\left(x1 + t_2\right) + \frac{t_0 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -4.5 \cdot 10^{-230}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_1 - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + t_2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_0}{x1 - x2 \cdot -6}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* (* x2 x2) 36.0))
        (t_1 (* x2 (- (* 2.0 x2) 3.0)))
        (t_2 (* 4.0 (* x1 t_1)))
        (t_3
         (*
          3.0
          (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))))
   (if (<= x1 -3.8e+154)
     (+
      x1
      (+ (+ x1 t_2) (/ (- t_0 (* (* x1 x1) 9.0)) (- (* x2 -6.0) (* x1 -3.0)))))
     (if (<= x1 -4.5e-230)
       (+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 t_1) 2.0))))
       (if (<= x1 8.2e-247)
         (+ x1 (+ t_3 (+ x1 (* 4.0 (* -3.0 (* x1 x2))))))
         (if (<= x1 1.35e+154)
           (+ x1 (+ t_3 (+ x1 (+ (* x1 (* x1 x1)) t_2))))
           (/ (- (* x1 x1) t_0) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
	double t_0 = (x2 * x2) * 36.0;
	double t_1 = x2 * ((2.0 * x2) - 3.0);
	double t_2 = 4.0 * (x1 * t_1);
	double t_3 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0));
	double tmp;
	if (x1 <= -3.8e+154) {
		tmp = x1 + ((x1 + t_2) + ((t_0 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -4.5e-230) {
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0)));
	} else if (x1 <= 8.2e-247) {
		tmp = x1 + (t_3 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + t_2)));
	} else {
		tmp = ((x1 * x1) - t_0) / (x1 - (x2 * -6.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 = (x2 * x2) * 36.0d0
    t_1 = x2 * ((2.0d0 * x2) - 3.0d0)
    t_2 = 4.0d0 * (x1 * t_1)
    t_3 = 3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))
    if (x1 <= (-3.8d+154)) then
        tmp = x1 + ((x1 + t_2) + ((t_0 - ((x1 * x1) * 9.0d0)) / ((x2 * (-6.0d0)) - (x1 * (-3.0d0)))))
    else if (x1 <= (-4.5d-230)) then
        tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * t_1) - 2.0d0)))
    else if (x1 <= 8.2d-247) then
        tmp = x1 + (t_3 + (x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))))
    else if (x1 <= 1.35d+154) then
        tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + t_2)))
    else
        tmp = ((x1 * x1) - t_0) / (x1 - (x2 * (-6.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = (x2 * x2) * 36.0;
	double t_1 = x2 * ((2.0 * x2) - 3.0);
	double t_2 = 4.0 * (x1 * t_1);
	double t_3 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0));
	double tmp;
	if (x1 <= -3.8e+154) {
		tmp = x1 + ((x1 + t_2) + ((t_0 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	} else if (x1 <= -4.5e-230) {
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0)));
	} else if (x1 <= 8.2e-247) {
		tmp = x1 + (t_3 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + t_2)));
	} else {
		tmp = ((x1 * x1) - t_0) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x2 * x2) * 36.0
	t_1 = x2 * ((2.0 * x2) - 3.0)
	t_2 = 4.0 * (x1 * t_1)
	t_3 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))
	tmp = 0
	if x1 <= -3.8e+154:
		tmp = x1 + ((x1 + t_2) + ((t_0 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))))
	elif x1 <= -4.5e-230:
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0)))
	elif x1 <= 8.2e-247:
		tmp = x1 + (t_3 + (x1 + (4.0 * (-3.0 * (x1 * x2)))))
	elif x1 <= 1.35e+154:
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + t_2)))
	else:
		tmp = ((x1 * x1) - t_0) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x2 * x2) * 36.0)
	t_1 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))
	t_2 = Float64(4.0 * Float64(x1 * t_1))
	t_3 = Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0)))
	tmp = 0.0
	if (x1 <= -3.8e+154)
		tmp = Float64(x1 + Float64(Float64(x1 + t_2) + Float64(Float64(t_0 - Float64(Float64(x1 * x1) * 9.0)) / Float64(Float64(x2 * -6.0) - Float64(x1 * -3.0)))));
	elseif (x1 <= -4.5e-230)
		tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * t_1) - 2.0))));
	elseif (x1 <= 8.2e-247)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2))))));
	elseif (x1 <= 1.35e+154)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + t_2))));
	else
		tmp = Float64(Float64(Float64(x1 * x1) - t_0) / Float64(x1 - Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (x2 * x2) * 36.0;
	t_1 = x2 * ((2.0 * x2) - 3.0);
	t_2 = 4.0 * (x1 * t_1);
	t_3 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0));
	tmp = 0.0;
	if (x1 <= -3.8e+154)
		tmp = x1 + ((x1 + t_2) + ((t_0 - ((x1 * x1) * 9.0)) / ((x2 * -6.0) - (x1 * -3.0))));
	elseif (x1 <= -4.5e-230)
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0)));
	elseif (x1 <= 8.2e-247)
		tmp = x1 + (t_3 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	elseif (x1 <= 1.35e+154)
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + t_2)));
	else
		tmp = ((x1 * x1) - t_0) / (x1 - (x2 * -6.0));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.8e+154], N[(x1 + N[(N[(x1 + t$95$2), $MachinePrecision] + N[(N[(t$95$0 - N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.5e-230], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * t$95$1), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.2e-247], N[(x1 + N[(t$95$3 + N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - t$95$0), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x2 \cdot x2\right) \cdot 36\\
t_1 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_2 := 4 \cdot \left(x1 \cdot t_1\right)\\
t_3 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\\
\mathbf{if}\;x1 \leq -3.8 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + t_2\right) + \frac{t_0 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq -4.5 \cdot 10^{-230}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_1 - 2\right)\right)\\

\mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + t_2\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_0}{x1 - x2 \cdot -6}\\


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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr50.0%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr50.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval50.0%

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

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

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

    if -3.7999999999999998e154 < x1 < -4.50000000000000004e-230

    1. Initial program 88.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. Taylor expanded in x1 around 0 59.2%

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

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

    if -4.50000000000000004e-230 < x1 < 8.1999999999999997e-247

    1. Initial program 99.7%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(-3 \cdot \left(x1 \cdot x2\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Step-by-step derivation
      1. *-commutative96.3%

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

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

    if 8.1999999999999997e-247 < x1 < 1.35000000000000003e154

    1. Initial program 97.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. Taylor expanded in x1 around 0 81.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 \color{blue}{\left(\left(-1 \cdot x1 + 2 \cdot x2\right) - 3\right)} + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Taylor expanded in x1 around 0 82.2%

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

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -4.5 \cdot 10^{-230}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 16: 63.3% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
t_0 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\\
t_1 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
\mathbf{if}\;x1 \leq -4.6 \cdot 10^{+101}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\

\mathbf{elif}\;x1 \leq -5.4 \cdot 10^{-226}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_1 - 2\right)\right)\\

\mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + 4 \cdot \left(x1 \cdot t_1\right)\right)\right)\\

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


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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

    if -4.6000000000000003e101 < x1 < -5.40000000000000029e-226

    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. Taylor expanded in x1 around 0 66.8%

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

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

    if -5.40000000000000029e-226 < x1 < 8.1999999999999997e-247

    1. Initial program 99.7%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(-3 \cdot \left(x1 \cdot x2\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Step-by-step derivation
      1. *-commutative96.3%

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

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

    if 8.1999999999999997e-247 < x1 < 1.35000000000000003e154

    1. Initial program 97.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. Taylor expanded in x1 around 0 65.1%

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -4.6 \cdot 10^{+101}:\\ \;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -5.4 \cdot 10^{-226}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 17: 67.1% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
t_0 := \left(x2 \cdot x2\right) \cdot 36\\
t_1 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_2 := x1 + 4 \cdot \left(x1 \cdot t_1\right)\\
t_3 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\\
\mathbf{if}\;x1 \leq -3.8 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_2 + \frac{t_0 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\

\mathbf{elif}\;x1 \leq -3 \cdot 10^{-227}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_1 - 2\right)\right)\\

\mathbf{elif}\;x1 \leq 1.05 \cdot 10^{-248}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_3 + t_2\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - t_0}{x1 - x2 \cdot -6}\\


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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\frac{\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right) - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}}\right) \]
    6. Step-by-step derivation
      1. swap-sqr50.0%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot \color{blue}{36} - \left(x1 \cdot -3\right) \cdot \left(x1 \cdot -3\right)}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      3. swap-sqr50.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \color{blue}{\left(x1 \cdot x1\right) \cdot \left(-3 \cdot -3\right)}}{x2 \cdot -6 - x1 \cdot -3}\right) \]
      4. metadata-eval50.0%

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

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

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

    if -3.7999999999999998e154 < x1 < -3e-227

    1. Initial program 88.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. Taylor expanded in x1 around 0 59.2%

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

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

    if -3e-227 < x1 < 1.05e-248

    1. Initial program 99.7%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(-3 \cdot \left(x1 \cdot x2\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Step-by-step derivation
      1. *-commutative96.3%

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

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

    if 1.05e-248 < x1 < 1.35000000000000003e154

    1. Initial program 97.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. Taylor expanded in x1 around 0 65.1%

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

    if 1.35000000000000003e154 < 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. Taylor expanded in x1 around 0 0.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr66.7%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative66.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + \frac{\left(x2 \cdot x2\right) \cdot 36 - \left(x1 \cdot x1\right) \cdot 9}{x2 \cdot -6 - x1 \cdot -3}\right)\\ \mathbf{elif}\;x1 \leq -3 \cdot 10^{-227}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 1.05 \cdot 10^{-248}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 18: 62.3% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\ \mathbf{if}\;x1 \leq -4.6 \cdot 10^{+101}:\\ \;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -3.9 \cdot 10^{-228}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 6.5 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.04 \cdot 10^{+121}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0
         (+
          x1
          (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))))
   (if (<= x1 -4.6e+101)
     (+ x1 (+ x1 (+ (* x1 -3.0) (* x2 (- (* x1 -12.0) 6.0)))))
     (if (<= x1 -3.9e-228)
       t_0
       (if (<= x1 6.5e-247)
         (+
          x1
          (+
           (*
            3.0
            (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
           (+ x1 (* 4.0 (* -3.0 (* x1 x2))))))
         (if (<= x1 1.04e+121)
           t_0
           (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
	double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
	double tmp;
	if (x1 <= -4.6e+101) {
		tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
	} else if (x1 <= -3.9e-228) {
		tmp = t_0;
	} else if (x1 <= 6.5e-247) {
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	} else if (x1 <= 1.04e+121) {
		tmp = t_0;
	} else {
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
    if (x1 <= (-4.6d+101)) then
        tmp = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0))))
    else if (x1 <= (-3.9d-228)) then
        tmp = t_0
    else if (x1 <= 6.5d-247) then
        tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))))
    else if (x1 <= 1.04d+121) then
        tmp = t_0
    else
        tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
	double tmp;
	if (x1 <= -4.6e+101) {
		tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
	} else if (x1 <= -3.9e-228) {
		tmp = t_0;
	} else if (x1 <= 6.5e-247) {
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	} else if (x1 <= 1.04e+121) {
		tmp = t_0;
	} else {
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)))
	tmp = 0
	if x1 <= -4.6e+101:
		tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))))
	elif x1 <= -3.9e-228:
		tmp = t_0
	elif x1 <= 6.5e-247:
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (-3.0 * (x1 * x2)))))
	elif x1 <= 1.04e+121:
		tmp = t_0
	else:
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0))))
	tmp = 0.0
	if (x1 <= -4.6e+101)
		tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))));
	elseif (x1 <= -3.9e-228)
		tmp = t_0;
	elseif (x1 <= 6.5e-247)
		tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2))))));
	elseif (x1 <= 1.04e+121)
		tmp = t_0;
	else
		tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
	tmp = 0.0;
	if (x1 <= -4.6e+101)
		tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
	elseif (x1 <= -3.9e-228)
		tmp = t_0;
	elseif (x1 <= 6.5e-247)
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
	elseif (x1 <= 1.04e+121)
		tmp = t_0;
	else
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.6e+101], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.9e-228], t$95$0, If[LessEqual[x1, 6.5e-247], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.04e+121], t$95$0, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -4.6 \cdot 10^{+101}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\

\mathbf{elif}\;x1 \leq -3.9 \cdot 10^{-228}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{-247}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.04 \cdot 10^{+121}:\\
\;\;\;\;t_0\\

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


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

    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. Taylor expanded in x1 around 0 0.0%

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

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

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

    if -4.6000000000000003e101 < x1 < -3.90000000000000029e-228 or 6.4999999999999996e-247 < x1 < 1.04e121

    1. Initial program 98.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. Taylor expanded in x1 around 0 69.2%

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

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

    if -3.90000000000000029e-228 < x1 < 6.4999999999999996e-247

    1. Initial program 99.7%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(-3 \cdot \left(x1 \cdot x2\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Step-by-step derivation
      1. *-commutative96.3%

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

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

    if 1.04e121 < x1

    1. Initial program 18.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. Taylor expanded in x1 around 0 0.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    7. Applied egg-rr53.4%

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr53.4%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval53.4%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative53.4%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - \color{blue}{-6 \cdot x2}} \]
    9. Simplified53.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -4.6 \cdot 10^{+101}:\\ \;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -3.9 \cdot 10^{-228}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 6.5 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.04 \cdot 10^{+121}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 19: 62.3% accurate, 4.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\ t_1 := x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\ \mathbf{if}\;x1 \leq -4.6 \cdot 10^{+101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq -1.65 \cdot 10^{-227}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq 1.04 \cdot 10^{+121}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0
         (+
          x1
          (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0)))))
        (t_1 (+ x1 (+ x1 (+ (* x1 -3.0) (* x2 (- (* x1 -12.0) 6.0)))))))
   (if (<= x1 -4.6e+101)
     t_1
     (if (<= x1 -1.65e-227)
       t_0
       (if (<= x1 8.2e-247)
         t_1
         (if (<= x1 1.04e+121)
           t_0
           (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
	double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
	double t_1 = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
	double tmp;
	if (x1 <= -4.6e+101) {
		tmp = t_1;
	} else if (x1 <= -1.65e-227) {
		tmp = t_0;
	} else if (x1 <= 8.2e-247) {
		tmp = t_1;
	} else if (x1 <= 1.04e+121) {
		tmp = t_0;
	} else {
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) :: tmp
    t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
    t_1 = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0))))
    if (x1 <= (-4.6d+101)) then
        tmp = t_1
    else if (x1 <= (-1.65d-227)) then
        tmp = t_0
    else if (x1 <= 8.2d-247) then
        tmp = t_1
    else if (x1 <= 1.04d+121) then
        tmp = t_0
    else
        tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
	double t_1 = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
	double tmp;
	if (x1 <= -4.6e+101) {
		tmp = t_1;
	} else if (x1 <= -1.65e-227) {
		tmp = t_0;
	} else if (x1 <= 8.2e-247) {
		tmp = t_1;
	} else if (x1 <= 1.04e+121) {
		tmp = t_0;
	} else {
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)))
	t_1 = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))))
	tmp = 0
	if x1 <= -4.6e+101:
		tmp = t_1
	elif x1 <= -1.65e-227:
		tmp = t_0
	elif x1 <= 8.2e-247:
		tmp = t_1
	elif x1 <= 1.04e+121:
		tmp = t_0
	else:
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0))))
	t_1 = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))))
	tmp = 0.0
	if (x1 <= -4.6e+101)
		tmp = t_1;
	elseif (x1 <= -1.65e-227)
		tmp = t_0;
	elseif (x1 <= 8.2e-247)
		tmp = t_1;
	elseif (x1 <= 1.04e+121)
		tmp = t_0;
	else
		tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
	t_1 = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
	tmp = 0.0;
	if (x1 <= -4.6e+101)
		tmp = t_1;
	elseif (x1 <= -1.65e-227)
		tmp = t_0;
	elseif (x1 <= 8.2e-247)
		tmp = t_1;
	elseif (x1 <= 1.04e+121)
		tmp = t_0;
	else
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.6e+101], t$95$1, If[LessEqual[x1, -1.65e-227], t$95$0, If[LessEqual[x1, 8.2e-247], t$95$1, If[LessEqual[x1, 1.04e+121], t$95$0, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
t_1 := x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.6 \cdot 10^{+101}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x1 \leq -1.65 \cdot 10^{-227}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x1 \leq 1.04 \cdot 10^{+121}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x1 < -4.6000000000000003e101 or -1.65e-227 < x1 < 8.1999999999999997e-247

    1. Initial program 39.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. Taylor expanded in x1 around 0 31.4%

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

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

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

    if -4.6000000000000003e101 < x1 < -1.65e-227 or 8.1999999999999997e-247 < x1 < 1.04e121

    1. Initial program 98.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. Taylor expanded in x1 around 0 69.2%

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

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

    if 1.04e121 < x1

    1. Initial program 18.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. Taylor expanded in x1 around 0 0.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    7. Applied egg-rr53.4%

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr53.4%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval53.4%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative53.4%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - \color{blue}{-6 \cdot x2}} \]
    9. Simplified53.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -4.6 \cdot 10^{+101}:\\ \;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -1.65 \cdot 10^{-227}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 8.2 \cdot 10^{-247}:\\ \;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.04 \cdot 10^{+121}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 20: 53.3% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ t_1 := x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\ \mathbf{if}\;x1 \leq -2.6 \cdot 10^{+140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq -320000000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 2.6 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))
        (t_1 (+ x1 (+ x1 (+ (* x1 -3.0) (* x2 (- (* x1 -12.0) 6.0)))))))
   (if (<= x1 -2.6e+140)
     t_1
     (if (<= x1 -320000000.0)
       t_0
       (if (<= x1 2.6e-48)
         t_1
         (if (<= x1 1.35e+154)
           (+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
           t_0))))))
double code(double x1, double x2) {
	double t_0 = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	double t_1 = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
	double tmp;
	if (x1 <= -2.6e+140) {
		tmp = t_1;
	} else if (x1 <= -320000000.0) {
		tmp = t_0;
	} else if (x1 <= 2.6e-48) {
		tmp = t_1;
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
    t_1 = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0))))
    if (x1 <= (-2.6d+140)) then
        tmp = t_1
    else if (x1 <= (-320000000.0d0)) then
        tmp = t_0
    else if (x1 <= 2.6d-48) then
        tmp = t_1
    else if (x1 <= 1.35d+154) then
        tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	double t_1 = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
	double tmp;
	if (x1 <= -2.6e+140) {
		tmp = t_1;
	} else if (x1 <= -320000000.0) {
		tmp = t_0;
	} else if (x1 <= 2.6e-48) {
		tmp = t_1;
	} else if (x1 <= 1.35e+154) {
		tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x1, x2):
	t_0 = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0))
	t_1 = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))))
	tmp = 0
	if x1 <= -2.6e+140:
		tmp = t_1
	elif x1 <= -320000000.0:
		tmp = t_0
	elif x1 <= 2.6e-48:
		tmp = t_1
	elif x1 <= 1.35e+154:
		tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))))
	else:
		tmp = t_0
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0)))
	t_1 = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))))
	tmp = 0.0
	if (x1 <= -2.6e+140)
		tmp = t_1;
	elseif (x1 <= -320000000.0)
		tmp = t_0;
	elseif (x1 <= 2.6e-48)
		tmp = t_1;
	elseif (x1 <= 1.35e+154)
		tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	t_1 = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
	tmp = 0.0;
	if (x1 <= -2.6e+140)
		tmp = t_1;
	elseif (x1 <= -320000000.0)
		tmp = t_0;
	elseif (x1 <= 2.6e-48)
		tmp = t_1;
	elseif (x1 <= 1.35e+154)
		tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.6e+140], t$95$1, If[LessEqual[x1, -320000000.0], t$95$0, If[LessEqual[x1, 2.6e-48], t$95$1, If[LessEqual[x1, 1.35e+154], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
t_1 := x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.6 \cdot 10^{+140}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x1 \leq -320000000:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x1 \leq 2.6 \cdot 10^{-48}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x1 < -2.6000000000000001e140 or -3.2e8 < x1 < 2.59999999999999987e-48

    1. Initial program 75.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. Taylor expanded in x1 around 0 65.4%

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

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

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

    if -2.6000000000000001e140 < x1 < -3.2e8 or 1.35000000000000003e154 < x1

    1. Initial program 37.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x1 \cdot x1 - \left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)}{x1 - x2 \cdot -6}} \]
    8. Step-by-step derivation
      1. swap-sqr44.9%

        \[\leadsto \frac{x1 \cdot x1 - \color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}}{x1 - x2 \cdot -6} \]
      2. metadata-eval44.9%

        \[\leadsto \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot \color{blue}{36}}{x1 - x2 \cdot -6} \]
      3. *-commutative44.9%

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

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

    if 2.59999999999999987e-48 < x1 < 1.35000000000000003e154

    1. Initial program 94.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. Taylor expanded in x1 around 0 37.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -2.6 \cdot 10^{+140}:\\ \;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -320000000:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \mathbf{elif}\;x1 \leq 2.6 \cdot 10^{-48}:\\ \;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 21: 50.2% accurate, 7.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < 9.99999999999999953e-45

    1. Initial program 75.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. Taylor expanded in x1 around 0 58.5%

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

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

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

    if 9.99999999999999953e-45 < x1

    1. Initial program 54.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. Taylor expanded in x1 around 0 21.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq 10^{-44}:\\ \;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\ \end{array} \]

Alternative 22: 41.6% accurate, 8.3× speedup?

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

\\
\begin{array}{l}
t_0 := \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
t_1 := x1 + x2 \cdot -6\\
\mathbf{if}\;x2 \leq -7 \cdot 10^{+196}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x2 \leq -5.5 \cdot 10^{-177}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x2 \leq 9 \cdot 10^{-177}:\\
\;\;\;\;x1 + x1 \cdot -2\\

\mathbf{elif}\;x2 \leq 6.6 \cdot 10^{+136}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x2 < -6.9999999999999997e196 or 6.59999999999999984e136 < x2

    1. Initial program 62.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. Taylor expanded in x1 around 0 42.3%

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

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

      \[\leadsto \color{blue}{8 \cdot \left(x1 \cdot {x2}^{2}\right)} \]
    5. Step-by-step derivation
      1. associate-*r*59.4%

        \[\leadsto \color{blue}{\left(8 \cdot x1\right) \cdot {x2}^{2}} \]
      2. unpow259.4%

        \[\leadsto \left(8 \cdot x1\right) \cdot \color{blue}{\left(x2 \cdot x2\right)} \]
    6. Simplified59.4%

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

    if -6.9999999999999997e196 < x2 < -5.4999999999999996e-177 or 9.0000000000000007e-177 < x2 < 6.59999999999999984e136

    1. Initial program 73.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. Taylor expanded in x1 around 0 48.7%

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

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

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

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

    if -5.4999999999999996e-177 < x2 < 9.0000000000000007e-177

    1. Initial program 69.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. Taylor expanded in x1 around 0 52.3%

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

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

      \[\leadsto x1 + \color{blue}{\left(x1 + -3 \cdot x1\right)} \]
    5. Step-by-step derivation
      1. distribute-rgt1-in46.7%

        \[\leadsto x1 + \color{blue}{\left(-3 + 1\right) \cdot x1} \]
      2. metadata-eval46.7%

        \[\leadsto x1 + \color{blue}{-2} \cdot x1 \]
      3. *-commutative46.7%

        \[\leadsto x1 + \color{blue}{x1 \cdot -2} \]
    6. Simplified46.7%

      \[\leadsto x1 + \color{blue}{x1 \cdot -2} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x2 \leq -7 \cdot 10^{+196}:\\ \;\;\;\;\left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \mathbf{elif}\;x2 \leq -5.5 \cdot 10^{-177}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{elif}\;x2 \leq 9 \cdot 10^{-177}:\\ \;\;\;\;x1 + x1 \cdot -2\\ \mathbf{elif}\;x2 \leq 6.6 \cdot 10^{+136}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;\left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \end{array} \]

Alternative 23: 41.6% accurate, 8.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ t_1 := x1 + \left(x1 + x2 \cdot -6\right)\\ \mathbf{if}\;x2 \leq -7.5 \cdot 10^{+196}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x2 \leq -6.8 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x2 \leq 1.8 \cdot 10^{-172}:\\ \;\;\;\;x1 + x1 \cdot -2\\ \mathbf{elif}\;x2 \leq 4.6 \cdot 10^{+138}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* (* x2 x2) (* x1 8.0))) (t_1 (+ x1 (+ x1 (* x2 -6.0)))))
   (if (<= x2 -7.5e+196)
     t_0
     (if (<= x2 -6.8e-174)
       t_1
       (if (<= x2 1.8e-172)
         (+ x1 (* x1 -2.0))
         (if (<= x2 4.6e+138) t_1 t_0))))))
double code(double x1, double x2) {
	double t_0 = (x2 * x2) * (x1 * 8.0);
	double t_1 = x1 + (x1 + (x2 * -6.0));
	double tmp;
	if (x2 <= -7.5e+196) {
		tmp = t_0;
	} else if (x2 <= -6.8e-174) {
		tmp = t_1;
	} else if (x2 <= 1.8e-172) {
		tmp = x1 + (x1 * -2.0);
	} else if (x2 <= 4.6e+138) {
		tmp = t_1;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (x2 * x2) * (x1 * 8.0d0)
    t_1 = x1 + (x1 + (x2 * (-6.0d0)))
    if (x2 <= (-7.5d+196)) then
        tmp = t_0
    else if (x2 <= (-6.8d-174)) then
        tmp = t_1
    else if (x2 <= 1.8d-172) then
        tmp = x1 + (x1 * (-2.0d0))
    else if (x2 <= 4.6d+138) then
        tmp = t_1
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = (x2 * x2) * (x1 * 8.0);
	double t_1 = x1 + (x1 + (x2 * -6.0));
	double tmp;
	if (x2 <= -7.5e+196) {
		tmp = t_0;
	} else if (x2 <= -6.8e-174) {
		tmp = t_1;
	} else if (x2 <= 1.8e-172) {
		tmp = x1 + (x1 * -2.0);
	} else if (x2 <= 4.6e+138) {
		tmp = t_1;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x2 * x2) * (x1 * 8.0)
	t_1 = x1 + (x1 + (x2 * -6.0))
	tmp = 0
	if x2 <= -7.5e+196:
		tmp = t_0
	elif x2 <= -6.8e-174:
		tmp = t_1
	elif x2 <= 1.8e-172:
		tmp = x1 + (x1 * -2.0)
	elif x2 <= 4.6e+138:
		tmp = t_1
	else:
		tmp = t_0
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x2 * x2) * Float64(x1 * 8.0))
	t_1 = Float64(x1 + Float64(x1 + Float64(x2 * -6.0)))
	tmp = 0.0
	if (x2 <= -7.5e+196)
		tmp = t_0;
	elseif (x2 <= -6.8e-174)
		tmp = t_1;
	elseif (x2 <= 1.8e-172)
		tmp = Float64(x1 + Float64(x1 * -2.0));
	elseif (x2 <= 4.6e+138)
		tmp = t_1;
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (x2 * x2) * (x1 * 8.0);
	t_1 = x1 + (x1 + (x2 * -6.0));
	tmp = 0.0;
	if (x2 <= -7.5e+196)
		tmp = t_0;
	elseif (x2 <= -6.8e-174)
		tmp = t_1;
	elseif (x2 <= 1.8e-172)
		tmp = x1 + (x1 * -2.0);
	elseif (x2 <= 4.6e+138)
		tmp = t_1;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -7.5e+196], t$95$0, If[LessEqual[x2, -6.8e-174], t$95$1, If[LessEqual[x2, 1.8e-172], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 4.6e+138], t$95$1, t$95$0]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
t_1 := x1 + \left(x1 + x2 \cdot -6\right)\\
\mathbf{if}\;x2 \leq -7.5 \cdot 10^{+196}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x2 \leq -6.8 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x2 \leq 1.8 \cdot 10^{-172}:\\
\;\;\;\;x1 + x1 \cdot -2\\

\mathbf{elif}\;x2 \leq 4.6 \cdot 10^{+138}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x2 < -7.5000000000000005e196 or 4.60000000000000015e138 < x2

    1. Initial program 62.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. Taylor expanded in x1 around 0 42.3%

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

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

      \[\leadsto \color{blue}{8 \cdot \left(x1 \cdot {x2}^{2}\right)} \]
    5. Step-by-step derivation
      1. associate-*r*59.4%

        \[\leadsto \color{blue}{\left(8 \cdot x1\right) \cdot {x2}^{2}} \]
      2. unpow259.4%

        \[\leadsto \left(8 \cdot x1\right) \cdot \color{blue}{\left(x2 \cdot x2\right)} \]
    6. Simplified59.4%

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

    if -7.5000000000000005e196 < x2 < -6.8000000000000004e-174 or 1.80000000000000007e-172 < x2 < 4.60000000000000015e138

    1. Initial program 73.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. Taylor expanded in x1 around 0 67.6%

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

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

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

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

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

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

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

    if -6.8000000000000004e-174 < x2 < 1.80000000000000007e-172

    1. Initial program 69.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. Taylor expanded in x1 around 0 52.3%

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

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

      \[\leadsto x1 + \color{blue}{\left(x1 + -3 \cdot x1\right)} \]
    5. Step-by-step derivation
      1. distribute-rgt1-in46.7%

        \[\leadsto x1 + \color{blue}{\left(-3 + 1\right) \cdot x1} \]
      2. metadata-eval46.7%

        \[\leadsto x1 + \color{blue}{-2} \cdot x1 \]
      3. *-commutative46.7%

        \[\leadsto x1 + \color{blue}{x1 \cdot -2} \]
    6. Simplified46.7%

      \[\leadsto x1 + \color{blue}{x1 \cdot -2} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification47.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x2 \leq -7.5 \cdot 10^{+196}:\\ \;\;\;\;\left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \mathbf{elif}\;x2 \leq -6.8 \cdot 10^{-174}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot -6\right)\\ \mathbf{elif}\;x2 \leq 1.8 \cdot 10^{-172}:\\ \;\;\;\;x1 + x1 \cdot -2\\ \mathbf{elif}\;x2 \leq 4.6 \cdot 10^{+138}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \end{array} \]

Alternative 24: 31.8% accurate, 13.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -7.4 \cdot 10^{-174} \lor \neg \left(x2 \leq 1.6 \cdot 10^{-172}\right):\\
\;\;\;\;x1 + x2 \cdot -6\\

\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot -2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x2 < -7.40000000000000019e-174 or 1.6000000000000001e-172 < x2

    1. Initial program 70.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. Taylor expanded in x1 around 0 47.0%

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

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

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

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

    if -7.40000000000000019e-174 < x2 < 1.6000000000000001e-172

    1. Initial program 69.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. Taylor expanded in x1 around 0 52.3%

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

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

      \[\leadsto x1 + \color{blue}{\left(x1 + -3 \cdot x1\right)} \]
    5. Step-by-step derivation
      1. distribute-rgt1-in46.7%

        \[\leadsto x1 + \color{blue}{\left(-3 + 1\right) \cdot x1} \]
      2. metadata-eval46.7%

        \[\leadsto x1 + \color{blue}{-2} \cdot x1 \]
      3. *-commutative46.7%

        \[\leadsto x1 + \color{blue}{x1 \cdot -2} \]
    6. Simplified46.7%

      \[\leadsto x1 + \color{blue}{x1 \cdot -2} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x2 \leq -7.4 \cdot 10^{-174} \lor \neg \left(x2 \leq 1.6 \cdot 10^{-172}\right):\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot -2\\ \end{array} \]

Alternative 25: 3.4% accurate, 25.4× speedup?

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

\\
x1 \cdot 2 + 9
\end{array}
Derivation
  1. Initial program 70.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. Taylor expanded in x1 around 0 48.3%

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

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

    \[\leadsto \color{blue}{9 + 2 \cdot x1} \]
  5. Final simplification3.6%

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

Alternative 26: 14.3% accurate, 25.4× speedup?

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

\\
x1 + x1 \cdot -2
\end{array}
Derivation
  1. Initial program 70.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. Taylor expanded in x1 around 0 48.3%

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

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

    \[\leadsto x1 + \color{blue}{\left(x1 + -3 \cdot x1\right)} \]
  5. Step-by-step derivation
    1. distribute-rgt1-in15.3%

      \[\leadsto x1 + \color{blue}{\left(-3 + 1\right) \cdot x1} \]
    2. metadata-eval15.3%

      \[\leadsto x1 + \color{blue}{-2} \cdot x1 \]
    3. *-commutative15.3%

      \[\leadsto x1 + \color{blue}{x1 \cdot -2} \]
  6. Simplified15.3%

    \[\leadsto x1 + \color{blue}{x1 \cdot -2} \]
  7. Final simplification15.3%

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

Alternative 27: 3.5% accurate, 127.0× speedup?

\[\begin{array}{l} \\ 9 \end{array} \]
(FPCore (x1 x2) :precision binary64 9.0)
double code(double x1, double x2) {
	return 9.0;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    code = 9.0d0
end function
public static double code(double x1, double x2) {
	return 9.0;
}
def code(x1, x2):
	return 9.0
function code(x1, x2)
	return 9.0
end
function tmp = code(x1, x2)
	tmp = 9.0;
end
code[x1_, x2_] := 9.0
\begin{array}{l}

\\
9
\end{array}
Derivation
  1. Initial program 70.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. Taylor expanded in x1 around 0 48.3%

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

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

    \[\leadsto \color{blue}{9} \]
  5. Final simplification3.6%

    \[\leadsto 9 \]

Reproduce

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