Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 70.4% → 93.8%
Time: 1.4min
Alternatives: 24
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 24 alternatives:

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

Initial Program: 70.4% 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: 93.8% accurate, 0.1× speedup?

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

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

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

\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_1 - \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_2, 4, -6\right), t_2 \cdot \left(\left(-3 + t_2\right) \cdot \left(x1 \cdot 2\right)\right)\right), \mathsf{fma}\left(t_1, t_2, {x1}^{3}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}\\


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

    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 54.2%

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

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

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

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \color{blue}{\mathsf{fma}\left(x1, 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2, 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)}\right) \]
      5. associate-*r*70.8%

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

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(4 \cdot x2, 2 \cdot x2 - 3, \color{blue}{-2}\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      8. *-commutative70.8%

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}, -2\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      10. metadata-eval70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, \color{blue}{-3}\right), -2\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      11. associate-*r*70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left(3 \cdot {x1}^{2}\right) \cdot \left(3 - -2 \cdot x2\right)}\right)\right) \]
      12. *-commutative70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left({x1}^{2} \cdot 3\right)} \cdot \left(3 - -2 \cdot x2\right)\right)\right) \]
      13. associate-*l*70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{{x1}^{2} \cdot \left(3 \cdot \left(3 - -2 \cdot x2\right)\right)}\right)\right) \]
      14. unpow270.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      15. cancel-sign-sub-inv70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      16. metadata-eval70.8%

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

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

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

    if -4.2e155 < 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 inf 87.5%

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

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

      \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot 6} + 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.49999999999999981e102 < x1 < 1.50000000000000003e133

    1. Initial program 99.3%

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

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

    if 1.50000000000000003e133 < x1

    1. Initial program 9.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 3.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 9.4%

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. add-cbrt-cube96.8%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    7. Applied egg-rr96.8%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    8. Step-by-step derivation
      1. associate-*l*96.8%

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

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

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

Alternative 2: 93.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(x1, x1 \cdot 3, \left(x2 + x2\right) - x1\right)\\ t_1 := \frac{t_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\ t_2 := x1 + x2 \cdot -6\\ t_3 := x1 \cdot \left(x1 \cdot 3\right)\\ t_4 := x1 \cdot x1 + 1\\ t_5 := \frac{\left(t_3 + x2 \cdot 2\right) - x1}{t_4}\\ \mathbf{if}\;x1 \leq -4.2 \cdot 10^{+155}:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \left(x2 + \left(x2 + 3\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -5.5 \cdot 10^{-103}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_3 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 \cdot \frac{3 \cdot \left(x1 \cdot t_0\right)}{\mathsf{fma}\left(x1, x1, 1\right)} + \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + x1 \cdot \left(2 \cdot \left(t_1 \cdot \left(-3 + t_1\right)\right) + x1 \cdot \mathsf{fma}\left(t_1, 4, -6\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(t_4 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_5\right) \cdot \left(t_5 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_5 - 6\right)\right) + 3 \cdot t_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{t_2 \cdot \left(t_2 \cdot t_2\right)}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (fma x1 (* x1 3.0) (- (+ x2 x2) x1)))
        (t_1 (/ t_0 (fma x1 x1 1.0)))
        (t_2 (+ x1 (* x2 -6.0)))
        (t_3 (* x1 (* x1 3.0)))
        (t_4 (+ (* x1 x1) 1.0))
        (t_5 (/ (- (+ t_3 (* x2 2.0)) x1) t_4)))
   (if (<= x1 -4.2e+155)
     (+
      x1
      (fma
       x2
       -6.0
       (fma
        x1
        (fma (* x2 4.0) (fma 2.0 x2 -3.0) -2.0)
        (* (* x1 x1) (* 3.0 (+ x2 (+ x2 3.0)))))))
     (if (<= x1 -5.5e-103)
       (+
        x1
        (fma
         3.0
         (/ (- t_3 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
         (+
          (* x1 (/ (* 3.0 (* x1 t_0)) (fma x1 x1 1.0)))
          (*
           (fma x1 x1 1.0)
           (+
            x1
            (*
             x1
             (+ (* 2.0 (* t_1 (+ -3.0 t_1))) (* x1 (fma t_1 4.0 -6.0)))))))))
       (if (<= x1 1.5e+133)
         (+
          x1
          (+
           (+
            x1
            (+
             (+
              (*
               t_4
               (+
                (* (* (* x1 2.0) t_5) (- t_5 3.0))
                (* (* x1 x1) (- (* 4.0 t_5) 6.0))))
              (* 3.0 t_3))
             (* x1 (* x1 x1))))
           (* 3.0 (- (* x2 -2.0) x1))))
         (cbrt (* t_2 (* t_2 t_2))))))))
double code(double x1, double x2) {
	double t_0 = fma(x1, (x1 * 3.0), ((x2 + x2) - x1));
	double t_1 = t_0 / fma(x1, x1, 1.0);
	double t_2 = x1 + (x2 * -6.0);
	double t_3 = x1 * (x1 * 3.0);
	double t_4 = (x1 * x1) + 1.0;
	double t_5 = ((t_3 + (x2 * 2.0)) - x1) / t_4;
	double tmp;
	if (x1 <= -4.2e+155) {
		tmp = x1 + fma(x2, -6.0, fma(x1, fma((x2 * 4.0), fma(2.0, x2, -3.0), -2.0), ((x1 * x1) * (3.0 * (x2 + (x2 + 3.0))))));
	} else if (x1 <= -5.5e-103) {
		tmp = x1 + fma(3.0, ((t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), ((x1 * ((3.0 * (x1 * t_0)) / fma(x1, x1, 1.0))) + (fma(x1, x1, 1.0) * (x1 + (x1 * ((2.0 * (t_1 * (-3.0 + t_1))) + (x1 * fma(t_1, 4.0, -6.0))))))));
	} else if (x1 <= 1.5e+133) {
		tmp = x1 + ((x1 + (((t_4 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * ((4.0 * t_5) - 6.0)))) + (3.0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = cbrt((t_2 * (t_2 * t_2)));
	}
	return tmp;
}
function code(x1, x2)
	t_0 = fma(x1, Float64(x1 * 3.0), Float64(Float64(x2 + x2) - x1))
	t_1 = Float64(t_0 / fma(x1, x1, 1.0))
	t_2 = Float64(x1 + Float64(x2 * -6.0))
	t_3 = Float64(x1 * Float64(x1 * 3.0))
	t_4 = Float64(Float64(x1 * x1) + 1.0)
	t_5 = Float64(Float64(Float64(t_3 + Float64(x2 * 2.0)) - x1) / t_4)
	tmp = 0.0
	if (x1 <= -4.2e+155)
		tmp = Float64(x1 + fma(x2, -6.0, fma(x1, fma(Float64(x2 * 4.0), fma(2.0, x2, -3.0), -2.0), Float64(Float64(x1 * x1) * Float64(3.0 * Float64(x2 + Float64(x2 + 3.0)))))));
	elseif (x1 <= -5.5e-103)
		tmp = Float64(x1 + fma(3.0, Float64(Float64(t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * t_0)) / fma(x1, x1, 1.0))) + Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(x1 * Float64(Float64(2.0 * Float64(t_1 * Float64(-3.0 + t_1))) + Float64(x1 * fma(t_1, 4.0, -6.0)))))))));
	elseif (x1 <= 1.5e+133)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_4 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_5) - 6.0)))) + Float64(3.0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1))));
	else
		tmp = cbrt(Float64(t_2 * Float64(t_2 * t_2)));
	end
	return tmp
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(N[(x2 + x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$3 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]}, If[LessEqual[x1, -4.2e+155], N[(x1 + N[(x2 * -6.0 + N[(x1 * N[(N[(x2 * 4.0), $MachinePrecision] * N[(2.0 * x2 + -3.0), $MachinePrecision] + -2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 * N[(x2 + N[(x2 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.5e-103], N[(x1 + N[(3.0 * N[(N[(t$95$3 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(3.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(x1 * N[(N[(2.0 * N[(t$95$1 * N[(-3.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(t$95$1 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+133], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$4 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$5), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$2 * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1, x1 \cdot 3, \left(x2 + x2\right) - x1\right)\\
t_1 := \frac{t_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_2 := x1 + x2 \cdot -6\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{\left(t_3 + x2 \cdot 2\right) - x1}{t_4}\\
\mathbf{if}\;x1 \leq -4.2 \cdot 10^{+155}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \left(x2 + \left(x2 + 3\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{-103}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_3 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 \cdot \frac{3 \cdot \left(x1 \cdot t_0\right)}{\mathsf{fma}\left(x1, x1, 1\right)} + \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + x1 \cdot \left(2 \cdot \left(t_1 \cdot \left(-3 + t_1\right)\right) + x1 \cdot \mathsf{fma}\left(t_1, 4, -6\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_4 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_5\right) \cdot \left(t_5 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_5 - 6\right)\right) + 3 \cdot t_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_2 \cdot \left(t_2 \cdot t_2\right)}\\


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

    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 54.2%

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

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

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

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \color{blue}{\mathsf{fma}\left(x1, 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2, 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)}\right) \]
      5. associate-*r*70.8%

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

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(4 \cdot x2, 2 \cdot x2 - 3, \color{blue}{-2}\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      8. *-commutative70.8%

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}, -2\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      10. metadata-eval70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, \color{blue}{-3}\right), -2\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      11. associate-*r*70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left(3 \cdot {x1}^{2}\right) \cdot \left(3 - -2 \cdot x2\right)}\right)\right) \]
      12. *-commutative70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left({x1}^{2} \cdot 3\right)} \cdot \left(3 - -2 \cdot x2\right)\right)\right) \]
      13. associate-*l*70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{{x1}^{2} \cdot \left(3 \cdot \left(3 - -2 \cdot x2\right)\right)}\right)\right) \]
      14. unpow270.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      15. cancel-sign-sub-inv70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      16. metadata-eval70.8%

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

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

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

    if -4.2e155 < x1 < -5.50000000000000032e-103

    1. Initial program 85.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. Simplified97.7%

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

    if -5.50000000000000032e-103 < x1 < 1.50000000000000003e133

    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 inf 98.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 \color{blue}{3}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. 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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
    4. Step-by-step derivation
      1. mul-1-neg99.4%

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

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

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

    if 1.50000000000000003e133 < x1

    1. Initial program 9.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 3.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 9.4%

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. add-cbrt-cube96.8%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    7. Applied egg-rr96.8%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    8. Step-by-step derivation
      1. associate-*l*96.8%

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

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

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

Alternative 3: 93.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \left(x2 + x2\right) - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\ t_1 := x1 \cdot x1 + 1\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := \frac{\left(t_2 + x2 \cdot 2\right) - x1}{t_1}\\ t_4 := x1 + x2 \cdot -6\\ \mathbf{if}\;x1 \leq -4.2 \cdot 10^{+155}:\\ \;\;\;\;x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \left(x2 + \left(x2 + 3\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -2200000:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_2 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + x1 \cdot \left(2 \cdot \left(t_0 \cdot \left(-3 + t_0\right)\right) + x1 \cdot \mathsf{fma}\left(t_0, 4, -6\right)\right)\right) + x1 \cdot \left(x1 \cdot 9\right)\right)\\ \mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\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(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{t_4 \cdot \left(t_4 \cdot t_4\right)}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (/ (fma x1 (* x1 3.0) (- (+ x2 x2) x1)) (fma x1 x1 1.0)))
        (t_1 (+ (* x1 x1) 1.0))
        (t_2 (* x1 (* x1 3.0)))
        (t_3 (/ (- (+ t_2 (* x2 2.0)) x1) t_1))
        (t_4 (+ x1 (* x2 -6.0))))
   (if (<= x1 -4.2e+155)
     (+
      x1
      (fma
       x2
       -6.0
       (fma
        x1
        (fma (* x2 4.0) (fma 2.0 x2 -3.0) -2.0)
        (* (* x1 x1) (* 3.0 (+ x2 (+ x2 3.0)))))))
     (if (<= x1 -2200000.0)
       (+
        x1
        (fma
         3.0
         (/ (- t_2 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
         (+
          (*
           (fma x1 x1 1.0)
           (+
            x1
            (* x1 (+ (* 2.0 (* t_0 (+ -3.0 t_0))) (* x1 (fma t_0 4.0 -6.0))))))
          (* x1 (* x1 9.0)))))
       (if (<= x1 1.5e+133)
         (+
          x1
          (+
           (+
            x1
            (+
             (+
              (*
               t_1
               (+
                (* (* (* x1 2.0) t_3) (- t_3 3.0))
                (* (* x1 x1) (- (* 4.0 t_3) 6.0))))
              (* 3.0 t_2))
             (* x1 (* x1 x1))))
           (* 3.0 (- (* x2 -2.0) x1))))
         (cbrt (* t_4 (* t_4 t_4))))))))
double code(double x1, double x2) {
	double t_0 = fma(x1, (x1 * 3.0), ((x2 + x2) - x1)) / fma(x1, x1, 1.0);
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = x1 * (x1 * 3.0);
	double t_3 = ((t_2 + (x2 * 2.0)) - x1) / t_1;
	double t_4 = x1 + (x2 * -6.0);
	double tmp;
	if (x1 <= -4.2e+155) {
		tmp = x1 + fma(x2, -6.0, fma(x1, fma((x2 * 4.0), fma(2.0, x2, -3.0), -2.0), ((x1 * x1) * (3.0 * (x2 + (x2 + 3.0))))));
	} else if (x1 <= -2200000.0) {
		tmp = x1 + fma(3.0, ((t_2 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), ((fma(x1, x1, 1.0) * (x1 + (x1 * ((2.0 * (t_0 * (-3.0 + t_0))) + (x1 * fma(t_0, 4.0, -6.0)))))) + (x1 * (x1 * 9.0))));
	} else if (x1 <= 1.5e+133) {
		tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = cbrt((t_4 * (t_4 * t_4)));
	}
	return tmp;
}
function code(x1, x2)
	t_0 = Float64(fma(x1, Float64(x1 * 3.0), Float64(Float64(x2 + x2) - x1)) / fma(x1, x1, 1.0))
	t_1 = Float64(Float64(x1 * x1) + 1.0)
	t_2 = Float64(x1 * Float64(x1 * 3.0))
	t_3 = Float64(Float64(Float64(t_2 + Float64(x2 * 2.0)) - x1) / t_1)
	t_4 = Float64(x1 + Float64(x2 * -6.0))
	tmp = 0.0
	if (x1 <= -4.2e+155)
		tmp = Float64(x1 + fma(x2, -6.0, fma(x1, fma(Float64(x2 * 4.0), fma(2.0, x2, -3.0), -2.0), Float64(Float64(x1 * x1) * Float64(3.0 * Float64(x2 + Float64(x2 + 3.0)))))));
	elseif (x1 <= -2200000.0)
		tmp = Float64(x1 + fma(3.0, Float64(Float64(t_2 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(x1 * Float64(Float64(2.0 * Float64(t_0 * Float64(-3.0 + t_0))) + Float64(x1 * fma(t_0, 4.0, -6.0)))))) + Float64(x1 * Float64(x1 * 9.0)))));
	elseif (x1 <= 1.5e+133)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(3.0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1))));
	else
		tmp = cbrt(Float64(t_4 * Float64(t_4 * t_4)));
	end
	return tmp
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(N[(x2 + x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.2e+155], N[(x1 + N[(x2 * -6.0 + N[(x1 * N[(N[(x2 * 4.0), $MachinePrecision] * N[(2.0 * x2 + -3.0), $MachinePrecision] + -2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 * N[(x2 + N[(x2 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2200000.0], N[(x1 + N[(3.0 * N[(N[(t$95$2 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(x1 * N[(N[(2.0 * N[(t$95$0 * N[(-3.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+133], N[(x1 + N[(N[(x1 + N[(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[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$4 * N[(t$95$4 * t$95$4), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x1 \leq -2200000:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_2 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + x1 \cdot \left(2 \cdot \left(t_0 \cdot \left(-3 + t_0\right)\right) + x1 \cdot \mathsf{fma}\left(t_0, 4, -6\right)\right)\right) + x1 \cdot \left(x1 \cdot 9\right)\right)\\

\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\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(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_4 \cdot \left(t_4 \cdot t_4\right)}\\


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

    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 54.2%

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

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

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

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \color{blue}{\mathsf{fma}\left(x1, 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2, 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)}\right) \]
      5. associate-*r*70.8%

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

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(4 \cdot x2, 2 \cdot x2 - 3, \color{blue}{-2}\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      8. *-commutative70.8%

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}, -2\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      10. metadata-eval70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, \color{blue}{-3}\right), -2\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      11. associate-*r*70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left(3 \cdot {x1}^{2}\right) \cdot \left(3 - -2 \cdot x2\right)}\right)\right) \]
      12. *-commutative70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left({x1}^{2} \cdot 3\right)} \cdot \left(3 - -2 \cdot x2\right)\right)\right) \]
      13. associate-*l*70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{{x1}^{2} \cdot \left(3 \cdot \left(3 - -2 \cdot x2\right)\right)}\right)\right) \]
      14. unpow270.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      15. cancel-sign-sub-inv70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      16. metadata-eval70.8%

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

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

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

    if -4.2e155 < x1 < -2.2e6

    1. Initial program 71.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. Simplified95.9%

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

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

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

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

    if -2.2e6 < x1 < 1.50000000000000003e133

    1. Initial program 99.3%

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

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

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

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

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

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

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

    if 1.50000000000000003e133 < x1

    1. Initial program 9.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 3.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 9.4%

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. add-cbrt-cube96.8%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    7. Applied egg-rr96.8%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    8. Step-by-step derivation
      1. associate-*l*96.8%

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

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

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

Alternative 4: 93.6% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_0 \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(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_1\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_3 \cdot \left(t_3 \cdot t_3\right)}\\


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

    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 54.2%

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

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

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

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \color{blue}{\mathsf{fma}\left(x1, 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2, 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)}\right) \]
      5. associate-*r*70.8%

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

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(4 \cdot x2, 2 \cdot x2 - 3, \color{blue}{-2}\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      8. *-commutative70.8%

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

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}, -2\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      10. metadata-eval70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, \color{blue}{-3}\right), -2\right), 3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      11. associate-*r*70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left(3 \cdot {x1}^{2}\right) \cdot \left(3 - -2 \cdot x2\right)}\right)\right) \]
      12. *-commutative70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left({x1}^{2} \cdot 3\right)} \cdot \left(3 - -2 \cdot x2\right)\right)\right) \]
      13. associate-*l*70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{{x1}^{2} \cdot \left(3 \cdot \left(3 - -2 \cdot x2\right)\right)}\right)\right) \]
      14. unpow270.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 \cdot \left(3 - -2 \cdot x2\right)\right)\right)\right) \]
      15. cancel-sign-sub-inv70.8%

        \[\leadsto x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      16. metadata-eval70.8%

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

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

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

    if -4.2e155 < x1 < -5.60000000000000037e102

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

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

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

      \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot 6} + 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.60000000000000037e102 < x1 < 1.50000000000000003e133

    1. Initial program 99.3%

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

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

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

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

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

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

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

    if 1.50000000000000003e133 < x1

    1. Initial program 9.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 3.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 9.4%

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. add-cbrt-cube96.8%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    7. Applied egg-rr96.8%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    8. Step-by-step derivation
      1. associate-*l*96.8%

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

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

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

Alternative 5: 83.4% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\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.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 inf 97.7%

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

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

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

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

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

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

    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(\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. add-cbrt-cube48.3%

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

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    8. Step-by-step derivation
      1. associate-*l*48.3%

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

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

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

Alternative 6: 92.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + x2 \cdot -6\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_2}\\ \mathbf{if}\;x1 \leq -4.2 \cdot 10^{+155}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + \left(3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right)\right) + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot 6\right) + 3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_2}\right)\\ \mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_1\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (+ x1 (* x2 -6.0)))
        (t_1 (* x1 (* x1 3.0)))
        (t_2 (+ (* x1 x1) 1.0))
        (t_3 (/ (- (+ t_1 (* x2 2.0)) x1) t_2)))
   (if (<= x1 -4.2e+155)
     (+
      x1
      (+
       (* x2 -6.0)
       (+
        (* 3.0 (* (pow x1 2.0) (- 3.0 (* x2 -2.0))))
        (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0)))))
     (if (<= x1 -5.6e+102)
       (+
        x1
        (+
         (+ x1 (* (pow x1 4.0) 6.0))
         (* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_2))))
       (if (<= x1 1.5e+133)
         (+
          x1
          (+
           (+
            x1
            (+
             (+
              (*
               t_2
               (+
                (* (* (* x1 2.0) t_3) (- t_3 3.0))
                (* (* x1 x1) (- (* 4.0 t_3) 6.0))))
              (* 3.0 t_1))
             (* x1 (* x1 x1))))
           (* 3.0 (- (* x2 -2.0) x1))))
         (cbrt (* t_0 (* t_0 t_0))))))))
double code(double x1, double x2) {
	double t_0 = x1 + (x2 * -6.0);
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
	double tmp;
	if (x1 <= -4.2e+155) {
		tmp = x1 + ((x2 * -6.0) + ((3.0 * (pow(x1, 2.0) * (3.0 - (x2 * -2.0)))) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))));
	} else if (x1 <= -5.6e+102) {
		tmp = x1 + ((x1 + (pow(x1, 4.0) * 6.0)) + (3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2)));
	} else if (x1 <= 1.5e+133) {
		tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_1)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = cbrt((t_0 * (t_0 * t_0)));
	}
	return tmp;
}
public static double code(double x1, double x2) {
	double t_0 = x1 + (x2 * -6.0);
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
	double tmp;
	if (x1 <= -4.2e+155) {
		tmp = x1 + ((x2 * -6.0) + ((3.0 * (Math.pow(x1, 2.0) * (3.0 - (x2 * -2.0)))) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))));
	} else if (x1 <= -5.6e+102) {
		tmp = x1 + ((x1 + (Math.pow(x1, 4.0) * 6.0)) + (3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2)));
	} else if (x1 <= 1.5e+133) {
		tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_1)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = Math.cbrt((t_0 * (t_0 * t_0)));
	}
	return tmp;
}
function code(x1, x2)
	t_0 = Float64(x1 + Float64(x2 * -6.0))
	t_1 = Float64(x1 * Float64(x1 * 3.0))
	t_2 = Float64(Float64(x1 * x1) + 1.0)
	t_3 = Float64(Float64(Float64(t_1 + Float64(x2 * 2.0)) - x1) / t_2)
	tmp = 0.0
	if (x1 <= -4.2e+155)
		tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(3.0 * Float64((x1 ^ 2.0) * Float64(3.0 - Float64(x2 * -2.0)))) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)))));
	elseif (x1 <= -5.6e+102)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * 6.0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_2))));
	elseif (x1 <= 1.5e+133)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(3.0 * t_1)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1))));
	else
		tmp = cbrt(Float64(t_0 * Float64(t_0 * t_0)));
	end
	return tmp
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -4.2e+155], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(3.0 * N[(N[Power[x1, 2.0], $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+133], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}\\


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

    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 54.2%

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

    if -4.2e155 < x1 < -5.60000000000000037e102

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

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

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

      \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot 6} + 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.60000000000000037e102 < x1 < 1.50000000000000003e133

    1. Initial program 99.3%

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

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

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

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

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

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

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

    if 1.50000000000000003e133 < x1

    1. Initial program 9.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 3.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 9.4%

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. add-cbrt-cube96.8%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    7. Applied egg-rr96.8%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    8. Step-by-step derivation
      1. associate-*l*96.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -4.2 \cdot 10^{+155}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + \left(3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right)\right) + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot 6\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1}\right)\\ \mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\ \;\;\;\;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) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right)\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(x1 + x2 \cdot -6\right) \cdot \left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right)}\\ \end{array} \]

Alternative 7: 85.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 + x2 \cdot -6\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_2}\\ \mathbf{if}\;x1 \leq -1 \cdot 10^{+103}:\\ \;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot 6\right) + 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_2}\right)\\ \mathbf{elif}\;x1 \leq 5 \cdot 10^{+131}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\right)}\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (* x1 3.0)))
        (t_1 (+ x1 (* x2 -6.0)))
        (t_2 (+ (* x1 x1) 1.0))
        (t_3 (/ (- (+ t_0 (* x2 2.0)) x1) t_2)))
   (if (<= x1 -1e+103)
     (+
      x1
      (+
       (+ x1 (* (pow x1 4.0) 6.0))
       (* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_2))))
     (if (<= x1 5e+131)
       (+
        x1
        (+
         (+
          x1
          (+
           (+
            (*
             t_2
             (+
              (* (* (* x1 2.0) t_3) (- t_3 3.0))
              (* (* x1 x1) (- (* 4.0 t_3) 6.0))))
            (* 3.0 t_0))
           (* x1 (* x1 x1))))
         (* 3.0 (- (* x2 -2.0) x1))))
       (cbrt (* t_1 (* t_1 t_1)))))))
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = x1 + (x2 * -6.0);
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = ((t_0 + (x2 * 2.0)) - x1) / t_2;
	double tmp;
	if (x1 <= -1e+103) {
		tmp = x1 + ((x1 + (pow(x1, 4.0) * 6.0)) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2)));
	} else if (x1 <= 5e+131) {
		tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = cbrt((t_1 * (t_1 * t_1)));
	}
	return tmp;
}
public static double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = x1 + (x2 * -6.0);
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = ((t_0 + (x2 * 2.0)) - x1) / t_2;
	double tmp;
	if (x1 <= -1e+103) {
		tmp = x1 + ((x1 + (Math.pow(x1, 4.0) * 6.0)) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2)));
	} else if (x1 <= 5e+131) {
		tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = Math.cbrt((t_1 * (t_1 * t_1)));
	}
	return tmp;
}
function code(x1, x2)
	t_0 = Float64(x1 * Float64(x1 * 3.0))
	t_1 = Float64(x1 + Float64(x2 * -6.0))
	t_2 = Float64(Float64(x1 * x1) + 1.0)
	t_3 = Float64(Float64(Float64(t_0 + Float64(x2 * 2.0)) - x1) / t_2)
	tmp = 0.0
	if (x1 <= -1e+103)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * 6.0)) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_2))));
	elseif (x1 <= 5e+131)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(3.0 * t_0)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1))));
	else
		tmp = cbrt(Float64(t_1 * Float64(t_1 * t_1)));
	end
	return tmp
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -1e+103], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+131], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$1 * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x1 \leq 5 \cdot 10^{+131}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\right)}\\


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

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

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

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

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

    if -1e103 < x1 < 4.99999999999999995e131

    1. Initial program 99.3%

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

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

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

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

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

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

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

    if 4.99999999999999995e131 < x1

    1. Initial program 9.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 3.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 9.4%

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. add-cbrt-cube96.8%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    7. Applied egg-rr96.8%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x1 + x2 \cdot -6\right) \cdot \left(x1 + x2 \cdot -6\right)\right) \cdot \left(x1 + x2 \cdot -6\right)}} \]
    8. Step-by-step derivation
      1. associate-*l*96.8%

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

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

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

Alternative 8: 80.1% accurate, 1.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 + x2 \cdot 2\right) - x1}{t_1}\\ \mathbf{if}\;x1 \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;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(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot -36\right)}{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 (* x2 2.0)) x1) t_1)))
   (if (<= x1 5.5e+144)
     (+
      x1
      (+
       (+
        x1
        (+
         (+
          (*
           t_1
           (+
            (* (* (* x1 2.0) t_2) (- t_2 3.0))
            (* (* x1 x1) (- (* 4.0 t_2) 6.0))))
          (* 3.0 t_0))
         (* x1 (* x1 x1))))
       (* 3.0 (- (* x2 -2.0) x1))))
     (/ (fma x1 x1 (* (* x2 x2) -36.0)) (+ 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 + (x2 * 2.0)) - x1) / t_1;
	double tmp;
	if (x1 <= 5.5e+144) {
		tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = fma(x1, x1, ((x2 * x2) * -36.0)) / (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(x2 * 2.0)) - x1) / t_1)
	tmp = 0.0
	if (x1 <= 5.5e+144)
		tmp = 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(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_0)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1))));
	else
		tmp = Float64(fma(x1, x1, Float64(Float64(x2 * x2) * -36.0)) / Float64(x1 + Float64(x2 * 6.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[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, 5.5e+144], 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[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * x1 + 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 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;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(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < 5.50000000000000022e144

    1. Initial program 85.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 inf 83.9%

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

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

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

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

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

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

    if 5.50000000000000022e144 < x1

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

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. flip-+75.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-rr75.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. fma-neg79.3%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x1, x1, -\left(x2 \cdot -6\right) \cdot \left(x2 \cdot -6\right)\right)}}{x1 - x2 \cdot -6} \]
      2. swap-sqr79.3%

        \[\leadsto \frac{\mathsf{fma}\left(x1, x1, -\color{blue}{\left(x2 \cdot x2\right) \cdot \left(-6 \cdot -6\right)}\right)}{x1 - x2 \cdot -6} \]
      3. unpow279.3%

        \[\leadsto \frac{\mathsf{fma}\left(x1, x1, -\color{blue}{{x2}^{2}} \cdot \left(-6 \cdot -6\right)\right)}{x1 - x2 \cdot -6} \]
      4. distribute-rgt-neg-in79.3%

        \[\leadsto \frac{\mathsf{fma}\left(x1, x1, \color{blue}{{x2}^{2} \cdot \left(--6 \cdot -6\right)}\right)}{x1 - x2 \cdot -6} \]
      5. unpow279.3%

        \[\leadsto \frac{\mathsf{fma}\left(x1, x1, \color{blue}{\left(x2 \cdot x2\right)} \cdot \left(--6 \cdot -6\right)\right)}{x1 - x2 \cdot -6} \]
      6. metadata-eval79.3%

        \[\leadsto \frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot \left(-\color{blue}{36}\right)\right)}{x1 - x2 \cdot -6} \]
      7. metadata-eval79.3%

        \[\leadsto \frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot \color{blue}{-36}\right)}{x1 - x2 \cdot -6} \]
      8. *-commutative79.3%

        \[\leadsto \frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot -36\right)}{x1 - \color{blue}{-6 \cdot x2}} \]
      9. cancel-sign-sub-inv79.3%

        \[\leadsto \frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot -36\right)}{\color{blue}{x1 + \left(--6\right) \cdot x2}} \]
      10. metadata-eval79.3%

        \[\leadsto \frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot -36\right)}{x1 + \color{blue}{6} \cdot x2} \]
      11. *-commutative79.3%

        \[\leadsto \frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot -36\right)}{x1 + \color{blue}{x2 \cdot 6}} \]
    9. Simplified79.3%

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

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

Alternative 9: 71.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := \frac{\left(t_2 + x2 \cdot 2\right) - x1}{t_0}\\ t_4 := 3 \cdot \frac{\left(t_2 - x2 \cdot 2\right) - x1}{t_0}\\ t_5 := x1 + \left(t_4 + \left(x1 + \left(t_1 + \left(3 \cdot t_2 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right) + \left(t_3 - 3\right) \cdot \left(3 \cdot \left(x1 \cdot 2\right)\right)\right)\right)\right)\right)\right)\\ t_6 := x1 + \left(t_4 + \left(x1 + \left(t_1 + \left(t_2 \cdot t_3 + t_0 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -16000:\\ \;\;\;\;t_5\\ \mathbf{elif}\;x1 \leq -1.25 \cdot 10^{-232}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-252}:\\ \;\;\;\;x1 + \left(t_4 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 195:\\ \;\;\;\;t_6\\ \mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;t_5\\ \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 x1) 1.0))
        (t_1 (* x1 (* x1 x1)))
        (t_2 (* x1 (* x1 3.0)))
        (t_3 (/ (- (+ t_2 (* x2 2.0)) x1) t_0))
        (t_4 (* 3.0 (/ (- (- t_2 (* x2 2.0)) x1) t_0)))
        (t_5
         (+
          x1
          (+
           t_4
           (+
            x1
            (+
             t_1
             (+
              (* 3.0 t_2)
              (*
               t_0
               (+
                (* (* x1 x1) (- (* 4.0 t_3) 6.0))
                (* (- t_3 3.0) (* 3.0 (* x1 2.0)))))))))))
        (t_6
         (+
          x1
          (+
           t_4
           (+
            x1
            (+
             t_1
             (+
              (* t_2 t_3)
              (* t_0 (* 4.0 (* x1 (* x2 (- (* x2 2.0) 3.0))))))))))))
   (if (<= x1 -16000.0)
     t_5
     (if (<= x1 -1.25e-232)
       t_6
       (if (<= x1 6.8e-252)
         (+ x1 (+ t_4 (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
         (if (<= x1 195.0)
           t_6
           (if (<= x1 5.5e+144)
             t_5
             (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))))
double code(double x1, double x2) {
	double t_0 = (x1 * x1) + 1.0;
	double t_1 = x1 * (x1 * x1);
	double t_2 = x1 * (x1 * 3.0);
	double t_3 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
	double t_4 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
	double t_5 = x1 + (t_4 + (x1 + (t_1 + ((3.0 * t_2) + (t_0 * (((x1 * x1) * ((4.0 * t_3) - 6.0)) + ((t_3 - 3.0) * (3.0 * (x1 * 2.0)))))))));
	double t_6 = x1 + (t_4 + (x1 + (t_1 + ((t_2 * t_3) + (t_0 * (4.0 * (x1 * (x2 * ((x2 * 2.0) - 3.0)))))))));
	double tmp;
	if (x1 <= -16000.0) {
		tmp = t_5;
	} else if (x1 <= -1.25e-232) {
		tmp = t_6;
	} else if (x1 <= 6.8e-252) {
		tmp = x1 + (t_4 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 195.0) {
		tmp = t_6;
	} else if (x1 <= 5.5e+144) {
		tmp = t_5;
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: tmp
    t_0 = (x1 * x1) + 1.0d0
    t_1 = x1 * (x1 * x1)
    t_2 = x1 * (x1 * 3.0d0)
    t_3 = ((t_2 + (x2 * 2.0d0)) - x1) / t_0
    t_4 = 3.0d0 * (((t_2 - (x2 * 2.0d0)) - x1) / t_0)
    t_5 = x1 + (t_4 + (x1 + (t_1 + ((3.0d0 * t_2) + (t_0 * (((x1 * x1) * ((4.0d0 * t_3) - 6.0d0)) + ((t_3 - 3.0d0) * (3.0d0 * (x1 * 2.0d0)))))))))
    t_6 = x1 + (t_4 + (x1 + (t_1 + ((t_2 * t_3) + (t_0 * (4.0d0 * (x1 * (x2 * ((x2 * 2.0d0) - 3.0d0)))))))))
    if (x1 <= (-16000.0d0)) then
        tmp = t_5
    else if (x1 <= (-1.25d-232)) then
        tmp = t_6
    else if (x1 <= 6.8d-252) then
        tmp = x1 + (t_4 + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
    else if (x1 <= 195.0d0) then
        tmp = t_6
    else if (x1 <= 5.5d+144) then
        tmp = t_5
    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 * x1) + 1.0;
	double t_1 = x1 * (x1 * x1);
	double t_2 = x1 * (x1 * 3.0);
	double t_3 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
	double t_4 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
	double t_5 = x1 + (t_4 + (x1 + (t_1 + ((3.0 * t_2) + (t_0 * (((x1 * x1) * ((4.0 * t_3) - 6.0)) + ((t_3 - 3.0) * (3.0 * (x1 * 2.0)))))))));
	double t_6 = x1 + (t_4 + (x1 + (t_1 + ((t_2 * t_3) + (t_0 * (4.0 * (x1 * (x2 * ((x2 * 2.0) - 3.0)))))))));
	double tmp;
	if (x1 <= -16000.0) {
		tmp = t_5;
	} else if (x1 <= -1.25e-232) {
		tmp = t_6;
	} else if (x1 <= 6.8e-252) {
		tmp = x1 + (t_4 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 195.0) {
		tmp = t_6;
	} else if (x1 <= 5.5e+144) {
		tmp = t_5;
	} else {
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x1 * x1) + 1.0
	t_1 = x1 * (x1 * x1)
	t_2 = x1 * (x1 * 3.0)
	t_3 = ((t_2 + (x2 * 2.0)) - x1) / t_0
	t_4 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0)
	t_5 = x1 + (t_4 + (x1 + (t_1 + ((3.0 * t_2) + (t_0 * (((x1 * x1) * ((4.0 * t_3) - 6.0)) + ((t_3 - 3.0) * (3.0 * (x1 * 2.0)))))))))
	t_6 = x1 + (t_4 + (x1 + (t_1 + ((t_2 * t_3) + (t_0 * (4.0 * (x1 * (x2 * ((x2 * 2.0) - 3.0)))))))))
	tmp = 0
	if x1 <= -16000.0:
		tmp = t_5
	elif x1 <= -1.25e-232:
		tmp = t_6
	elif x1 <= 6.8e-252:
		tmp = x1 + (t_4 + (x1 + (4.0 * (x1 * (x2 * -3.0)))))
	elif x1 <= 195.0:
		tmp = t_6
	elif x1 <= 5.5e+144:
		tmp = t_5
	else:
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x1 * x1) + 1.0)
	t_1 = Float64(x1 * Float64(x1 * x1))
	t_2 = Float64(x1 * Float64(x1 * 3.0))
	t_3 = Float64(Float64(Float64(t_2 + Float64(x2 * 2.0)) - x1) / t_0)
	t_4 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(x2 * 2.0)) - x1) / t_0))
	t_5 = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_1 + Float64(Float64(3.0 * t_2) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)) + Float64(Float64(t_3 - 3.0) * Float64(3.0 * Float64(x1 * 2.0))))))))))
	t_6 = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * t_3) + Float64(t_0 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))))))))))
	tmp = 0.0
	if (x1 <= -16000.0)
		tmp = t_5;
	elseif (x1 <= -1.25e-232)
		tmp = t_6;
	elseif (x1 <= 6.8e-252)
		tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0))))));
	elseif (x1 <= 195.0)
		tmp = t_6;
	elseif (x1 <= 5.5e+144)
		tmp = t_5;
	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 * x1) + 1.0;
	t_1 = x1 * (x1 * x1);
	t_2 = x1 * (x1 * 3.0);
	t_3 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
	t_4 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
	t_5 = x1 + (t_4 + (x1 + (t_1 + ((3.0 * t_2) + (t_0 * (((x1 * x1) * ((4.0 * t_3) - 6.0)) + ((t_3 - 3.0) * (3.0 * (x1 * 2.0)))))))));
	t_6 = x1 + (t_4 + (x1 + (t_1 + ((t_2 * t_3) + (t_0 * (4.0 * (x1 * (x2 * ((x2 * 2.0) - 3.0)))))))));
	tmp = 0.0;
	if (x1 <= -16000.0)
		tmp = t_5;
	elseif (x1 <= -1.25e-232)
		tmp = t_6;
	elseif (x1 <= 6.8e-252)
		tmp = x1 + (t_4 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	elseif (x1 <= 195.0)
		tmp = t_6;
	elseif (x1 <= 5.5e+144)
		tmp = t_5;
	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[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$2 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$1 + N[(N[(3.0 * t$95$2), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(3.0 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -16000.0], t$95$5, If[LessEqual[x1, -1.25e-232], t$95$6, If[LessEqual[x1, 6.8e-252], N[(x1 + N[(t$95$4 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 195.0], t$95$6, If[LessEqual[x1, 5.5e+144], t$95$5, 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 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t_2 + x2 \cdot 2\right) - x1}{t_0}\\
t_4 := 3 \cdot \frac{\left(t_2 - x2 \cdot 2\right) - x1}{t_0}\\
t_5 := x1 + \left(t_4 + \left(x1 + \left(t_1 + \left(3 \cdot t_2 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right) + \left(t_3 - 3\right) \cdot \left(3 \cdot \left(x1 \cdot 2\right)\right)\right)\right)\right)\right)\right)\\
t_6 := x1 + \left(t_4 + \left(x1 + \left(t_1 + \left(t_2 \cdot t_3 + t_0 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -16000:\\
\;\;\;\;t_5\\

\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{-232}:\\
\;\;\;\;t_6\\

\mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-252}:\\
\;\;\;\;x1 + \left(t_4 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 195:\\
\;\;\;\;t_6\\

\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;t_5\\

\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 < -16000 or 195 < x1 < 5.50000000000000022e144

    1. Initial program 62.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 inf 62.8%

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

    if -16000 < x1 < -1.25e-232 or 6.7999999999999999e-252 < x1 < 195

    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 98.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 \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 86.5%

      \[\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.25e-232 < x1 < 6.7999999999999999e-252

    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 75.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 94.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. *-commutative94.3%

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

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

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

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

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. flip-+75.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-rr75.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-sqr75.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-eval75.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -16000:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \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(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} - 6\right) + \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(3 \cdot \left(x1 \cdot 2\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -1.25 \cdot 10^{-232}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\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) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-252}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 195:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\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) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \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(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} - 6\right) + \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(3 \cdot \left(x1 \cdot 2\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 10: 64.1% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x2 \cdot 2 - x1\\ t_2 := x2 \cdot \left(x2 \cdot 2 - 3\right)\\ t_3 := x1 \cdot \left(x1 \cdot x1\right)\\ t_4 := x1 \cdot \left(x1 \cdot 3\right)\\ t_5 := 3 \cdot \frac{\left(t_4 - x2 \cdot 2\right) - x1}{t_0}\\ t_6 := \frac{\left(t_4 + x2 \cdot 2\right) - x1}{t_0}\\ t_7 := t_4 \cdot t_6\\ t_8 := x1 + \left(t_5 + \left(x1 + \left(t_3 + \left(3 \cdot t_4 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_6\right) \cdot \left(t_6 - 3\right) + x2 \cdot 8\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -7.6 \cdot 10^{+61}:\\ \;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_3 + \left(t_7 + t_0 \cdot \left(\left(3 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t_1 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_1 - 6\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -210000:\\ \;\;\;\;t_8\\ \mathbf{elif}\;x1 \leq -5.5 \cdot 10^{-236}:\\ \;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_3 + \left(t_7 + t_0 \cdot \left(4 \cdot \left(x1 \cdot t_2\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\ \;\;\;\;x1 + \left(t_5 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 8.4 \cdot 10^{-74}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_2 - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+144}:\\ \;\;\;\;t_8\\ \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 x1) 1.0))
        (t_1 (- (* x2 2.0) x1))
        (t_2 (* x2 (- (* x2 2.0) 3.0)))
        (t_3 (* x1 (* x1 x1)))
        (t_4 (* x1 (* x1 3.0)))
        (t_5 (* 3.0 (/ (- (- t_4 (* x2 2.0)) x1) t_0)))
        (t_6 (/ (- (+ t_4 (* x2 2.0)) x1) t_0))
        (t_7 (* t_4 t_6))
        (t_8
         (+
          x1
          (+
           t_5
           (+
            x1
            (+
             t_3
             (+
              (* 3.0 t_4)
              (* t_0 (+ (* (* (* x1 2.0) t_6) (- t_6 3.0)) (* x2 8.0))))))))))
   (if (<= x1 -7.6e+61)
     (+
      x1
      (+
       t_5
       (+
        x1
        (+
         t_3
         (+
          t_7
          (*
           t_0
           (+
            (* (* 3.0 (* x1 2.0)) (- t_1 3.0))
            (* (* x1 x1) (- (* 4.0 t_1) 6.0)))))))))
     (if (<= x1 -210000.0)
       t_8
       (if (<= x1 -5.5e-236)
         (+ x1 (+ t_5 (+ x1 (+ t_3 (+ t_7 (* t_0 (* 4.0 (* x1 t_2))))))))
         (if (<= x1 6.8e-251)
           (+ x1 (+ t_5 (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
           (if (<= x1 8.4e-74)
             (+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 t_2) 2.0))))
             (if (<= x1 3.5e+144)
               t_8
               (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))))
double code(double x1, double x2) {
	double t_0 = (x1 * x1) + 1.0;
	double t_1 = (x2 * 2.0) - x1;
	double t_2 = x2 * ((x2 * 2.0) - 3.0);
	double t_3 = x1 * (x1 * x1);
	double t_4 = x1 * (x1 * 3.0);
	double t_5 = 3.0 * (((t_4 - (x2 * 2.0)) - x1) / t_0);
	double t_6 = ((t_4 + (x2 * 2.0)) - x1) / t_0;
	double t_7 = t_4 * t_6;
	double t_8 = x1 + (t_5 + (x1 + (t_3 + ((3.0 * t_4) + (t_0 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + (x2 * 8.0)))))));
	double tmp;
	if (x1 <= -7.6e+61) {
		tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (((3.0 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((4.0 * t_1) - 6.0))))))));
	} else if (x1 <= -210000.0) {
		tmp = t_8;
	} else if (x1 <= -5.5e-236) {
		tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (4.0 * (x1 * t_2)))))));
	} else if (x1 <= 6.8e-251) {
		tmp = x1 + (t_5 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 8.4e-74) {
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_2) - 2.0)));
	} else if (x1 <= 3.5e+144) {
		tmp = t_8;
	} 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) :: 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 = (x1 * x1) + 1.0d0
    t_1 = (x2 * 2.0d0) - x1
    t_2 = x2 * ((x2 * 2.0d0) - 3.0d0)
    t_3 = x1 * (x1 * x1)
    t_4 = x1 * (x1 * 3.0d0)
    t_5 = 3.0d0 * (((t_4 - (x2 * 2.0d0)) - x1) / t_0)
    t_6 = ((t_4 + (x2 * 2.0d0)) - x1) / t_0
    t_7 = t_4 * t_6
    t_8 = x1 + (t_5 + (x1 + (t_3 + ((3.0d0 * t_4) + (t_0 * ((((x1 * 2.0d0) * t_6) * (t_6 - 3.0d0)) + (x2 * 8.0d0)))))))
    if (x1 <= (-7.6d+61)) then
        tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (((3.0d0 * (x1 * 2.0d0)) * (t_1 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_1) - 6.0d0))))))))
    else if (x1 <= (-210000.0d0)) then
        tmp = t_8
    else if (x1 <= (-5.5d-236)) then
        tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (4.0d0 * (x1 * t_2)))))))
    else if (x1 <= 6.8d-251) then
        tmp = x1 + (t_5 + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
    else if (x1 <= 8.4d-74) then
        tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * t_2) - 2.0d0)))
    else if (x1 <= 3.5d+144) then
        tmp = t_8
    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 * x1) + 1.0;
	double t_1 = (x2 * 2.0) - x1;
	double t_2 = x2 * ((x2 * 2.0) - 3.0);
	double t_3 = x1 * (x1 * x1);
	double t_4 = x1 * (x1 * 3.0);
	double t_5 = 3.0 * (((t_4 - (x2 * 2.0)) - x1) / t_0);
	double t_6 = ((t_4 + (x2 * 2.0)) - x1) / t_0;
	double t_7 = t_4 * t_6;
	double t_8 = x1 + (t_5 + (x1 + (t_3 + ((3.0 * t_4) + (t_0 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + (x2 * 8.0)))))));
	double tmp;
	if (x1 <= -7.6e+61) {
		tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (((3.0 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((4.0 * t_1) - 6.0))))))));
	} else if (x1 <= -210000.0) {
		tmp = t_8;
	} else if (x1 <= -5.5e-236) {
		tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (4.0 * (x1 * t_2)))))));
	} else if (x1 <= 6.8e-251) {
		tmp = x1 + (t_5 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 8.4e-74) {
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_2) - 2.0)));
	} else if (x1 <= 3.5e+144) {
		tmp = t_8;
	} else {
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x1 * x1) + 1.0
	t_1 = (x2 * 2.0) - x1
	t_2 = x2 * ((x2 * 2.0) - 3.0)
	t_3 = x1 * (x1 * x1)
	t_4 = x1 * (x1 * 3.0)
	t_5 = 3.0 * (((t_4 - (x2 * 2.0)) - x1) / t_0)
	t_6 = ((t_4 + (x2 * 2.0)) - x1) / t_0
	t_7 = t_4 * t_6
	t_8 = x1 + (t_5 + (x1 + (t_3 + ((3.0 * t_4) + (t_0 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + (x2 * 8.0)))))))
	tmp = 0
	if x1 <= -7.6e+61:
		tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (((3.0 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((4.0 * t_1) - 6.0))))))))
	elif x1 <= -210000.0:
		tmp = t_8
	elif x1 <= -5.5e-236:
		tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (4.0 * (x1 * t_2)))))))
	elif x1 <= 6.8e-251:
		tmp = x1 + (t_5 + (x1 + (4.0 * (x1 * (x2 * -3.0)))))
	elif x1 <= 8.4e-74:
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_2) - 2.0)))
	elif x1 <= 3.5e+144:
		tmp = t_8
	else:
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x1 * x1) + 1.0)
	t_1 = Float64(Float64(x2 * 2.0) - x1)
	t_2 = Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))
	t_3 = Float64(x1 * Float64(x1 * x1))
	t_4 = Float64(x1 * Float64(x1 * 3.0))
	t_5 = Float64(3.0 * Float64(Float64(Float64(t_4 - Float64(x2 * 2.0)) - x1) / t_0))
	t_6 = Float64(Float64(Float64(t_4 + Float64(x2 * 2.0)) - x1) / t_0)
	t_7 = Float64(t_4 * t_6)
	t_8 = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_3 + Float64(Float64(3.0 * t_4) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(t_6 - 3.0)) + Float64(x2 * 8.0))))))))
	tmp = 0.0
	if (x1 <= -7.6e+61)
		tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_3 + Float64(t_7 + Float64(t_0 * Float64(Float64(Float64(3.0 * Float64(x1 * 2.0)) * Float64(t_1 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_1) - 6.0)))))))));
	elseif (x1 <= -210000.0)
		tmp = t_8;
	elseif (x1 <= -5.5e-236)
		tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_3 + Float64(t_7 + Float64(t_0 * Float64(4.0 * Float64(x1 * t_2))))))));
	elseif (x1 <= 6.8e-251)
		tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0))))));
	elseif (x1 <= 8.4e-74)
		tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * t_2) - 2.0))));
	elseif (x1 <= 3.5e+144)
		tmp = t_8;
	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 * x1) + 1.0;
	t_1 = (x2 * 2.0) - x1;
	t_2 = x2 * ((x2 * 2.0) - 3.0);
	t_3 = x1 * (x1 * x1);
	t_4 = x1 * (x1 * 3.0);
	t_5 = 3.0 * (((t_4 - (x2 * 2.0)) - x1) / t_0);
	t_6 = ((t_4 + (x2 * 2.0)) - x1) / t_0;
	t_7 = t_4 * t_6;
	t_8 = x1 + (t_5 + (x1 + (t_3 + ((3.0 * t_4) + (t_0 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + (x2 * 8.0)))))));
	tmp = 0.0;
	if (x1 <= -7.6e+61)
		tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (((3.0 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((4.0 * t_1) - 6.0))))))));
	elseif (x1 <= -210000.0)
		tmp = t_8;
	elseif (x1 <= -5.5e-236)
		tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (4.0 * (x1 * t_2)))))));
	elseif (x1 <= 6.8e-251)
		tmp = x1 + (t_5 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	elseif (x1 <= 8.4e-74)
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_2) - 2.0)));
	elseif (x1 <= 3.5e+144)
		tmp = t_8;
	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[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(N[(t$95$4 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$4 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$4 * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$3 + N[(N[(3.0 * t$95$4), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(t$95$6 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.6e+61], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$3 + N[(t$95$7 + N[(t$95$0 * N[(N[(N[(3.0 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$1), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -210000.0], t$95$8, If[LessEqual[x1, -5.5e-236], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$3 + N[(t$95$7 + N[(t$95$0 * N[(4.0 * N[(x1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.8e-251], N[(x1 + N[(t$95$5 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.4e-74], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * t$95$2), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.5e+144], t$95$8, 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 \cdot x1 + 1\\
t_1 := x2 \cdot 2 - x1\\
t_2 := x2 \cdot \left(x2 \cdot 2 - 3\right)\\
t_3 := x1 \cdot \left(x1 \cdot x1\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := 3 \cdot \frac{\left(t_4 - x2 \cdot 2\right) - x1}{t_0}\\
t_6 := \frac{\left(t_4 + x2 \cdot 2\right) - x1}{t_0}\\
t_7 := t_4 \cdot t_6\\
t_8 := x1 + \left(t_5 + \left(x1 + \left(t_3 + \left(3 \cdot t_4 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_6\right) \cdot \left(t_6 - 3\right) + x2 \cdot 8\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7.6 \cdot 10^{+61}:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_3 + \left(t_7 + t_0 \cdot \left(\left(3 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t_1 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_1 - 6\right)\right)\right)\right)\right)\right)\\

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

\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{-236}:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_3 + \left(t_7 + t_0 \cdot \left(4 \cdot \left(x1 \cdot t_2\right)\right)\right)\right)\right)\right)\\

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

\mathbf{elif}\;x1 \leq 8.4 \cdot 10^{-74}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_2 - 2\right)\right)\\

\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+144}:\\
\;\;\;\;t_8\\

\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 6 regimes
  2. if x1 < -7.5999999999999999e61

    1. Initial program 21.8%

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

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

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

    if -7.5999999999999999e61 < x1 < -2.1e5 or 8.4e-74 < x1 < 3.4999999999999998e144

    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 inf 91.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 \color{blue}{\left(\left(3 + 2 \cdot \frac{x2}{{x1}^{2}}\right) - \left(3 \cdot \frac{1}{{x1}^{2}} + \frac{1}{x1}\right)\right)} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x2 around inf 61.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) + \color{blue}{8 \cdot x2}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. *-commutative61.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) + \color{blue}{x2 \cdot 8}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Simplified61.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) + \color{blue}{x2 \cdot 8}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Taylor expanded in x1 around inf 61.7%

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

    if -2.1e5 < x1 < -5.49999999999999959e-236

    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 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 86.8%

      \[\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 -5.49999999999999959e-236 < x1 < 6.80000000000000034e-251

    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 75.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 94.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. *-commutative94.3%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(x1 \cdot \left(x2 \cdot -3\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 6.80000000000000034e-251 < x1 < 8.4e-74

    1. Initial program 99.1%

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

      \[\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.4999999999999998e144 < x1

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

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. flip-+75.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-rr75.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-sqr75.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-eval75.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -7.6 \cdot 10^{+61}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\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) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(3 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(\left(x2 \cdot 2 - x1\right) - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(x2 \cdot 2 - x1\right) - 6\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -210000:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \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) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + x2 \cdot 8\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -5.5 \cdot 10^{-236}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\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) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 8.4 \cdot 10^{-74}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+144}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \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) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + x2 \cdot 8\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.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\ \mathbf{if}\;x1 \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;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(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\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 (* x1 (* x1 3.0)))
        (t_1 (+ (* x1 x1) 1.0))
        (t_2 (/ (- (+ t_0 (* x2 2.0)) x1) t_1)))
   (if (<= x1 5.5e+144)
     (+
      x1
      (+
       (+
        x1
        (+
         (+
          (*
           t_1
           (+
            (* (* (* x1 2.0) t_2) (- t_2 3.0))
            (* (* x1 x1) (- (* 4.0 t_2) 6.0))))
          (* 3.0 t_0))
         (* x1 (* x1 x1))))
       (* 3.0 (- (* x2 -2.0) x1))))
     (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- 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 + (x2 * 2.0)) - x1) / t_1;
	double tmp;
	if (x1 <= 5.5e+144) {
		tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
	} 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) :: t_2
    real(8) :: tmp
    t_0 = x1 * (x1 * 3.0d0)
    t_1 = (x1 * x1) + 1.0d0
    t_2 = ((t_0 + (x2 * 2.0d0)) - x1) / t_1
    if (x1 <= 5.5d+144) then
        tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)))) + (3.0d0 * t_0)) + (x1 * (x1 * x1)))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
    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 * (x1 * 3.0);
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
	double tmp;
	if (x1 <= 5.5e+144) {
		tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (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 + (x2 * 2.0)) - x1) / t_1
	tmp = 0
	if x1 <= 5.5e+144:
		tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)))
	else:
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (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(x2 * 2.0)) - x1) / t_1)
	tmp = 0.0
	if (x1 <= 5.5e+144)
		tmp = 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(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_0)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1))));
	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 * (x1 * 3.0);
	t_1 = (x1 * x1) + 1.0;
	t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
	tmp = 0.0;
	if (x1 <= 5.5e+144)
		tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
	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[(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[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, 5.5e+144], 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[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $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 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;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(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\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 2 regimes
  2. if x1 < 5.50000000000000022e144

    1. Initial program 85.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 inf 83.9%

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

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

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

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

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

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

    if 5.50000000000000022e144 < x1

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

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. flip-+75.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-rr75.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-sqr75.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-eval75.9%

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

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

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

Alternative 12: 63.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := x1 \cdot x1 + 1\\ t_3 := 3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_2}\\ t_4 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_2}\\ \mathbf{if}\;x1 \leq -4.2 \cdot 10^{-234}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.36 \cdot 10^{-74}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+144}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \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) + x2 \cdot 8\right)\right)\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
         (+
          x1
          (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0)))))
        (t_1 (* x1 (* x1 3.0)))
        (t_2 (+ (* x1 x1) 1.0))
        (t_3 (* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_2)))
        (t_4 (/ (- (+ t_1 (* x2 2.0)) x1) t_2)))
   (if (<= x1 -4.2e-234)
     t_0
     (if (<= x1 6.8e-251)
       (+ x1 (+ t_3 (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
       (if (<= x1 1.36e-74)
         t_0
         (if (<= x1 3.5e+144)
           (+
            x1
            (+
             t_3
             (+
              x1
              (+
               (* x1 (* x1 x1))
               (+
                (* 3.0 t_1)
                (* t_2 (+ (* (* (* x1 2.0) t_4) (- t_4 3.0)) (* x2 8.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 * ((x2 * 2.0) - 3.0))) - 2.0)));
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2);
	double t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
	double tmp;
	if (x1 <= -4.2e-234) {
		tmp = t_0;
	} else if (x1 <= 6.8e-251) {
		tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 1.36e-74) {
		tmp = t_0;
	} else if (x1 <= 3.5e+144) {
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x2 * 8.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) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)))
    t_1 = x1 * (x1 * 3.0d0)
    t_2 = (x1 * x1) + 1.0d0
    t_3 = 3.0d0 * (((t_1 - (x2 * 2.0d0)) - x1) / t_2)
    t_4 = ((t_1 + (x2 * 2.0d0)) - x1) / t_2
    if (x1 <= (-4.2d-234)) then
        tmp = t_0
    else if (x1 <= 6.8d-251) then
        tmp = x1 + (t_3 + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
    else if (x1 <= 1.36d-74) then
        tmp = t_0
    else if (x1 <= 3.5d+144) then
        tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_2 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + (x2 * 8.0d0)))))))
    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 * ((x2 * 2.0) - 3.0))) - 2.0)));
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2);
	double t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
	double tmp;
	if (x1 <= -4.2e-234) {
		tmp = t_0;
	} else if (x1 <= 6.8e-251) {
		tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 1.36e-74) {
		tmp = t_0;
	} else if (x1 <= 3.5e+144) {
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x2 * 8.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 * ((x2 * 2.0) - 3.0))) - 2.0)))
	t_1 = x1 * (x1 * 3.0)
	t_2 = (x1 * x1) + 1.0
	t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2)
	t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2
	tmp = 0
	if x1 <= -4.2e-234:
		tmp = t_0
	elif x1 <= 6.8e-251:
		tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))))
	elif x1 <= 1.36e-74:
		tmp = t_0
	elif x1 <= 3.5e+144:
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x2 * 8.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(x2 * 2.0) - 3.0))) - 2.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(x2 * 2.0)) - x1) / t_2))
	t_4 = Float64(Float64(Float64(t_1 + Float64(x2 * 2.0)) - x1) / t_2)
	tmp = 0.0
	if (x1 <= -4.2e-234)
		tmp = t_0;
	elseif (x1 <= 6.8e-251)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0))))));
	elseif (x1 <= 1.36e-74)
		tmp = t_0;
	elseif (x1 <= 3.5e+144)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(x2 * 8.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 * ((x2 * 2.0) - 3.0))) - 2.0)));
	t_1 = x1 * (x1 * 3.0);
	t_2 = (x1 * x1) + 1.0;
	t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2);
	t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
	tmp = 0.0;
	if (x1 <= -4.2e-234)
		tmp = t_0;
	elseif (x1 <= 6.8e-251)
		tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	elseif (x1 <= 1.36e-74)
		tmp = t_0;
	elseif (x1 <= 3.5e+144)
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x2 * 8.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[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -4.2e-234], t$95$0, If[LessEqual[x1, 6.8e-251], N[(x1 + N[(t$95$3 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.36e-74], t$95$0, If[LessEqual[x1, 3.5e+144], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + 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[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_2}\\
t_4 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -4.2 \cdot 10^{-234}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;x1 \leq 1.36 \cdot 10^{-74}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \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) + x2 \cdot 8\right)\right)\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 4 regimes
  2. if x1 < -4.19999999999999982e-234 or 6.80000000000000034e-251 < x1 < 1.36000000000000006e-74

    1. Initial program 78.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 59.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 59.8%

      \[\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.19999999999999982e-234 < x1 < 6.80000000000000034e-251

    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 75.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 94.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. *-commutative94.3%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(x1 \cdot \left(x2 \cdot -3\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.36000000000000006e-74 < x1 < 3.4999999999999998e144

    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 inf 89.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 \color{blue}{\left(\left(3 + 2 \cdot \frac{x2}{{x1}^{2}}\right) - \left(3 \cdot \frac{1}{{x1}^{2}} + \frac{1}{x1}\right)\right)} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x2 around inf 66.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}{8 \cdot x2}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. *-commutative66.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}{x2 \cdot 8}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Simplified66.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}{x2 \cdot 8}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Taylor expanded in x1 around inf 66.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) + x2 \cdot 8\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \color{blue}{3}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]

    if 3.4999999999999998e144 < x1

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

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. flip-+75.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-rr75.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-sqr75.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-eval75.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -4.2 \cdot 10^{-234}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.36 \cdot 10^{-74}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+144}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \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) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + x2 \cdot 8\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: 77.2% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_1 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\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 (+ (* x1 x1) 1.0))
        (t_1 (* x1 (* x1 3.0)))
        (t_2 (/ (- (+ t_1 (* x2 2.0)) x1) t_0)))
   (if (<= x1 5.5e+144)
     (+
      x1
      (+
       (* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_0))
       (+
        x1
        (+
         (* x1 (* x1 x1))
         (+
          (* 3.0 t_1)
          (* t_0 (+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0))))))))
     (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
	double t_0 = (x1 * x1) + 1.0;
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0;
	double tmp;
	if (x1 <= 5.5e+144) {
		tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.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) :: t_2
    real(8) :: tmp
    t_0 = (x1 * x1) + 1.0d0
    t_1 = x1 * (x1 * 3.0d0)
    t_2 = ((t_1 + (x2 * 2.0d0)) - x1) / t_0
    if (x1 <= 5.5d+144) then
        tmp = x1 + ((3.0d0 * (((t_1 - (x2 * 2.0d0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
    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 * x1) + 1.0;
	double t_1 = x1 * (x1 * 3.0);
	double t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0;
	double tmp;
	if (x1 <= 5.5e+144) {
		tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
	} else {
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x1 * x1) + 1.0
	t_1 = x1 * (x1 * 3.0)
	t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0
	tmp = 0
	if x1 <= 5.5e+144:
		tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))))
	else:
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x1 * x1) + 1.0)
	t_1 = Float64(x1 * Float64(x1 * 3.0))
	t_2 = Float64(Float64(Float64(t_1 + Float64(x2 * 2.0)) - x1) / t_0)
	tmp = 0.0
	if (x1 <= 5.5e+144)
		tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.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 * x1) + 1.0;
	t_1 = x1 * (x1 * 3.0);
	t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0;
	tmp = 0.0;
	if (x1 <= 5.5e+144)
		tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.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[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, 5.5e+144], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$0 * 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] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_1 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\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 2 regimes
  2. if x1 < 5.50000000000000022e144

    1. Initial program 85.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 inf 83.9%

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

    if 5.50000000000000022e144 < x1

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

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. flip-+75.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-rr75.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-sqr75.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-eval75.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \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) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot 6\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: 64.1% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x2 \cdot \left(x2 \cdot 2 - 3\right)\\ t_2 := x1 \cdot x1 + 1\\ t_3 := 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_2}\\ \mathbf{if}\;x1 \leq -4.7 \cdot 10^{-233}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_1 - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 3.8 \cdot 10^{-251}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_2} + t_2 \cdot \left(4 \cdot \left(x1 \cdot t_1\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} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (* x1 3.0)))
        (t_1 (* x2 (- (* x2 2.0) 3.0)))
        (t_2 (+ (* x1 x1) 1.0))
        (t_3 (* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_2))))
   (if (<= x1 -4.7e-233)
     (+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 t_1) 2.0))))
     (if (<= x1 3.8e-251)
       (+ x1 (+ t_3 (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
       (if (<= x1 5.5e+144)
         (+
          x1
          (+
           t_3
           (+
            x1
            (+
             (* x1 (* x1 x1))
             (+
              (* t_0 (/ (- (+ t_0 (* x2 2.0)) x1) t_2))
              (* t_2 (* 4.0 (* x1 t_1))))))))
         (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 3.0);
	double t_1 = x2 * ((x2 * 2.0) - 3.0);
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2);
	double tmp;
	if (x1 <= -4.7e-233) {
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0)));
	} else if (x1 <= 3.8e-251) {
		tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 5.5e+144) {
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_0 + (x2 * 2.0)) - x1) / t_2)) + (t_2 * (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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = x1 * (x1 * 3.0d0)
    t_1 = x2 * ((x2 * 2.0d0) - 3.0d0)
    t_2 = (x1 * x1) + 1.0d0
    t_3 = 3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_2)
    if (x1 <= (-4.7d-233)) then
        tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * t_1) - 2.0d0)))
    else if (x1 <= 3.8d-251) then
        tmp = x1 + (t_3 + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
    else if (x1 <= 5.5d+144) then
        tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_0 + (x2 * 2.0d0)) - x1) / t_2)) + (t_2 * (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 = x1 * (x1 * 3.0);
	double t_1 = x2 * ((x2 * 2.0) - 3.0);
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2);
	double tmp;
	if (x1 <= -4.7e-233) {
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0)));
	} else if (x1 <= 3.8e-251) {
		tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 5.5e+144) {
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_0 + (x2 * 2.0)) - x1) / t_2)) + (t_2 * (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 = x1 * (x1 * 3.0)
	t_1 = x2 * ((x2 * 2.0) - 3.0)
	t_2 = (x1 * x1) + 1.0
	t_3 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2)
	tmp = 0
	if x1 <= -4.7e-233:
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0)))
	elif x1 <= 3.8e-251:
		tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))))
	elif x1 <= 5.5e+144:
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_0 + (x2 * 2.0)) - x1) / t_2)) + (t_2 * (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(x1 * Float64(x1 * 3.0))
	t_1 = Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))
	t_2 = Float64(Float64(x1 * x1) + 1.0)
	t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_2))
	tmp = 0.0
	if (x1 <= -4.7e-233)
		tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * t_1) - 2.0))));
	elseif (x1 <= 3.8e-251)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0))))));
	elseif (x1 <= 5.5e+144)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(t_0 + Float64(x2 * 2.0)) - x1) / t_2)) + Float64(t_2 * 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 = x1 * (x1 * 3.0);
	t_1 = x2 * ((x2 * 2.0) - 3.0);
	t_2 = (x1 * x1) + 1.0;
	t_3 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2);
	tmp = 0.0;
	if (x1 <= -4.7e-233)
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0)));
	elseif (x1 <= 3.8e-251)
		tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	elseif (x1 <= 5.5e+144)
		tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_0 + (x2 * 2.0)) - x1) / t_2)) + (t_2 * (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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 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$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.7e-233], 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, 3.8e-251], N[(x1 + N[(t$95$3 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.5e+144], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(t$95$0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(4.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x2 \cdot \left(x2 \cdot 2 - 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -4.7 \cdot 10^{-233}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_1 - 2\right)\right)\\

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

\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_2} + t_2 \cdot \left(4 \cdot \left(x1 \cdot t_1\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}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x1 < -4.6999999999999996e-233

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

      \[\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.6999999999999996e-233 < x1 < 3.7999999999999997e-251

    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 75.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 94.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. *-commutative94.3%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(x1 \cdot \left(x2 \cdot -3\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.7999999999999997e-251 < x1 < 5.50000000000000022e144

    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 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 \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 70.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 5.50000000000000022e144 < x1

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

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. flip-+75.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-rr75.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-sqr75.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-eval75.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -4.7 \cdot 10^{-233}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 3.8 \cdot 10^{-251}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\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) + x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 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: 63.6% accurate, 3.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1}\\ \mathbf{if}\;x1 \leq -1.8 \cdot 10^{-233}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\ \;\;\;\;x1 + \left(t_0 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.32 \cdot 10^{+93}:\\ \;\;\;\;x1 + \left(t_0 + \left(x1 + 4 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;x1 + \left(t_0 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + x2 \cdot 8\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)) (* x2 2.0)) x1) (+ (* x1 x1) 1.0)))))
   (if (<= x1 -1.8e-233)
     (+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0))))
     (if (<= x1 6.8e-251)
       (+ x1 (+ t_0 (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
       (if (<= x1 1.32e+93)
         (+ x1 (+ t_0 (+ x1 (* 4.0 (* (* x1 2.0) (* x2 x2))))))
         (if (<= x1 5.5e+144)
           (+ x1 (+ t_0 (+ x1 (+ (* x1 (* x1 x1)) (* x2 8.0)))))
           (/ (- (* 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)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0));
	double tmp;
	if (x1 <= -1.8e-233) {
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
	} else if (x1 <= 6.8e-251) {
		tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 1.32e+93) {
		tmp = x1 + (t_0 + (x1 + (4.0 * ((x1 * 2.0) * (x2 * x2)))));
	} else if (x1 <= 5.5e+144) {
		tmp = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + (x2 * 8.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 = 3.0d0 * ((((x1 * (x1 * 3.0d0)) - (x2 * 2.0d0)) - x1) / ((x1 * x1) + 1.0d0))
    if (x1 <= (-1.8d-233)) then
        tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)))
    else if (x1 <= 6.8d-251) then
        tmp = x1 + (t_0 + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
    else if (x1 <= 1.32d+93) then
        tmp = x1 + (t_0 + (x1 + (4.0d0 * ((x1 * 2.0d0) * (x2 * x2)))))
    else if (x1 <= 5.5d+144) then
        tmp = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + (x2 * 8.0d0))))
    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)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0));
	double tmp;
	if (x1 <= -1.8e-233) {
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
	} else if (x1 <= 6.8e-251) {
		tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 1.32e+93) {
		tmp = x1 + (t_0 + (x1 + (4.0 * ((x1 * 2.0) * (x2 * x2)))));
	} else if (x1 <= 5.5e+144) {
		tmp = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + (x2 * 8.0))));
	} 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)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))
	tmp = 0
	if x1 <= -1.8e-233:
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)))
	elif x1 <= 6.8e-251:
		tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * -3.0)))))
	elif x1 <= 1.32e+93:
		tmp = x1 + (t_0 + (x1 + (4.0 * ((x1 * 2.0) * (x2 * x2)))))
	elif x1 <= 5.5e+144:
		tmp = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + (x2 * 8.0))))
	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(x2 * 2.0)) - x1) / Float64(Float64(x1 * x1) + 1.0)))
	tmp = 0.0
	if (x1 <= -1.8e-233)
		tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0))));
	elseif (x1 <= 6.8e-251)
		tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0))))));
	elseif (x1 <= 1.32e+93)
		tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(4.0 * Float64(Float64(x1 * 2.0) * Float64(x2 * x2))))));
	elseif (x1 <= 5.5e+144)
		tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(x2 * 8.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 = 3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0));
	tmp = 0.0;
	if (x1 <= -1.8e-233)
		tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
	elseif (x1 <= 6.8e-251)
		tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	elseif (x1 <= 1.32e+93)
		tmp = x1 + (t_0 + (x1 + (4.0 * ((x1 * 2.0) * (x2 * x2)))));
	elseif (x1 <= 5.5e+144)
		tmp = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + (x2 * 8.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[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.8e-233], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.8e-251], N[(x1 + N[(t$95$0 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.32e+93], N[(x1 + N[(t$95$0 + N[(x1 + N[(4.0 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.5e+144], N[(x1 + N[(t$95$0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $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) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1}\\
\mathbf{if}\;x1 \leq -1.8 \cdot 10^{-233}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\

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

\mathbf{elif}\;x1 \leq 1.32 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + 4 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot x2\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + x2 \cdot 8\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 < -1.80000000000000004e-233

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

      \[\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.80000000000000004e-233 < x1 < 6.80000000000000034e-251

    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 75.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 94.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. *-commutative94.3%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(x1 \cdot \left(x2 \cdot -3\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 6.80000000000000034e-251 < x1 < 1.3199999999999999e93

    1. Initial program 99.1%

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(2 \cdot \left(x1 \cdot {x2}^{2}\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. *-commutative69.1%

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(\color{blue}{\left({x2}^{2} \cdot x1\right)} \cdot 2\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. associate-*l*69.1%

        \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left({x2}^{2} \cdot \left(x1 \cdot 2\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. unpow269.1%

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

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

      \[\leadsto x1 + \left(\left(4 \cdot \color{blue}{\left(\left(x2 \cdot x2\right) \cdot \left(2 \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.3199999999999999e93 < x1 < 5.50000000000000022e144

    1. Initial program 100.0%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Taylor expanded in x1 around inf 100.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 \color{blue}{\left(\left(3 + 2 \cdot \frac{x2}{{x1}^{2}}\right) - \left(3 \cdot \frac{1}{{x1}^{2}} + \frac{1}{x1}\right)\right)} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x2 around inf 68.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}{8 \cdot x2}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. *-commutative68.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}{x2 \cdot 8}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Simplified68.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}{x2 \cdot 8}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Taylor expanded in x1 around 0 84.9%

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

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

      \[\leadsto x1 + \left(\left(\left(\color{blue}{x2 \cdot 8} + \left(x1 \cdot x1\right) \cdot x1\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.50000000000000022e144 < x1

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

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    6. Step-by-step derivation
      1. flip-+75.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-rr75.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-sqr75.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-eval75.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.8 \cdot 10^{-233}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.32 \cdot 10^{+93}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + x2 \cdot 8\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 16: 61.2% accurate, 3.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \mathbf{if}\;x1 \leq -7.5 \cdot 10^{-233}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\ \;\;\;\;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 (- (* x2 2.0) 3.0))) 2.0))))))
   (if (<= x1 -7.5e-233)
     t_0
     (if (<= x1 6.8e-251)
       (+
        x1
        (+
         (* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* x2 2.0)) x1) (+ (* x1 x1) 1.0)))
         (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
       (if (<= x1 3.05e+168)
         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 * ((x2 * 2.0) - 3.0))) - 2.0)));
	double tmp;
	if (x1 <= -7.5e-233) {
		tmp = t_0;
	} else if (x1 <= 6.8e-251) {
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 3.05e+168) {
		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 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)))
    if (x1 <= (-7.5d-233)) then
        tmp = t_0
    else if (x1 <= 6.8d-251) then
        tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (x2 * 2.0d0)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
    else if (x1 <= 3.05d+168) 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 * ((x2 * 2.0) - 3.0))) - 2.0)));
	double tmp;
	if (x1 <= -7.5e-233) {
		tmp = t_0;
	} else if (x1 <= 6.8e-251) {
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	} else if (x1 <= 3.05e+168) {
		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 * ((x2 * 2.0) - 3.0))) - 2.0)))
	tmp = 0
	if x1 <= -7.5e-233:
		tmp = t_0
	elif x1 <= 6.8e-251:
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * -3.0)))))
	elif x1 <= 3.05e+168:
		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(x2 * 2.0) - 3.0))) - 2.0))))
	tmp = 0.0
	if (x1 <= -7.5e-233)
		tmp = t_0;
	elseif (x1 <= 6.8e-251)
		tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x2 * 2.0)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0))))));
	elseif (x1 <= 3.05e+168)
		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 * ((x2 * 2.0) - 3.0))) - 2.0)));
	tmp = 0.0;
	if (x1 <= -7.5e-233)
		tmp = t_0;
	elseif (x1 <= 6.8e-251)
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
	elseif (x1 <= 3.05e+168)
		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[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e-233], t$95$0, If[LessEqual[x1, 6.8e-251], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.05e+168], 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(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{-233}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\
\;\;\;\;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 < -7.49999999999999974e-233 or 6.80000000000000034e-251 < x1 < 3.0500000000000001e168

    1. Initial program 81.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 53.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 54.8%

      \[\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 -7.49999999999999974e-233 < x1 < 6.80000000000000034e-251

    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 75.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 94.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. *-commutative94.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -7.5 \cdot 10^{-233}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 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 17: 59.8% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \mathbf{if}\;x1 \leq -1.3 \cdot 10^{-234}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq -1.02 \cdot 10^{-286}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\ \;\;\;\;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 (- (* x2 2.0) 3.0))) 2.0))))))
   (if (<= x1 -1.3e-234)
     t_0
     (if (<= x1 -1.02e-286)
       (* x2 -6.0)
       (if (<= x1 3.05e+168)
         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 * ((x2 * 2.0) - 3.0))) - 2.0)));
	double tmp;
	if (x1 <= -1.3e-234) {
		tmp = t_0;
	} else if (x1 <= -1.02e-286) {
		tmp = x2 * -6.0;
	} else if (x1 <= 3.05e+168) {
		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 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)))
    if (x1 <= (-1.3d-234)) then
        tmp = t_0
    else if (x1 <= (-1.02d-286)) then
        tmp = x2 * (-6.0d0)
    else if (x1 <= 3.05d+168) 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 * ((x2 * 2.0) - 3.0))) - 2.0)));
	double tmp;
	if (x1 <= -1.3e-234) {
		tmp = t_0;
	} else if (x1 <= -1.02e-286) {
		tmp = x2 * -6.0;
	} else if (x1 <= 3.05e+168) {
		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 * ((x2 * 2.0) - 3.0))) - 2.0)))
	tmp = 0
	if x1 <= -1.3e-234:
		tmp = t_0
	elif x1 <= -1.02e-286:
		tmp = x2 * -6.0
	elif x1 <= 3.05e+168:
		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(x2 * 2.0) - 3.0))) - 2.0))))
	tmp = 0.0
	if (x1 <= -1.3e-234)
		tmp = t_0;
	elseif (x1 <= -1.02e-286)
		tmp = Float64(x2 * -6.0);
	elseif (x1 <= 3.05e+168)
		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 * ((x2 * 2.0) - 3.0))) - 2.0)));
	tmp = 0.0;
	if (x1 <= -1.3e-234)
		tmp = t_0;
	elseif (x1 <= -1.02e-286)
		tmp = x2 * -6.0;
	elseif (x1 <= 3.05e+168)
		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[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.3e-234], t$95$0, If[LessEqual[x1, -1.02e-286], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 3.05e+168], 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(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -1.3 \cdot 10^{-234}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x1 \leq -1.02 \cdot 10^{-286}:\\
\;\;\;\;x2 \cdot -6\\

\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\
\;\;\;\;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 < -1.29999999999999995e-234 or -1.01999999999999996e-286 < x1 < 3.0500000000000001e168

    1. Initial program 83.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 57.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 x1 around 0 58.0%

      \[\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.29999999999999995e-234 < x1 < -1.01999999999999996e-286

    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 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 87.1%

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

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

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

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

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

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

    if 3.0500000000000001e168 < 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 10.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.3 \cdot 10^{-234}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \mathbf{elif}\;x1 \leq -1.02 \cdot 10^{-286}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 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 18: 43.4% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\ \mathbf{if}\;x1 \leq -7.5 \cdot 10^{-143}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-86}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\ \;\;\;\;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 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* x2 2.0) 3.0))))))))
   (if (<= x1 -7.5e-143)
     t_0
     (if (<= x1 2.45e-86)
       (* x2 -6.0)
       (if (<= x1 3.05e+168)
         t_0
         (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
	double t_0 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
	double tmp;
	if (x1 <= -7.5e-143) {
		tmp = t_0;
	} else if (x1 <= 2.45e-86) {
		tmp = x2 * -6.0;
	} else if (x1 <= 3.05e+168) {
		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 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0)))))
    if (x1 <= (-7.5d-143)) then
        tmp = t_0
    else if (x1 <= 2.45d-86) then
        tmp = x2 * (-6.0d0)
    else if (x1 <= 3.05d+168) 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 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
	double tmp;
	if (x1 <= -7.5e-143) {
		tmp = t_0;
	} else if (x1 <= 2.45e-86) {
		tmp = x2 * -6.0;
	} else if (x1 <= 3.05e+168) {
		tmp = t_0;
	} else {
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))))
	tmp = 0
	if x1 <= -7.5e-143:
		tmp = t_0
	elif x1 <= 2.45e-86:
		tmp = x2 * -6.0
	elif x1 <= 3.05e+168:
		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(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))))))
	tmp = 0.0
	if (x1 <= -7.5e-143)
		tmp = t_0;
	elseif (x1 <= 2.45e-86)
		tmp = Float64(x2 * -6.0);
	elseif (x1 <= 3.05e+168)
		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 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
	tmp = 0.0;
	if (x1 <= -7.5e-143)
		tmp = t_0;
	elseif (x1 <= 2.45e-86)
		tmp = x2 * -6.0;
	elseif (x1 <= 3.05e+168)
		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[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e-143], t$95$0, If[LessEqual[x1, 2.45e-86], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 3.05e+168], 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 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{-143}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-86}:\\
\;\;\;\;x2 \cdot -6\\

\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\
\;\;\;\;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 < -7.5000000000000003e-143 or 2.44999999999999986e-86 < x1 < 3.0500000000000001e168

    1. Initial program 75.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.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 x1 around inf 25.9%

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

    if -7.5000000000000003e-143 < x1 < 2.44999999999999986e-86

    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 80.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 66.5%

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

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

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

      \[\leadsto \color{blue}{-6 \cdot x2} \]
    7. Step-by-step derivation
      1. *-commutative66.8%

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

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

    if 3.0500000000000001e168 < 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 10.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -7.5 \cdot 10^{-143}:\\ \;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-86}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\ \;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 19: 43.7% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\ \mathbf{if}\;x1 \leq -7.5 \cdot 10^{-143}:\\ \;\;\;\;x1 + \left(9 + t_0\right)\\ \mathbf{elif}\;x1 \leq 3.15 \cdot 10^{-86}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\ \;\;\;\;x1 + 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 (+ 1.0 (* 4.0 (* x2 (- (* x2 2.0) 3.0)))))))
   (if (<= x1 -7.5e-143)
     (+ x1 (+ 9.0 t_0))
     (if (<= x1 3.15e-86)
       (* x2 -6.0)
       (if (<= x1 3.05e+168)
         (+ x1 t_0)
         (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
	double t_0 = x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))));
	double tmp;
	if (x1 <= -7.5e-143) {
		tmp = x1 + (9.0 + t_0);
	} else if (x1 <= 3.15e-86) {
		tmp = x2 * -6.0;
	} else if (x1 <= 3.05e+168) {
		tmp = x1 + 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 * (1.0d0 + (4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))))
    if (x1 <= (-7.5d-143)) then
        tmp = x1 + (9.0d0 + t_0)
    else if (x1 <= 3.15d-86) then
        tmp = x2 * (-6.0d0)
    else if (x1 <= 3.05d+168) then
        tmp = x1 + 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 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))));
	double tmp;
	if (x1 <= -7.5e-143) {
		tmp = x1 + (9.0 + t_0);
	} else if (x1 <= 3.15e-86) {
		tmp = x2 * -6.0;
	} else if (x1 <= 3.05e+168) {
		tmp = x1 + t_0;
	} else {
		tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))
	tmp = 0
	if x1 <= -7.5e-143:
		tmp = x1 + (9.0 + t_0)
	elif x1 <= 3.15e-86:
		tmp = x2 * -6.0
	elif x1 <= 3.05e+168:
		tmp = x1 + 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(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0)))))
	tmp = 0.0
	if (x1 <= -7.5e-143)
		tmp = Float64(x1 + Float64(9.0 + t_0));
	elseif (x1 <= 3.15e-86)
		tmp = Float64(x2 * -6.0);
	elseif (x1 <= 3.05e+168)
		tmp = Float64(x1 + 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 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))));
	tmp = 0.0;
	if (x1 <= -7.5e-143)
		tmp = x1 + (9.0 + t_0);
	elseif (x1 <= 3.15e-86)
		tmp = x2 * -6.0;
	elseif (x1 <= 3.05e+168)
		tmp = x1 + 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[(1.0 + N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e-143], N[(x1 + N[(9.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.15e-86], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 3.05e+168], N[(x1 + t$95$0), $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 := x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{-143}:\\
\;\;\;\;x1 + \left(9 + t_0\right)\\

\mathbf{elif}\;x1 \leq 3.15 \cdot 10^{-86}:\\
\;\;\;\;x2 \cdot -6\\

\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\
\;\;\;\;x1 + 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 < -7.5000000000000003e-143

    1. Initial program 64.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 42.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 inf 19.9%

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

    if -7.5000000000000003e-143 < x1 < 3.15e-86

    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 80.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 66.5%

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

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

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

      \[\leadsto \color{blue}{-6 \cdot x2} \]
    7. Step-by-step derivation
      1. *-commutative66.8%

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

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

    if 3.15e-86 < x1 < 3.0500000000000001e168

    1. Initial program 93.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 41.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 inf 38.5%

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

    if 3.0500000000000001e168 < 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 10.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -7.5 \cdot 10^{-143}:\\ \;\;\;\;x1 + \left(9 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 3.15 \cdot 10^{-86}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\ \;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]

Alternative 20: 40.0% accurate, 6.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.9 \cdot 10^{-143} \lor \neg \left(x1 \leq 2.6 \cdot 10^{-86}\right):\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < -6.89999999999999989e-143 or 2.6000000000000001e-86 < x1

    1. Initial program 64.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 35.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 inf 28.6%

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

    if -6.89999999999999989e-143 < x1 < 2.6000000000000001e-86

    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 80.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 66.5%

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

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

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

      \[\leadsto \color{blue}{-6 \cdot x2} \]
    7. Step-by-step derivation
      1. *-commutative66.8%

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

      \[\leadsto \color{blue}{x2 \cdot -6} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -6.9 \cdot 10^{-143} \lor \neg \left(x1 \leq 2.6 \cdot 10^{-86}\right):\\ \;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6\\ \end{array} \]

Alternative 21: 40.0% accurate, 9.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.9 \cdot 10^{-143} \lor \neg \left(x1 \leq 2.65 \cdot 10^{-86}\right):\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\

\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < -6.89999999999999989e-143 or 2.6499999999999998e-86 < x1

    1. Initial program 64.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 35.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 x2 around inf 28.6%

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

        \[\leadsto x1 + \color{blue}{\left(x1 \cdot {x2}^{2}\right) \cdot 8} \]
      2. *-commutative28.6%

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

        \[\leadsto x1 + \color{blue}{{x2}^{2} \cdot \left(x1 \cdot 8\right)} \]
      4. unpow228.6%

        \[\leadsto x1 + \color{blue}{\left(x2 \cdot x2\right)} \cdot \left(x1 \cdot 8\right) \]
    5. Simplified28.6%

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

    if -6.89999999999999989e-143 < x1 < 2.6499999999999998e-86

    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 80.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 66.5%

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

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

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

      \[\leadsto \color{blue}{-6 \cdot x2} \]
    7. Step-by-step derivation
      1. *-commutative66.8%

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

      \[\leadsto \color{blue}{x2 \cdot -6} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -6.9 \cdot 10^{-143} \lor \neg \left(x1 \leq 2.65 \cdot 10^{-86}\right):\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6\\ \end{array} \]

Alternative 22: 27.1% accurate, 25.4× speedup?

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

\\
x1 + x2 \cdot -6
\end{array}
Derivation
  1. Initial program 76.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 51.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 26.4%

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

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

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

    \[\leadsto x1 + x2 \cdot -6 \]

Alternative 23: 26.9% accurate, 42.3× speedup?

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

\\
x2 \cdot -6
\end{array}
Derivation
  1. Initial program 76.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 51.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 26.4%

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

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

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

    \[\leadsto \color{blue}{-6 \cdot x2} \]
  7. Step-by-step derivation
    1. *-commutative26.2%

      \[\leadsto \color{blue}{x2 \cdot -6} \]
  8. Simplified26.2%

    \[\leadsto \color{blue}{x2 \cdot -6} \]
  9. Final simplification26.2%

    \[\leadsto x2 \cdot -6 \]

Alternative 24: 3.3% accurate, 127.0× speedup?

\[\begin{array}{l} \\ x1 \end{array} \]
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
	return x1;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    code = x1
end function
public static double code(double x1, double x2) {
	return x1;
}
def code(x1, x2):
	return x1
function code(x1, x2)
	return x1
end
function tmp = code(x1, x2)
	tmp = x1;
end
code[x1_, x2_] := x1
\begin{array}{l}

\\
x1
\end{array}
Derivation
  1. Initial program 76.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 51.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 26.4%

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

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

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

    \[\leadsto \color{blue}{x1} \]
  7. Final simplification3.3%

    \[\leadsto x1 \]

Reproduce

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