Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 70.2% → 99.5%
Time: 57.6s
Alternatives: 24
Speedup: 3.2×

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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+156}:\\
\;\;\;\;x1 + \left(\left(x1 + -4 \cdot {x1}^{5}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\

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

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


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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

    if -9.9999999999999998e155 < x1 < 1.99999999999999996e123

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

    if 1.99999999999999996e123 < x1

    1. Initial program 11.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(x1 + 3 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 + x1\right) - x1\right)\right) \]
    8. Simplified100.0%

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

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

Alternative 2: 96.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 1 + x1 \cdot x1\\
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}\\
t_5 := \left(x1 \cdot 2\right) \cdot t_4\\
t_6 := t_1 \cdot t_4\\
t_7 := x1 + \left(t_3 + \left(x1 + \left(t_0 + \left(t_6 + t_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right) + t_5 \cdot \left(2 \cdot \frac{x2}{x1 \cdot x1} + \left(\frac{-1}{x1} - \frac{3}{x1 \cdot x1}\right)\right)\right)\right)\right)\right)\right)\\
t_8 := x2 \cdot 2 - x1\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(\left(x1 + -4 \cdot {x1}^{5}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\

\mathbf{elif}\;x1 \leq -1.4:\\
\;\;\;\;t_7\\

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

\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+82}:\\
\;\;\;\;t_7\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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 0 0.0%

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

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

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

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

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

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

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

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

    if -1e103 < x1 < -1.3999999999999999 or 0.859999999999999987 < x1 < 5.8000000000000003e82

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

        \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1}{\color{blue}{\mathsf{fma}\left(x1, x1, 1\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. add-cube-cbrt98.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(\color{blue}{\left(\sqrt[3]{\frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}} \cdot \sqrt[3]{\frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}}\right) \cdot \sqrt[3]{\frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\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. Applied egg-rr98.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(\color{blue}{\left(\sqrt[3]{\frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}} \cdot \sqrt[3]{\frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}}\right) \cdot \sqrt[3]{\frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\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 inf 96.4%

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

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

    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 0 99.2%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 24.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x2, -2, x1 \cdot \color{blue}{{x1}^{2}} + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)\right) \]
      9. distribute-rgt-out92.5%

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in96.2%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative96.2%

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

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

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

Alternative 3: 96.8% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\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 0 0.0%

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

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

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

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

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

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

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

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

    if -1e103 < x1 < 5.8000000000000003e82

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

    if 5.8000000000000003e82 < x1

    1. Initial program 24.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x2, -2, x1 \cdot \color{blue}{{x1}^{2}} + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)\right) \]
      9. distribute-rgt-out92.5%

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in96.2%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative96.2%

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

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

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

Alternative 4: 79.3% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 14.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 6.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in59.1%

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv59.1%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval59.1%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative59.1%

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

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

    if -5.49999999999999981e102 < x1 < 5.8000000000000003e82

    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 93.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}{\left(2 \cdot x2\right)}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. *-commutative90.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(\color{blue}{x2 \cdot 2} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Simplified93.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}{\left(x2 \cdot 2\right)}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.7%

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

Alternative 5: 78.6% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 2.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x2, -2, x1 \cdot \color{blue}{{x1}^{2}} + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)\right) \]
      9. distribute-rgt-out0.0%

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in12.2%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative12.2%

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

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

    if -3.3999999999999998e84 < x1 < 4.99999999999999978e110

    1. Initial program 98.6%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Taylor expanded in x1 around 0 90.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(\color{blue}{2 \cdot x2} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. *-commutative90.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(\color{blue}{x2 \cdot 2} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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. Simplified90.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(\color{blue}{x2 \cdot 2} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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 4.99999999999999978e110 < x1

    1. Initial program 22.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 10.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x2, -2, x1 \cdot \color{blue}{{x1}^{2}} + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)\right) \]
      9. distribute-rgt-out94.0%

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

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

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

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

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

        \[\leadsto x1 + \left(x1 + 3 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 + x1\right) - x1\right)\right) \]
    8. Simplified98.0%

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

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

Alternative 6: 80.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := 1 + x1 \cdot x1\\
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 -8 \cdot 10^{+102}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot -36\right)}{x1 + x2 \cdot 6}\\

\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+82}:\\
\;\;\;\;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(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) + t_1 \cdot \left(x2 \cdot 2\right)\right)\right)\right)\right)\\

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


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

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

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

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

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

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

        \[\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-rr0.1%

      \[\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-neg10.1%

        \[\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-sqr10.1%

        \[\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. unpow210.1%

        \[\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-in10.1%

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

        \[\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-eval10.1%

        \[\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-eval10.1%

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

        \[\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-inv10.1%

        \[\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-eval10.1%

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

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

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

    if -7.99999999999999982e102 < x1 < 5.8000000000000003e82

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

    if 5.8000000000000003e82 < x1

    1. Initial program 24.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x2, -2, x1 \cdot \color{blue}{{x1}^{2}} + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)\right) \]
      9. distribute-rgt-out92.5%

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in96.2%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative96.2%

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

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

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

Alternative 7: 94.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := 1 + x1 \cdot x1\\
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 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(\left(x1 + -4 \cdot {x1}^{5}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\

\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+82}:\\
\;\;\;\;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(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) + t_1 \cdot \left(x2 \cdot 2\right)\right)\right)\right)\right)\\

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


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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e93 < x1 < 5.8000000000000003e82

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

    if 5.8000000000000003e82 < x1

    1. Initial program 24.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x2, -2, x1 \cdot \color{blue}{{x1}^{2}} + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)\right) \]
      9. distribute-rgt-out92.5%

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in96.2%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval96.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative96.2%

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

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

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

Alternative 8: 79.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x1 \leq -22000000000:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_5 + t_7 \cdot \left(\left(x1 \cdot 2\right) \cdot t_8\right)\right)\right)\right)\right) + \left(9 - \frac{3}{x1}\right)\right)\\

\mathbf{elif}\;x1 \leq 170:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot t_7 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_8 - 6\right)\right) + t_2 \cdot t_8\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 2 \cdot 10^{+123}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_5 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\

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


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

    1. Initial program 2.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x2, -2, x1 \cdot \color{blue}{{x1}^{2}} + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)\right) \]
      9. distribute-rgt-out0.0%

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in12.2%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative12.2%

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

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

    if -3.3999999999999998e84 < x1 < -2.2e10

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

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

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

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

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

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

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

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

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

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

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

    if -2.2e10 < x1 < 170

    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 0 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 \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) \]
    3. Step-by-step derivation
      1. +-commutative97.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(2 \cdot x2 + -1 \cdot x1\right)} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. neg-mul-197.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 \left(2 \cdot x2 + \color{blue}{\left(-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. unsub-neg97.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(2 \cdot x2 - x1\right)} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      4. *-commutative97.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 \left(\color{blue}{x2 \cdot 2} - x1\right) - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Simplified97.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(x2 \cdot 2 - x1\right)} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    5. Taylor expanded in x1 around 0 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 \left(x2 \cdot 2 - x1\right) - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \color{blue}{\left(-1 \cdot x1 + 2 \cdot x2\right)}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    6. Step-by-step derivation
      1. +-commutative97.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(2 \cdot x2 + -1 \cdot x1\right)} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. neg-mul-197.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 \left(2 \cdot x2 + \color{blue}{\left(-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. unsub-neg97.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(2 \cdot x2 - x1\right)} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      4. *-commutative97.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 \left(\color{blue}{x2 \cdot 2} - x1\right) - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    7. Simplified97.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 \left(x2 \cdot 2 - x1\right) - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \color{blue}{\left(x2 \cdot 2 - x1\right)}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]

    if 170 < x1 < 1.99999999999999996e123

    1. Initial program 93.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 75.4%

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

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

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

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

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

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

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

    1. Initial program 11.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(x1 + 3 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 + x1\right) - x1\right)\right) \]
    8. Simplified100.0%

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

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

Alternative 9: 78.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := 3 \cdot \frac{\left(t_2 - x2 \cdot 2\right) - x1}{t_0}\\ t_4 := \frac{\left(t_2 + x2 \cdot 2\right) - x1}{t_0}\\ t_5 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\\ t_6 := t_2 \cdot t_4\\ \mathbf{if}\;x1 \leq -3.4 \cdot 10^{+84}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -3.6 \cdot 10^{+28}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_5 + \left(t_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right)\right)\right)\right)\right) + \left(9 - \frac{3}{x1}\right)\right)\\ \mathbf{elif}\;x1 \leq 200:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + 8 \cdot \frac{x2}{\frac{x1 + \frac{1}{x1}}{x2}}\right)\right)\\ \mathbf{elif}\;x1 \leq 2 \cdot 10^{+123}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_5 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (+ 1.0 (* x1 x1)))
        (t_1 (* x1 (* x1 x1)))
        (t_2 (* x1 (* x1 3.0)))
        (t_3 (* 3.0 (/ (- (- t_2 (* x2 2.0)) x1) t_0)))
        (t_4 (/ (- (+ t_2 (* x2 2.0)) x1) t_0))
        (t_5 (* (* x1 x1) (- (* 4.0 t_4) 6.0)))
        (t_6 (* t_2 t_4)))
   (if (<= x1 -3.4e+84)
     (+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))
     (if (<= x1 -3.6e+28)
       (+
        x1
        (+
         (+
          x1
          (+
           t_1
           (+
            t_6
            (* t_0 (+ t_5 (* (- t_4 3.0) (* (* x1 2.0) (- (* x2 2.0) x1))))))))
         (- 9.0 (/ 3.0 x1))))
       (if (<= x1 200.0)
         (+ x1 (+ t_3 (+ x1 (* 8.0 (/ x2 (/ (+ x1 (/ 1.0 x1)) x2))))))
         (if (<= x1 2e+123)
           (+
            x1
            (+
             t_3
             (+
              x1
              (+
               t_1
               (+
                t_6
                (* t_0 (+ t_5 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))))))))
           (+ x1 (+ x1 (* 3.0 (- (* (* x1 x1) (+ x1 3.0)) x1))))))))))
double code(double x1, double x2) {
	double t_0 = 1.0 + (x1 * x1);
	double t_1 = x1 * (x1 * x1);
	double t_2 = x1 * (x1 * 3.0);
	double t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
	double t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
	double t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0);
	double t_6 = t_2 * t_4;
	double tmp;
	if (x1 <= -3.4e+84) {
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	} else if (x1 <= -3.6e+28) {
		tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + ((t_4 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))) + (9.0 - (3.0 / x1)));
	} else if (x1 <= 200.0) {
		tmp = x1 + (t_3 + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))));
	} else if (x1 <= 2e+123) {
		tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))))))));
	} else {
		tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: tmp
    t_0 = 1.0d0 + (x1 * x1)
    t_1 = x1 * (x1 * x1)
    t_2 = x1 * (x1 * 3.0d0)
    t_3 = 3.0d0 * (((t_2 - (x2 * 2.0d0)) - x1) / t_0)
    t_4 = ((t_2 + (x2 * 2.0d0)) - x1) / t_0
    t_5 = (x1 * x1) * ((4.0d0 * t_4) - 6.0d0)
    t_6 = t_2 * t_4
    if (x1 <= (-3.4d+84)) then
        tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
    else if (x1 <= (-3.6d+28)) then
        tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + ((t_4 - 3.0d0) * ((x1 * 2.0d0) * ((x2 * 2.0d0) - x1)))))))) + (9.0d0 - (3.0d0 / x1)))
    else if (x1 <= 200.0d0) then
        tmp = x1 + (t_3 + (x1 + (8.0d0 * (x2 / ((x1 + (1.0d0 / x1)) / x2)))))
    else if (x1 <= 2d+123) then
        tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))))))))
    else
        tmp = x1 + (x1 + (3.0d0 * (((x1 * x1) * (x1 + 3.0d0)) - x1)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = 1.0 + (x1 * x1);
	double t_1 = x1 * (x1 * x1);
	double t_2 = x1 * (x1 * 3.0);
	double t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
	double t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
	double t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0);
	double t_6 = t_2 * t_4;
	double tmp;
	if (x1 <= -3.4e+84) {
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	} else if (x1 <= -3.6e+28) {
		tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + ((t_4 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))) + (9.0 - (3.0 / x1)));
	} else if (x1 <= 200.0) {
		tmp = x1 + (t_3 + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))));
	} else if (x1 <= 2e+123) {
		tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))))))));
	} else {
		tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = 1.0 + (x1 * x1)
	t_1 = x1 * (x1 * x1)
	t_2 = x1 * (x1 * 3.0)
	t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0)
	t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0
	t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0)
	t_6 = t_2 * t_4
	tmp = 0
	if x1 <= -3.4e+84:
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))))
	elif x1 <= -3.6e+28:
		tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + ((t_4 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))) + (9.0 - (3.0 / x1)))
	elif x1 <= 200.0:
		tmp = x1 + (t_3 + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))))
	elif x1 <= 2e+123:
		tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))))))))
	else:
		tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)))
	return tmp
function code(x1, x2)
	t_0 = Float64(1.0 + Float64(x1 * x1))
	t_1 = Float64(x1 * Float64(x1 * x1))
	t_2 = Float64(x1 * Float64(x1 * 3.0))
	t_3 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(x2 * 2.0)) - x1) / t_0))
	t_4 = Float64(Float64(Float64(t_2 + Float64(x2 * 2.0)) - x1) / t_0)
	t_5 = Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0))
	t_6 = Float64(t_2 * t_4)
	tmp = 0.0
	if (x1 <= -3.4e+84)
		tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0)))))));
	elseif (x1 <= -3.6e+28)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(t_6 + Float64(t_0 * Float64(t_5 + Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(x2 * 2.0) - x1)))))))) + Float64(9.0 - Float64(3.0 / x1))));
	elseif (x1 <= 200.0)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(8.0 * Float64(x2 / Float64(Float64(x1 + Float64(1.0 / x1)) / x2))))));
	elseif (x1 <= 2e+123)
		tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_1 + Float64(t_6 + Float64(t_0 * Float64(t_5 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0)))))))))));
	else
		tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(x1 * x1) * Float64(x1 + 3.0)) - x1))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = 1.0 + (x1 * x1);
	t_1 = x1 * (x1 * x1);
	t_2 = x1 * (x1 * 3.0);
	t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
	t_4 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
	t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0);
	t_6 = t_2 * t_4;
	tmp = 0.0;
	if (x1 <= -3.4e+84)
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	elseif (x1 <= -3.6e+28)
		tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * (t_5 + ((t_4 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))) + (9.0 - (3.0 / x1)));
	elseif (x1 <= 200.0)
		tmp = x1 + (t_3 + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))));
	elseif (x1 <= 2e+123)
		tmp = x1 + (t_3 + (x1 + (t_1 + (t_6 + (t_0 * (t_5 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))))))));
	else
		tmp = x1 + (x1 + (3.0 * (((x1 * x1) * (x1 + 3.0)) - x1)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$2 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$2 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 * t$95$4), $MachinePrecision]}, If[LessEqual[x1, -3.4e+84], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.6e+28], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(t$95$6 + N[(t$95$0 * N[(t$95$5 + N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 200.0], N[(x1 + N[(t$95$3 + N[(x1 + N[(8.0 * N[(x2 / N[(N[(x1 + N[(1.0 / x1), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+123], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$1 + N[(t$95$6 + N[(t$95$0 * N[(t$95$5 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(3.0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x1 \leq -3.6 \cdot 10^{+28}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_5 + \left(t_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right)\right)\right)\right)\right) + \left(9 - \frac{3}{x1}\right)\right)\\

\mathbf{elif}\;x1 \leq 200:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 8 \cdot \frac{x2}{\frac{x1 + \frac{1}{x1}}{x2}}\right)\right)\\

\mathbf{elif}\;x1 \leq 2 \cdot 10^{+123}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_5 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\

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


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

    1. Initial program 2.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x2, -2, x1 \cdot \color{blue}{{x1}^{2}} + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)\right) \]
      9. distribute-rgt-out0.0%

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in12.2%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative12.2%

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

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

    if -3.3999999999999998e84 < x1 < -3.5999999999999999e28

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

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

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

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

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

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

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

    if -3.5999999999999999e28 < x1 < 200

    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 x2 around inf 83.2%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + 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. associate-/l*83.2%

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\color{blue}{x1 + \frac{1}{x1}}} + 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 x2 around 0 83.2%

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

        \[\leadsto x1 + \left(\left(8 \cdot \frac{\color{blue}{x2 \cdot x2}}{x1 + \frac{1}{x1}} + 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*95.9%

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

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

    if 200 < x1 < 1.99999999999999996e123

    1. Initial program 93.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 75.4%

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

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

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

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

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

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

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

    1. Initial program 11.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(x1 + 3 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 + x1\right) - x1\right)\right) \]
    8. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.4 \cdot 10^{+84}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -3.6 \cdot 10^{+28}:\\ \;\;\;\;x1 + \left(\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}{1 + x1 \cdot x1} + \left(1 + x1 \cdot x1\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}{1 + x1 \cdot x1} - 6\right) + \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right)\right)\right)\right)\right) + \left(9 - \frac{3}{x1}\right)\right)\\ \mathbf{elif}\;x1 \leq 200:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + 8 \cdot \frac{x2}{\frac{x1 + \frac{1}{x1}}{x2}}\right)\right)\\ \mathbf{elif}\;x1 \leq 2 \cdot 10^{+123}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \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}{1 + x1 \cdot x1} + \left(1 + x1 \cdot x1\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}{1 + x1 \cdot x1} - 6\right) + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\ \end{array} \]

Alternative 10: 78.4% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 2.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x2, -2, x1 \cdot \color{blue}{{x1}^{2}} + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)\right) \]
      9. distribute-rgt-out0.0%

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in12.2%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval12.2%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative12.2%

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

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

    if -3.3999999999999998e84 < x1 < 1.99999999999999996e123

    1. Initial program 98.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 91.2%

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

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

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

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

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

    1. Initial program 11.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(x1 + 3 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 + x1\right) - x1\right)\right) \]
    8. Simplified100.0%

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

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

Alternative 11: 70.0% accurate, 3.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.1 \cdot 10^{+77} \lor \neg \left(x1 \leq 7.6 \cdot 10^{+81}\right):\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < -1.1e77 or 7.599999999999999e81 < x1

    1. Initial program 17.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \color{blue}{3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right) + {x1}^{3}\right)} \]
      2. *-commutative45.5%

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - \color{blue}{x2 \cdot -2}\right) + {x1}^{3}\right) \]
      3. unpow345.5%

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in57.9%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative57.9%

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

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

    if -1.1e77 < x1 < 7.599999999999999e81

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

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \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. Recombined 2 regimes into one program.
  4. Final simplification73.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.1 \cdot 10^{+77} \lor \neg \left(x1 \leq 7.6 \cdot 10^{+81}\right):\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\\ \end{array} \]

Alternative 12: 71.1% accurate, 3.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -1.75 \cdot 10^{+76} \lor \neg \left(x1 \leq 7.6 \cdot 10^{+81}\right):\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + 8 \cdot \frac{x2}{\frac{x1 + \frac{1}{x1}}{x2}}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (or (<= x1 -1.75e+76) (not (<= x1 7.6e+81)))
   (+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))
   (+
    x1
    (+
     (* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* x2 2.0)) x1) (+ 1.0 (* x1 x1))))
     (+ x1 (* 8.0 (/ x2 (/ (+ x1 (/ 1.0 x1)) x2))))))))
double code(double x1, double x2) {
	double tmp;
	if ((x1 <= -1.75e+76) || !(x1 <= 7.6e+81)) {
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	} else {
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: tmp
    if ((x1 <= (-1.75d+76)) .or. (.not. (x1 <= 7.6d+81))) then
        tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
    else
        tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (x2 * 2.0d0)) - x1) / (1.0d0 + (x1 * x1)))) + (x1 + (8.0d0 * (x2 / ((x1 + (1.0d0 / x1)) / x2)))))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if ((x1 <= -1.75e+76) || !(x1 <= 7.6e+81)) {
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	} else {
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))));
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if (x1 <= -1.75e+76) or not (x1 <= 7.6e+81):
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))))
	else:
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))))
	return tmp
function code(x1, x2)
	tmp = 0.0
	if ((x1 <= -1.75e+76) || !(x1 <= 7.6e+81))
		tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0)))))));
	else
		tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x2 * 2.0)) - x1) / Float64(1.0 + Float64(x1 * x1)))) + Float64(x1 + Float64(8.0 * Float64(x2 / Float64(Float64(x1 + Float64(1.0 / x1)) / x2))))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if ((x1 <= -1.75e+76) || ~((x1 <= 7.6e+81)))
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	else
		tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (8.0 * (x2 / ((x1 + (1.0 / x1)) / x2)))));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.75e+76], N[Not[LessEqual[x1, 7.6e+81]], $MachinePrecision]], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(8.0 * N[(x2 / N[(N[(x1 + N[(1.0 / x1), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.75 \cdot 10^{+76} \lor \neg \left(x1 \leq 7.6 \cdot 10^{+81}\right):\\
\;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < -1.75e76 or 7.599999999999999e81 < x1

    1. Initial program 17.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \color{blue}{3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right) + {x1}^{3}\right)} \]
      2. *-commutative45.5%

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - \color{blue}{x2 \cdot -2}\right) + {x1}^{3}\right) \]
      3. unpow345.5%

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in57.9%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative57.9%

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

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

    if -1.75e76 < x1 < 7.599999999999999e81

    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 x2 around inf 73.7%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + 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. associate-/l*74.3%

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\color{blue}{x1 + \frac{1}{x1}}} + 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 x2 around 0 74.3%

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

        \[\leadsto x1 + \left(\left(8 \cdot \frac{\color{blue}{x2 \cdot x2}}{x1 + \frac{1}{x1}} + 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*84.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.75 \cdot 10^{+76} \lor \neg \left(x1 \leq 7.6 \cdot 10^{+81}\right):\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + 8 \cdot \frac{x2}{\frac{x1 + \frac{1}{x1}}{x2}}\right)\right)\\ \end{array} \]

Alternative 13: 63.3% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)\\ \mathbf{if}\;x1 \leq -1.6 \cdot 10^{-201}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 2.3 \cdot 10^{-209}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0
         (+
          x1
          (+ (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0)) (* x2 -6.0)))))
   (if (<= x1 -1.6e-201)
     t_0
     (if (<= x1 2.3e-209)
       (+ x1 (* x2 -6.0))
       (if (<= x1 7.6e+81)
         t_0
         (+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0))))))))))))
double code(double x1, double x2) {
	double t_0 = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + (x2 * -6.0));
	double tmp;
	if (x1 <= -1.6e-201) {
		tmp = t_0;
	} else if (x1 <= 2.3e-209) {
		tmp = x1 + (x2 * -6.0);
	} else if (x1 <= 7.6e+81) {
		tmp = t_0;
	} else {
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.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 * ((4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)) + (x2 * (-6.0d0)))
    if (x1 <= (-1.6d-201)) then
        tmp = t_0
    else if (x1 <= 2.3d-209) then
        tmp = x1 + (x2 * (-6.0d0))
    else if (x1 <= 7.6d+81) then
        tmp = t_0
    else
        tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + (x2 * -6.0));
	double tmp;
	if (x1 <= -1.6e-201) {
		tmp = t_0;
	} else if (x1 <= 2.3e-209) {
		tmp = x1 + (x2 * -6.0);
	} else if (x1 <= 7.6e+81) {
		tmp = t_0;
	} else {
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + (x2 * -6.0))
	tmp = 0
	if x1 <= -1.6e-201:
		tmp = t_0
	elif x1 <= 2.3e-209:
		tmp = x1 + (x2 * -6.0)
	elif x1 <= 7.6e+81:
		tmp = t_0
	else:
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))))
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)) + Float64(x2 * -6.0)))
	tmp = 0.0
	if (x1 <= -1.6e-201)
		tmp = t_0;
	elseif (x1 <= 2.3e-209)
		tmp = Float64(x1 + Float64(x2 * -6.0));
	elseif (x1 <= 7.6e+81)
		tmp = t_0;
	else
		tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0)))))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 + ((x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)) + (x2 * -6.0));
	tmp = 0.0;
	if (x1 <= -1.6e-201)
		tmp = t_0;
	elseif (x1 <= 2.3e-209)
		tmp = x1 + (x2 * -6.0);
	elseif (x1 <= 7.6e+81)
		tmp = t_0;
	else
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.6e-201], t$95$0, If[LessEqual[x1, 2.3e-209], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.6e+81], t$95$0, N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x1 \leq 2.3 \cdot 10^{-209}:\\
\;\;\;\;x1 + x2 \cdot -6\\

\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x1 < -1.6000000000000001e-201 or 2.3e-209 < x1 < 7.599999999999999e81

    1. Initial program 75.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 58.0%

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

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

    if -1.6000000000000001e-201 < x1 < 2.3e-209

    1. Initial program 99.5%

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

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

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

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

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

    if 7.599999999999999e81 < x1

    1. Initial program 25.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 11.8%

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + {x1}^{3}\right)\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in94.6%

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv94.6%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval94.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.6 \cdot 10^{-201}:\\ \;\;\;\;x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)\\ \mathbf{elif}\;x1 \leq 2.3 \cdot 10^{-209}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\ \;\;\;\;x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \end{array} \]

Alternative 14: 64.8% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x2 \cdot 2 - 3\\ t_1 := x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot t_0\right) - 2\right) + x2 \cdot -6\right)\\ \mathbf{if}\;x1 \leq -6.8 \cdot 10^{-196}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq 1.32 \cdot 10^{-194}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot t_0\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 9 \cdot 10^{+81}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (- (* x2 2.0) 3.0))
        (t_1 (+ x1 (+ (* x1 (- (* 4.0 (* x2 t_0)) 2.0)) (* x2 -6.0)))))
   (if (<= x1 -6.8e-196)
     t_1
     (if (<= x1 1.32e-194)
       (+ x1 (+ (* 3.0 (* x2 -2.0)) (+ x1 (* 4.0 (* x2 (* x1 t_0))))))
       (if (<= x1 9e+81)
         t_1
         (+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0))))))))))))
double code(double x1, double x2) {
	double t_0 = (x2 * 2.0) - 3.0;
	double t_1 = x1 + ((x1 * ((4.0 * (x2 * t_0)) - 2.0)) + (x2 * -6.0));
	double tmp;
	if (x1 <= -6.8e-196) {
		tmp = t_1;
	} else if (x1 <= 1.32e-194) {
		tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x1 * t_0)))));
	} else if (x1 <= 9e+81) {
		tmp = t_1;
	} else {
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (x2 * 2.0d0) - 3.0d0
    t_1 = x1 + ((x1 * ((4.0d0 * (x2 * t_0)) - 2.0d0)) + (x2 * (-6.0d0)))
    if (x1 <= (-6.8d-196)) then
        tmp = t_1
    else if (x1 <= 1.32d-194) then
        tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (4.0d0 * (x2 * (x1 * t_0)))))
    else if (x1 <= 9d+81) then
        tmp = t_1
    else
        tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = (x2 * 2.0) - 3.0;
	double t_1 = x1 + ((x1 * ((4.0 * (x2 * t_0)) - 2.0)) + (x2 * -6.0));
	double tmp;
	if (x1 <= -6.8e-196) {
		tmp = t_1;
	} else if (x1 <= 1.32e-194) {
		tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x1 * t_0)))));
	} else if (x1 <= 9e+81) {
		tmp = t_1;
	} else {
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x2 * 2.0) - 3.0
	t_1 = x1 + ((x1 * ((4.0 * (x2 * t_0)) - 2.0)) + (x2 * -6.0))
	tmp = 0
	if x1 <= -6.8e-196:
		tmp = t_1
	elif x1 <= 1.32e-194:
		tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x1 * t_0)))))
	elif x1 <= 9e+81:
		tmp = t_1
	else:
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x2 * 2.0) - 3.0)
	t_1 = Float64(x1 + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * t_0)) - 2.0)) + Float64(x2 * -6.0)))
	tmp = 0.0
	if (x1 <= -6.8e-196)
		tmp = t_1;
	elseif (x1 <= 1.32e-194)
		tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * t_0))))));
	elseif (x1 <= 9e+81)
		tmp = t_1;
	else
		tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0)))))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (x2 * 2.0) - 3.0;
	t_1 = x1 + ((x1 * ((4.0 * (x2 * t_0)) - 2.0)) + (x2 * -6.0));
	tmp = 0.0;
	if (x1 <= -6.8e-196)
		tmp = t_1;
	elseif (x1 <= 1.32e-194)
		tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * (x1 * t_0)))));
	elseif (x1 <= 9e+81)
		tmp = t_1;
	else
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 * N[(N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.8e-196], t$95$1, If[LessEqual[x1, 1.32e-194], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 9e+81], t$95$1, N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x1 \leq 9 \cdot 10^{+81}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x1 < -6.8e-196 or 1.32e-194 < x1 < 9.00000000000000034e81

    1. Initial program 74.5%

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

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

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

    if -6.8e-196 < x1 < 1.32e-194

    1. Initial program 99.6%

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

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

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

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

    if 9.00000000000000034e81 < x1

    1. Initial program 25.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 11.8%

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + {x1}^{3}\right)\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in94.6%

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv94.6%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval94.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -6.8 \cdot 10^{-196}:\\ \;\;\;\;x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)\\ \mathbf{elif}\;x1 \leq 1.32 \cdot 10^{-194}:\\ \;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 9 \cdot 10^{+81}:\\ \;\;\;\;x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \end{array} \]

Alternative 15: 69.1% accurate, 5.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq 9.5 \cdot 10^{+81}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (<= x1 9.5e+81)
   (+
    x1
    (+
     (+ x1 (* 4.0 (* x2 (* x1 (- (* x2 2.0) 3.0)))))
     (* 3.0 (- (* x2 -2.0) x1))))
   (+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))))
double code(double x1, double x2) {
	double tmp;
	if (x1 <= 9.5e+81) {
		tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: tmp
    if (x1 <= 9.5d+81) then
        tmp = x1 + ((x1 + (4.0d0 * (x2 * (x1 * ((x2 * 2.0d0) - 3.0d0))))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
    else
        tmp = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if (x1 <= 9.5e+81) {
		tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1)));
	} else {
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if x1 <= 9.5e+81:
		tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1)))
	else:
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))))
	return tmp
function code(x1, x2)
	tmp = 0.0
	if (x1 <= 9.5e+81)
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(x2 * 2.0) - 3.0))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1))));
	else
		tmp = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0)))))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if (x1 <= 9.5e+81)
		tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((x2 * 2.0) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1)));
	else
		tmp = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[LessEqual[x1, 9.5e+81], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 9.5 \cdot 10^{+81}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\

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


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

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

    if 9.50000000000000083e81 < x1

    1. Initial program 25.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 11.8%

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

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

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

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + {x1}^{3}\right)\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in94.6%

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

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

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

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

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv94.6%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval94.6%

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

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

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

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

Alternative 16: 50.0% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\ t_1 := x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -1.35 \cdot 10^{+78}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq -1.55 \cdot 10^{-69}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-84}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (+ x1 (/ (* (* x2 x2) 8.0) (+ x1 (/ 1.0 x1)))))
        (t_1 (+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))))
   (if (<= x1 -1.35e+78)
     t_1
     (if (<= x1 -1.55e-69)
       t_0
       (if (<= x1 6.4e-84) (+ x1 (* x2 -6.0)) (if (<= x1 7.6e+81) t_0 t_1))))))
double code(double x1, double x2) {
	double t_0 = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
	double t_1 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	double tmp;
	if (x1 <= -1.35e+78) {
		tmp = t_1;
	} else if (x1 <= -1.55e-69) {
		tmp = t_0;
	} else if (x1 <= 6.4e-84) {
		tmp = x1 + (x2 * -6.0);
	} else if (x1 <= 7.6e+81) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = x1 + (((x2 * x2) * 8.0d0) / (x1 + (1.0d0 / x1)))
    t_1 = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
    if (x1 <= (-1.35d+78)) then
        tmp = t_1
    else if (x1 <= (-1.55d-69)) then
        tmp = t_0
    else if (x1 <= 6.4d-84) then
        tmp = x1 + (x2 * (-6.0d0))
    else if (x1 <= 7.6d+81) then
        tmp = t_0
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
	double t_1 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	double tmp;
	if (x1 <= -1.35e+78) {
		tmp = t_1;
	} else if (x1 <= -1.55e-69) {
		tmp = t_0;
	} else if (x1 <= 6.4e-84) {
		tmp = x1 + (x2 * -6.0);
	} else if (x1 <= 7.6e+81) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)))
	t_1 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))))
	tmp = 0
	if x1 <= -1.35e+78:
		tmp = t_1
	elif x1 <= -1.55e-69:
		tmp = t_0
	elif x1 <= 6.4e-84:
		tmp = x1 + (x2 * -6.0)
	elif x1 <= 7.6e+81:
		tmp = t_0
	else:
		tmp = t_1
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 + Float64(Float64(Float64(x2 * x2) * 8.0) / Float64(x1 + Float64(1.0 / x1))))
	t_1 = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0)))))))
	tmp = 0.0
	if (x1 <= -1.35e+78)
		tmp = t_1;
	elseif (x1 <= -1.55e-69)
		tmp = t_0;
	elseif (x1 <= 6.4e-84)
		tmp = Float64(x1 + Float64(x2 * -6.0));
	elseif (x1 <= 7.6e+81)
		tmp = t_0;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
	t_1 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	tmp = 0.0;
	if (x1 <= -1.35e+78)
		tmp = t_1;
	elseif (x1 <= -1.55e-69)
		tmp = t_0;
	elseif (x1 <= 6.4e-84)
		tmp = x1 + (x2 * -6.0);
	elseif (x1 <= 7.6e+81)
		tmp = t_0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision] / N[(x1 + N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.35e+78], t$95$1, If[LessEqual[x1, -1.55e-69], t$95$0, If[LessEqual[x1, 6.4e-84], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.6e+81], t$95$0, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x1 \leq -1.55 \cdot 10^{-69}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-84}:\\
\;\;\;\;x1 + x2 \cdot -6\\

\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x1 < -1.35000000000000002e78 or 7.599999999999999e81 < x1

    1. Initial program 17.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \color{blue}{3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right) + {x1}^{3}\right)} \]
      2. *-commutative45.5%

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - \color{blue}{x2 \cdot -2}\right) + {x1}^{3}\right) \]
      3. unpow345.5%

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in57.9%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative57.9%

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

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

    if -1.35000000000000002e78 < x1 < -1.55e-69 or 6.3999999999999999e-84 < x1 < 7.599999999999999e81

    1. Initial program 98.9%

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

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + 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. associate-/l*64.2%

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\color{blue}{x1 + \frac{1}{x1}}} + 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 x2 around inf 37.8%

      \[\leadsto x1 + \color{blue}{8 \cdot \frac{{x2}^{2}}{x1 + \frac{1}{x1}}} \]
    7. Step-by-step derivation
      1. associate-*r/37.8%

        \[\leadsto x1 + \color{blue}{\frac{8 \cdot {x2}^{2}}{x1 + \frac{1}{x1}}} \]
      2. unpow237.8%

        \[\leadsto x1 + \frac{8 \cdot \color{blue}{\left(x2 \cdot x2\right)}}{x1 + \frac{1}{x1}} \]
    8. Simplified37.8%

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

    if -1.55e-69 < x1 < 6.3999999999999999e-84

    1. Initial program 99.5%

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

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

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

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

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification55.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.35 \cdot 10^{+78}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -1.55 \cdot 10^{-69}:\\ \;\;\;\;x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\ \mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-84}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\ \;\;\;\;x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\ \mathbf{else}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \end{array} \]

Alternative 17: 49.1% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -6.8 \cdot 10^{+74}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq -4.3 \cdot 10^{-73}:\\ \;\;\;\;x1 + \left(9 + \left(x1 - \frac{3 + \left(x2 \cdot x2\right) \cdot -8}{x1}\right)\right)\\ \mathbf{elif}\;x1 \leq 4.5 \cdot 10^{-86}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\ \;\;\;\;x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (+ x1 (* 3.0 (* x1 (* x1 (+ x1 (+ 3.0 (* x2 2.0)))))))))
   (if (<= x1 -6.8e+74)
     t_0
     (if (<= x1 -4.3e-73)
       (+ x1 (+ 9.0 (- x1 (/ (+ 3.0 (* (* x2 x2) -8.0)) x1))))
       (if (<= x1 4.5e-86)
         (+ x1 (* x2 -6.0))
         (if (<= x1 7.6e+81)
           (+ x1 (/ (* (* x2 x2) 8.0) (+ x1 (/ 1.0 x1))))
           t_0))))))
double code(double x1, double x2) {
	double t_0 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	double tmp;
	if (x1 <= -6.8e+74) {
		tmp = t_0;
	} else if (x1 <= -4.3e-73) {
		tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1)));
	} else if (x1 <= 4.5e-86) {
		tmp = x1 + (x2 * -6.0);
	} else if (x1 <= 7.6e+81) {
		tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x1, x2)
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x1 + (3.0d0 * (x1 * (x1 * (x1 + (3.0d0 + (x2 * 2.0d0))))))
    if (x1 <= (-6.8d+74)) then
        tmp = t_0
    else if (x1 <= (-4.3d-73)) then
        tmp = x1 + (9.0d0 + (x1 - ((3.0d0 + ((x2 * x2) * (-8.0d0))) / x1)))
    else if (x1 <= 4.5d-86) then
        tmp = x1 + (x2 * (-6.0d0))
    else if (x1 <= 7.6d+81) then
        tmp = x1 + (((x2 * x2) * 8.0d0) / (x1 + (1.0d0 / x1)))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double t_0 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	double tmp;
	if (x1 <= -6.8e+74) {
		tmp = t_0;
	} else if (x1 <= -4.3e-73) {
		tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1)));
	} else if (x1 <= 4.5e-86) {
		tmp = x1 + (x2 * -6.0);
	} else if (x1 <= 7.6e+81) {
		tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x1, x2):
	t_0 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))))
	tmp = 0
	if x1 <= -6.8e+74:
		tmp = t_0
	elif x1 <= -4.3e-73:
		tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1)))
	elif x1 <= 4.5e-86:
		tmp = x1 + (x2 * -6.0)
	elif x1 <= 7.6e+81:
		tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)))
	else:
		tmp = t_0
	return tmp
function code(x1, x2)
	t_0 = Float64(x1 + Float64(3.0 * Float64(x1 * Float64(x1 * Float64(x1 + Float64(3.0 + Float64(x2 * 2.0)))))))
	tmp = 0.0
	if (x1 <= -6.8e+74)
		tmp = t_0;
	elseif (x1 <= -4.3e-73)
		tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(3.0 + Float64(Float64(x2 * x2) * -8.0)) / x1))));
	elseif (x1 <= 4.5e-86)
		tmp = Float64(x1 + Float64(x2 * -6.0));
	elseif (x1 <= 7.6e+81)
		tmp = Float64(x1 + Float64(Float64(Float64(x2 * x2) * 8.0) / Float64(x1 + Float64(1.0 / x1))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = x1 + (3.0 * (x1 * (x1 * (x1 + (3.0 + (x2 * 2.0))))));
	tmp = 0.0;
	if (x1 <= -6.8e+74)
		tmp = t_0;
	elseif (x1 <= -4.3e-73)
		tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1)));
	elseif (x1 <= 4.5e-86)
		tmp = x1 + (x2 * -6.0);
	elseif (x1 <= 7.6e+81)
		tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(3.0 * N[(x1 * N[(x1 * N[(x1 + N[(3.0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.8e+74], t$95$0, If[LessEqual[x1, -4.3e-73], N[(x1 + N[(9.0 + N[(x1 - N[(N[(3.0 + N[(N[(x2 * x2), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e-86], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.6e+81], N[(x1 + N[(N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision] / N[(x1 + N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -6.8 \cdot 10^{+74}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x1 \leq -4.3 \cdot 10^{-73}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \frac{3 + \left(x2 \cdot x2\right) \cdot -8}{x1}\right)\right)\\

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

\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\
\;\;\;\;x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x1 < -6.7999999999999998e74 or 7.599999999999999e81 < x1

    1. Initial program 17.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \color{blue}{3 \cdot \left({x1}^{2} \cdot \left(3 - -2 \cdot x2\right) + {x1}^{3}\right)} \]
      2. *-commutative45.5%

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - \color{blue}{x2 \cdot -2}\right) + {x1}^{3}\right) \]
      3. unpow345.5%

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

        \[\leadsto x1 + 3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right) + \color{blue}{{x1}^{2}} \cdot x1\right) \]
      5. distribute-lft-in57.9%

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

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

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

        \[\leadsto x1 + 3 \cdot \color{blue}{\left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right)\right)\right)} \]
      9. *-commutative57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 - \color{blue}{-2 \cdot x2}\right)\right)\right)\right) \]
      10. cancel-sign-sub-inv57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \color{blue}{\left(3 + \left(--2\right) \cdot x2\right)}\right)\right)\right) \]
      11. metadata-eval57.9%

        \[\leadsto x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + \color{blue}{2} \cdot x2\right)\right)\right)\right) \]
      12. *-commutative57.9%

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

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

    if -6.7999999999999998e74 < x1 < -4.2999999999999999e-73

    1. Initial program 99.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 x2 around inf 60.0%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + 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. associate-/l*60.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2999999999999999e-73 < x1 < 4.4999999999999998e-86

    1. Initial program 99.5%

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

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

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

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

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

    if 4.4999999999999998e-86 < x1 < 7.599999999999999e81

    1. Initial program 98.8%

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

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + 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. associate-/l*67.8%

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\color{blue}{x1 + \frac{1}{x1}}} + 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 x2 around inf 38.8%

      \[\leadsto x1 + \color{blue}{8 \cdot \frac{{x2}^{2}}{x1 + \frac{1}{x1}}} \]
    7. Step-by-step derivation
      1. associate-*r/38.8%

        \[\leadsto x1 + \color{blue}{\frac{8 \cdot {x2}^{2}}{x1 + \frac{1}{x1}}} \]
      2. unpow238.8%

        \[\leadsto x1 + \frac{8 \cdot \color{blue}{\left(x2 \cdot x2\right)}}{x1 + \frac{1}{x1}} \]
    8. Simplified38.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -6.8 \cdot 10^{+74}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq -4.3 \cdot 10^{-73}:\\ \;\;\;\;x1 + \left(9 + \left(x1 - \frac{3 + \left(x2 \cdot x2\right) \cdot -8}{x1}\right)\right)\\ \mathbf{elif}\;x1 \leq 4.5 \cdot 10^{-86}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+81}:\\ \;\;\;\;x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\ \mathbf{else}:\\ \;\;\;\;x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 + \left(3 + x2 \cdot 2\right)\right)\right)\right)\\ \end{array} \]

Alternative 18: 50.9% accurate, 5.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\mathbf{if}\;x2 \leq -1.16 \cdot 10^{+117}:\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\

\mathbf{elif}\;x2 \leq -3.2 \cdot 10^{-71}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x2 \leq 2.6 \cdot 10^{-136}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\

\mathbf{elif}\;x2 \leq 1.55 \cdot 10^{+109}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x2 < -1.1600000000000001e117

    1. Initial program 82.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 82.0%

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

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

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

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

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

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

    if -1.1600000000000001e117 < x2 < -3.1999999999999999e-71 or 2.59999999999999997e-136 < x2 < 1.54999999999999996e109

    1. Initial program 68.5%

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

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

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

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

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

        \[\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-rr55.3%

      \[\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-sqr55.2%

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

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

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

    if -3.1999999999999999e-71 < x2 < 2.59999999999999997e-136

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x1 + \left(x1 + 3 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 + x1\right) - x1\right)\right) \]
    8. Simplified64.4%

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

    if 1.54999999999999996e109 < x2

    1. Initial program 68.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 62.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x2 \leq -1.16 \cdot 10^{+117}:\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \mathbf{elif}\;x2 \leq -3.2 \cdot 10^{-71}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \mathbf{elif}\;x2 \leq 2.6 \cdot 10^{-136}:\\ \;\;\;\;x1 + \left(x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 + 3\right) - x1\right)\right)\\ \mathbf{elif}\;x2 \leq 1.55 \cdot 10^{+109}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \mathbf{else}:\\ \;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\ \end{array} \]

Alternative 19: 40.8% accurate, 8.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -6.2 \cdot 10^{-68}:\\ \;\;\;\;x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\ \mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-84}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (<= x1 -6.2e-68)
   (+ x1 (/ (* (* x2 x2) 8.0) (+ x1 (/ 1.0 x1))))
   (if (<= x1 6.4e-84) (+ x1 (* x2 -6.0)) (+ x1 (* (* x2 x2) (* x1 8.0))))))
double code(double x1, double x2) {
	double tmp;
	if (x1 <= -6.2e-68) {
		tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
	} else if (x1 <= 6.4e-84) {
		tmp = x1 + (x2 * -6.0);
	} else {
		tmp = x1 + ((x2 * x2) * (x1 * 8.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.2d-68)) then
        tmp = x1 + (((x2 * x2) * 8.0d0) / (x1 + (1.0d0 / x1)))
    else if (x1 <= 6.4d-84) then
        tmp = x1 + (x2 * (-6.0d0))
    else
        tmp = x1 + ((x2 * x2) * (x1 * 8.0d0))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if (x1 <= -6.2e-68) {
		tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
	} else if (x1 <= 6.4e-84) {
		tmp = x1 + (x2 * -6.0);
	} else {
		tmp = x1 + ((x2 * x2) * (x1 * 8.0));
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if x1 <= -6.2e-68:
		tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)))
	elif x1 <= 6.4e-84:
		tmp = x1 + (x2 * -6.0)
	else:
		tmp = x1 + ((x2 * x2) * (x1 * 8.0))
	return tmp
function code(x1, x2)
	tmp = 0.0
	if (x1 <= -6.2e-68)
		tmp = Float64(x1 + Float64(Float64(Float64(x2 * x2) * 8.0) / Float64(x1 + Float64(1.0 / x1))));
	elseif (x1 <= 6.4e-84)
		tmp = Float64(x1 + Float64(x2 * -6.0));
	else
		tmp = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 8.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if (x1 <= -6.2e-68)
		tmp = x1 + (((x2 * x2) * 8.0) / (x1 + (1.0 / x1)));
	elseif (x1 <= 6.4e-84)
		tmp = x1 + (x2 * -6.0);
	else
		tmp = x1 + ((x2 * x2) * (x1 * 8.0));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[LessEqual[x1, -6.2e-68], N[(x1 + N[(N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision] / N[(x1 + N[(1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.4e-84], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.2 \cdot 10^{-68}:\\
\;\;\;\;x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\

\mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-84}:\\
\;\;\;\;x1 + x2 \cdot -6\\

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


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

    1. Initial program 41.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 x2 around inf 22.1%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + 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. associate-/l*22.1%

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

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

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

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

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

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

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\color{blue}{x1 + \frac{1}{x1}}} + 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 x2 around inf 13.8%

      \[\leadsto x1 + \color{blue}{8 \cdot \frac{{x2}^{2}}{x1 + \frac{1}{x1}}} \]
    7. Step-by-step derivation
      1. associate-*r/13.8%

        \[\leadsto x1 + \color{blue}{\frac{8 \cdot {x2}^{2}}{x1 + \frac{1}{x1}}} \]
      2. unpow213.8%

        \[\leadsto x1 + \frac{8 \cdot \color{blue}{\left(x2 \cdot x2\right)}}{x1 + \frac{1}{x1}} \]
    8. Simplified13.8%

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

    if -6.1999999999999999e-68 < x1 < 6.3999999999999999e-84

    1. Initial program 99.5%

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

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

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

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

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

    if 6.3999999999999999e-84 < x1

    1. Initial program 57.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 33.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -6.2 \cdot 10^{-68}:\\ \;\;\;\;x1 + \frac{\left(x2 \cdot x2\right) \cdot 8}{x1 + \frac{1}{x1}}\\ \mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-84}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \end{array} \]

Alternative 20: 40.2% accurate, 9.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.3 \cdot 10^{-73} \lor \neg \left(x1 \leq 3.4 \cdot 10^{-84}\right):\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x1 < -5.29999999999999972e-73 or 3.40000000000000021e-84 < x1

    1. Initial program 51.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 28.3%

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

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

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

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

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

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

    if -5.29999999999999972e-73 < x1 < 3.40000000000000021e-84

    1. Initial program 99.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.3 \cdot 10^{-73} \lor \neg \left(x1 \leq 3.4 \cdot 10^{-84}\right):\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \end{array} \]

Alternative 21: 26.6% 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 68.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 53.6%

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

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

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

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

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

Alternative 22: 3.3% accurate, 42.3× speedup?

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

\\
x1 + x1
\end{array}
Derivation
  1. Initial program 68.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 x2 around inf 48.3%

    \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + 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. associate-/l*47.5%

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

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

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

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

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

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

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

      \[\leadsto x1 + \color{blue}{\left(x1 + 9\right)} \]
  7. Simplified3.6%

    \[\leadsto x1 + \color{blue}{\left(x1 + 9\right)} \]
  8. Taylor expanded in x1 around inf 3.5%

    \[\leadsto \color{blue}{2 \cdot x1} \]
  9. Step-by-step derivation
    1. count-23.5%

      \[\leadsto \color{blue}{x1 + x1} \]
  10. Simplified3.5%

    \[\leadsto \color{blue}{x1 + x1} \]
  11. Final simplification3.5%

    \[\leadsto x1 + x1 \]

Alternative 23: 3.5% accurate, 127.0× speedup?

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

\\
9
\end{array}
Derivation
  1. Initial program 68.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 x2 around inf 48.3%

    \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + 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. associate-/l*47.5%

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

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

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

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

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

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

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

      \[\leadsto x1 + \color{blue}{\left(x1 + 9\right)} \]
  7. Simplified3.6%

    \[\leadsto x1 + \color{blue}{\left(x1 + 9\right)} \]
  8. Taylor expanded in x1 around 0 3.4%

    \[\leadsto \color{blue}{9} \]
  9. Final simplification3.4%

    \[\leadsto 9 \]

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 68.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 53.6%

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

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

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

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

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

    \[\leadsto x1 \]

Reproduce

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