Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 70.5% → 99.4%
Time: 50.5s
Alternatives: 27
Speedup: 1.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 27 alternatives:

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

Initial Program: 70.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.4% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 2: 99.3% accurate, 0.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 3: 99.3% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 4: 98.3% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;x1 \leq 5 \cdot 10^{+100}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\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_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\right) + 3 \cdot t_0\right)\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 5: 97.9% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\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(t_2 \cdot 4 - 6\right)\right) + 3 \cdot t_0\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 6: 98.7% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;x1 \leq -2.4 \cdot 10^{-5}:\\
\;\;\;\;t_7\\

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

\mathbf{elif}\;x1 \leq 6.7 \cdot 10^{+62}:\\
\;\;\;\;t_7\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 7: 96.3% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\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(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 8: 79.5% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x1 \leq -2.4 \cdot 10^{-5}:\\
\;\;\;\;t_7\\

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

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

\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot t_1\right)\right)\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 9: 79.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x1 \leq -2.4 \cdot 10^{-5}:\\
\;\;\;\;t_7\\

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

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

\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot t_1\right)\right)\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 10: 79.1% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;x1 \leq 1.35:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(t_6 + \left(t_3 \cdot \left(2 \cdot x2 - x1\right) + t_0 \cdot \left(t_5 + \left(x1 \cdot x1\right) \cdot \left(\left(2 \cdot x2\right) \cdot 4 - 6\right)\right)\right)\right)\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot t_1\right)\right)\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 11: 72.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x1 \leq -0.00033:\\
\;\;\;\;t_5\\

\mathbf{elif}\;x1 \leq 1.92 \cdot 10^{-13}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(t_6 - 2\right) + x2 \cdot -6\right)\\

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 12: 71.2% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;x1 \leq -0.00112:\\
\;\;\;\;t_5\\

\mathbf{elif}\;x1 \leq 1.92 \cdot 10^{-13}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(t_6 - 2\right) + x2 \cdot -6\right)\\

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 13: 68.9% accurate, 1.5× speedup?

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

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

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

\mathbf{elif}\;x1 \leq 2300000:\\
\;\;\;\;x1 + \left(x1 \cdot \left(t_7 - 2\right) + x2 \cdot -6\right)\\

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 14: 68.8% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;x1 \leq -4.4:\\
\;\;\;\;x1 + \left(t_7 + \left(x1 + \left(t_5 + \left(t_4 + t_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right) + t_6 \cdot 0\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 2300000:\\
\;\;\;\;x1 + \left(x1 \cdot \left(t_8 - 2\right) + x2 \cdot -6\right)\\

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 15: 68.4% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x1 \leq -32:\\
\;\;\;\;t_4\\

\mathbf{elif}\;x1 \leq 2300000:\\
\;\;\;\;x1 + \left(x1 \cdot \left(t_5 - 2\right) + x2 \cdot -6\right)\\

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 16: 68.3% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x1 \leq -240:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_7 + \left(3 \cdot t_0 + t_2 \cdot \left(\left(t_4 - 3\right) \cdot t_6 + t_8\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 2700000:\\
\;\;\;\;x1 + \left(x1 \cdot \left(t_5 - 2\right) + x2 \cdot -6\right)\\

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 17: 68.2% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x1 \leq -225:\\
\;\;\;\;x1 + \left(t_2 + \left(x1 + \left(t_7 + \left(t_0 \cdot \left(\left(t_4 - 3\right) \cdot t_6 + t_8\right) + t_3 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\

\mathbf{elif}\;x1 \leq 100000000:\\
\;\;\;\;x1 + \left(x1 \cdot \left(t_5 - 2\right) + x2 \cdot -6\right)\\

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 18: 57.6% accurate, 5.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 19: 57.6% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x1 \leq -2.35 \cdot 10^{+45}:\\ \;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)\\ \end{array} \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (if (<= x1 -2.35e+45)
   (+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
   (+ x1 (+ (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0)) (* x2 -6.0)))))
double code(double x1, double x2) {
	double tmp;
	if (x1 <= -2.35e+45) {
		tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
	} else {
		tmp = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (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 <= (-2.35d+45)) then
        tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
    else
        tmp = x1 + ((x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)) + (x2 * (-6.0d0)))
    end if
    code = tmp
end function
public static double code(double x1, double x2) {
	double tmp;
	if (x1 <= -2.35e+45) {
		tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
	} else {
		tmp = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0));
	}
	return tmp;
}
def code(x1, x2):
	tmp = 0
	if x1 <= -2.35e+45:
		tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0))
	else:
		tmp = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0))
	return tmp
function code(x1, x2)
	tmp = 0.0
	if (x1 <= -2.35e+45)
		tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0)));
	else
		tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)) + Float64(x2 * -6.0)));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	tmp = 0.0;
	if (x1 <= -2.35e+45)
		tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
	else
		tmp = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := If[LessEqual[x1, -2.35e+45], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 20: 57.6% accurate, 6.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 21: 51.2% accurate, 6.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 22: 45.1% accurate, 8.4× speedup?

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

\\
\begin{array}{l}
t_0 := x1 \cdot \left(1 + x2 \cdot -12\right)\\
\mathbf{if}\;x1 \leq -1.4 \cdot 10^{+86}:\\
\;\;\;\;x1 + t_0\\

\mathbf{elif}\;x1 \leq 8500:\\
\;\;\;\;x2 \cdot -6 - x1\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 23: 45.1% accurate, 9.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.2 \cdot 10^{+85} \lor \neg \left(x1 \leq 8500\right):\\
\;\;\;\;x1 + x1 \cdot \left(1 + x2 \cdot -12\right)\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 24: 45.3% accurate, 9.8× speedup?

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

\\
x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 25: 32.4% accurate, 13.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.45 \cdot 10^{-156} \lor \neg \left(x2 \leq 5.8 \cdot 10^{-200}\right):\\
\;\;\;\;x1 + x2 \cdot -6\\

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


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 26: 39.1% accurate, 25.4× speedup?

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

\\
x2 \cdot -6 - x1
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 27: 14.4% accurate, 63.5× speedup?

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

\\
-x1
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Reproduce

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