?

Average Error: 0.5 → 0.3
Time: 1.3min
Precision: binary64
Cost: 8136

?

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

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

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if x1 < -3.6000000000000001e-19 or 7.0000000000000005e-13 < x1

    1. Initial program 0.8

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

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

      [Start]0.8

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

      rational.json-simplify-41 [=>]0.8

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

      rational.json-simplify-1 [=>]0.8

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

    if -3.6000000000000001e-19 < x1 < 7.0000000000000005e-13

    1. Initial program 0.4

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

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

      [Start]0.4

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

      rational.json-simplify-41 [=>]0.4

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

      rational.json-simplify-1 [=>]0.4

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

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

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

      [Start]0.4

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

      rational.json-simplify-43 [<=]0.4

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

      rational.json-simplify-2 [=>]0.4

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

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

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

      [Start]0.2

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

      rational.json-simplify-1 [=>]0.2

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

      rational.json-simplify-2 [=>]0.2

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

      rational.json-simplify-2 [=>]0.2

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

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

Alternatives

Alternative 1
Error0.5
Cost47040
\[\begin{array}{l} t_0 := 1 + {x1}^{2}\\ 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}\\ \left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left({x1}^{2} \cdot \left(4 \cdot \left(3 \cdot \frac{{x1}^{2}}{t_0} - \frac{x1}{t_0}\right) - 6\right) + 8 \cdot \frac{x2 \cdot {x1}^{2}}{t_0}\right)\right) + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 3\right) \cdot t_3\right)\right) + \left(\left(x1 + 3 \cdot \frac{t_1 - \left(x1 + 2 \cdot x2\right)}{t_2}\right) + x1\right) \end{array} \]
Alternative 2
Error0.5
Cost8000
\[\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}\\ \left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 3\right) \cdot t_2\right)\right) + \left(\left(x1 + 3 \cdot \frac{t_0 - \left(x1 + 2 \cdot x2\right)}{t_1}\right) + x1\right) \end{array} \]
Alternative 3
Error0.3
Cost7880
\[\begin{array}{l} t_0 := 3 \cdot \left(x1 \cdot x1\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ t_3 := x1 \cdot \left(x1 \cdot \left(x1 + 3 \cdot t_2\right) + t_1 \cdot \left(x1 \cdot \left(t_2 \cdot 4 - 6\right) + 2 \cdot \left(t_2 \cdot \left(t_2 - 3\right)\right)\right)\right) + \left(x1 + \left(x1 + 3 \cdot \frac{t_0 - \left(x1 + 2 \cdot x2\right)}{t_1}\right)\right)\\ \mathbf{if}\;x1 \leq -1.35 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x1 \leq 7 \cdot 10^{-13}:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error1.3
Cost7620
\[\begin{array}{l} t_0 := 3 \cdot \left(x1 \cdot x1\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ t_3 := x1 + 3 \cdot \frac{t_0 - \left(x1 + 2 \cdot x2\right)}{t_1}\\ t_4 := t_1 \cdot \left(x1 \cdot \left(x1 \cdot \left(t_2 \cdot 4 - 6\right) + \left(t_2 - 3\right) \cdot \left(2 \cdot t_2\right)\right)\right)\\ t_5 := x2 \cdot 2 - 3\\ \mathbf{if}\;x1 \leq -0.016:\\ \;\;\;\;t_4 + \left(\left(x1 + x1 \cdot \left(x1 \cdot x1 + \left(\left(x1 \cdot 9 + 3 \cdot \frac{t_5}{x1}\right) - 3\right)\right)\right) + t_3\right)\\ \mathbf{elif}\;x1 \leq 0.000105:\\ \;\;\;\;4 \cdot \left(t_5 \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_4 + \left(\left(x1 + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\right) + t_3\right)\\ \end{array} \]
Alternative 5
Error1.3
Cost7112
\[\begin{array}{l} t_0 := 3 \cdot \left(x1 \cdot x1\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ t_3 := t_1 \cdot \left(x1 \cdot \left(x1 \cdot \left(t_2 \cdot 4 - 6\right) + \left(t_2 - 3\right) \cdot \left(2 \cdot t_2\right)\right)\right) + \left(\left(x1 + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\right) + \left(x1 + 3 \cdot \frac{t_0 - \left(x1 + 2 \cdot x2\right)}{t_1}\right)\right)\\ \mathbf{if}\;x1 \leq -0.0152:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x1 \leq 0.00062:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Error1.3
Cost6984
\[\begin{array}{l} t_0 := 3 \cdot \left(x1 \cdot x1\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ t_3 := t_1 \cdot \left(x1 \cdot \left(x1 \cdot \left(t_2 \cdot 4 - 6\right) + \left(t_2 - 3\right) \cdot \left(2 \cdot t_2\right)\right)\right) + \left(\left(x1 + x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\right) + \left(x1 + 3 \cdot \frac{t_0 - \left(x1 + 2 \cdot x2\right)}{t_1}\right)\right)\\ \mathbf{if}\;x1 \leq -2.1 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x1 \leq 3 \cdot 10^{-7}:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 7
Error2.8
Cost5704
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0}\\ t_3 := \left(x1 + 3 \cdot \frac{t_1 - \left(x1 + 2 \cdot x2\right)}{t_0}\right) + x1\\ \mathbf{if}\;x1 \leq -1.65:\\ \;\;\;\;\left(t_0 \cdot \left(\left(2 \cdot \frac{1 + 3 \cdot \left(2 \cdot x2 - 3\right)}{x1} - 6\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(3 \cdot \left(x1 \cdot x1\right) + 2 \cdot x2\right) - x1}{t_0} \cdot 4 - 6\right)\right) + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\right) + t_3\\ \mathbf{elif}\;x1 \leq 1.35:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \left(-6 + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 3\right) \cdot t_2\right)\right) + t_3\\ \end{array} \]
Alternative 8
Error2.8
Cost5444
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := 2 \cdot \frac{1 + 3 \cdot \left(2 \cdot x2 - 3\right)}{x1} - 6\\ \mathbf{if}\;x1 \leq -1.05:\\ \;\;\;\;\left(t_1 \cdot \left(t_3 + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(3 \cdot \left(x1 \cdot x1\right) + 2 \cdot x2\right) - x1}{t_1} \cdot 4 - 6\right)\right) + t_0\right) + \left(\left(x1 + 3 \cdot \frac{t_2 - \left(x1 + 2 \cdot x2\right)}{t_1}\right) + x1\right)\\ \mathbf{elif}\;x1 \leq 1.8:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_1 \cdot \left(t_3 + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_1} \cdot 4 - 6\right)\right) + t_0\right) + \left(\left(x1 + 9\right) + x1\right)\\ \end{array} \]
Alternative 9
Error2.8
Cost4424
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := 2 \cdot \frac{1 + 3 \cdot \left(2 \cdot x2 - 3\right)}{x1} - 6\\ \mathbf{if}\;x1 \leq -1.46:\\ \;\;\;\;\left(t_1 \cdot \left(t_2 + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(3 \cdot \left(x1 \cdot x1\right) + 2 \cdot x2\right) - x1}{t_1} \cdot 4 - 6\right)\right) + t_0\right) + \left(x1 + x1\right)\\ \mathbf{elif}\;x1 \leq 1.8:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_1 \cdot \left(t_2 + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{t_1} \cdot 4 - 6\right)\right) + t_0\right) + \left(\left(x1 + 9\right) + x1\right)\\ \end{array} \]
Alternative 10
Error2.8
Cost4296
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := \left(t_0 \cdot \left(\left(2 \cdot \frac{1 + 3 \cdot \left(2 \cdot x2 - 3\right)}{x1} - 6\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(3 \cdot \left(x1 \cdot x1\right) + 2 \cdot x2\right) - x1}{t_0} \cdot 4 - 6\right)\right) + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\right) + \left(x1 + x1\right)\\ \mathbf{if}\;x1 \leq -1.05:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq 1.9:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error2.8
Cost4296
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := 2 \cdot \frac{1 + 3 \cdot \left(2 \cdot x2 - 3\right)}{x1} - 6\\ \mathbf{if}\;x1 \leq -0.98:\\ \;\;\;\;\left(t_1 \cdot \left(t_2 + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(3 \cdot \left(x1 \cdot x1\right) + 2 \cdot x2\right) - x1}{t_1} \cdot 4 - 6\right)\right) + t_0\right) + \left(x1 + x1\right)\\ \mathbf{elif}\;x1 \leq 1.9:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_1 \cdot \left(t_2 + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{t_1} \cdot 4 - 6\right)\right) + t_0\right) + \left(x1 + x1\right)\\ \end{array} \]
Alternative 12
Error2.8
Cost4104
\[\begin{array}{l} t_0 := x2 \cdot 2 - 3\\ t_1 := x1 \cdot x1 + 1\\ t_2 := t_1 \cdot \left(x1 \cdot \left(\left(x1 \cdot 6 + \left(-\frac{6 + t_0 \cdot -4}{x1}\right)\right) - 4\right)\right) + \left(\left(x1 + x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\right) + \left(x1 + 3 \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - \left(x1 + 2 \cdot x2\right)}{t_1}\right)\right)\\ \mathbf{if}\;x1 \leq -2.2:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x1 \leq 1.55:\\ \;\;\;\;4 \cdot \left(t_0 \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error3.5
Cost3400
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := t_0 \cdot \left(x1 \cdot \left(x1 \cdot 6 - 4\right)\right) + \left(\left(x1 + x1 \cdot \left(x1 \cdot x1 + x2 \cdot \left(x1 \cdot 6\right)\right)\right) + \left(x1 + 3 \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - \left(x1 + 2 \cdot x2\right)}{t_0}\right)\right)\\ \mathbf{if}\;x1 \leq -2.6:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq 1.35:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error3.7
Cost3144
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := t_0 \cdot \left(x1 \cdot \left(x1 \cdot 6 - 4\right)\right)\\ t_2 := 3 \cdot \left(x1 \cdot x1\right)\\ \mathbf{if}\;x1 \leq -0.5:\\ \;\;\;\;t_1 + \left(\left(x1 + x1 \cdot \left(6 \cdot \left(x2 \cdot x1\right)\right)\right) + \left(x1 + 3 \cdot \frac{t_2 - \left(x1 + 2 \cdot x2\right)}{t_0}\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + \left(\left(x1 + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 3\right) \cdot \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_0}\right)\right) + x1\right)\\ \end{array} \]
Alternative 15
Error3.7
Cost3012
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := t_0 \cdot \left(x1 \cdot \left(x1 \cdot 6 - 4\right)\right)\\ \mathbf{if}\;x1 \leq -1.05:\\ \;\;\;\;t_1 + \left(\left(x1 + x1 \cdot \left(6 \cdot \left(x2 \cdot x1\right)\right)\right) + \left(x1 + 3 \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - \left(x1 + 2 \cdot x2\right)}{t_0}\right)\right)\\ \mathbf{elif}\;x1 \leq 0.185:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + \left(\left(x1 + \left(9 + x1\right) \cdot \left(x1 \cdot x1\right)\right) + x1\right)\\ \end{array} \]
Alternative 16
Error3.7
Cost1988
\[\begin{array}{l} t_0 := \left(x1 \cdot x1 + 1\right) \cdot \left(x1 \cdot \left(x1 \cdot 6 - 4\right)\right)\\ \mathbf{if}\;x1 \leq -0.78:\\ \;\;\;\;t_0 + \left(\left(x1 + x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\right) + x2 \cdot -6\right)\\ \mathbf{elif}\;x1 \leq 1.35:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 + \left(\left(x1 + \left(9 + x1\right) \cdot \left(x1 \cdot x1\right)\right) + x1\right)\\ \end{array} \]
Alternative 17
Error3.7
Cost1864
\[\begin{array}{l} t_0 := \left(x1 \cdot x1 + 1\right) \cdot \left(x1 \cdot \left(x1 \cdot 6 - 4\right)\right) + \left(\left(x1 + \left(9 + x1\right) \cdot \left(x1 \cdot x1\right)\right) + x1\right)\\ \mathbf{if}\;x1 \leq -1.6:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 0.236:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 18
Error18.6
Cost1608
\[\begin{array}{l} t_0 := x1 \cdot \left(\left(x1 \cdot 6 - 4\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(x1 \cdot \left(x1 + 9\right) + 2\right)\right)\\ \mathbf{if}\;x1 \leq -1.22 \cdot 10^{-21}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 3:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + x2 \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 19
Error3.7
Cost1608
\[\begin{array}{l} t_0 := x1 \cdot \left(\left(x1 \cdot 6 - 4\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(x1 \cdot \left(x1 + 9\right) + 2\right)\right)\\ \mathbf{if}\;x1 \leq -0.54:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 0.185:\\ \;\;\;\;4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 20
Error53.1
Cost1480
\[\begin{array}{l} t_0 := 4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + x1\right)\\ \mathbf{if}\;2 \cdot x2 \leq -2 \cdot 10^{+65}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;2 \cdot x2 \leq 2 \cdot 10^{+27}:\\ \;\;\;\;x1 \cdot -2\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 21
Error58.1
Cost1092
\[\begin{array}{l} \mathbf{if}\;2 \cdot x2 \leq 2 \cdot 10^{+27}:\\ \;\;\;\;x1 \cdot -2\\ \mathbf{else}:\\ \;\;\;\;\left(2 - x2 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot -4\right)\right) \cdot x1\\ \end{array} \]
Alternative 22
Error27.2
Cost1088
\[4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 + x2 \cdot -6\right) \]
Alternative 23
Error59.5
Cost192
\[x1 \cdot -2 \]

Error

Reproduce?

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