?

Average Error: 0.5 → 0.5
Time: 2.0min
Precision: binary64
Cost: 34112

?

\[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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 := 1 + {x1}^{2}\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(8 \cdot \frac{\left(x2 \cdot x1\right) \cdot x1}{t_0} + {x1}^{2} \cdot \left(4 \cdot \frac{3 \cdot {x1}^{2} - x1}{t_0} - 6\right)\right)\right) \cdot t_2 + t_1 \cdot t_3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\right) \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 (+ 1.0 (pow x1 2.0)))
        (t_1 (* (* 3.0 x1) x1))
        (t_2 (+ (* x1 x1) 1.0))
        (t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2)))
   (+
    x1
    (+
     (+
      (+
       (+
        (*
         (+
          (* (* (* 2.0 x1) t_3) (- t_3 3.0))
          (+
           (* 8.0 (/ (* (* x2 x1) x1) t_0))
           (*
            (pow x1 2.0)
            (- (* 4.0 (/ (- (* 3.0 (pow x1 2.0)) x1) t_0)) 6.0))))
         t_2)
        (* t_1 t_3))
       (* (* x1 x1) x1))
      x1)
     (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))))
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 = 1.0 + pow(x1, 2.0);
	double t_1 = (3.0 * x1) * x1;
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
	return x1 + (((((((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((8.0 * (((x2 * x1) * x1) / t_0)) + (pow(x1, 2.0) * ((4.0 * (((3.0 * pow(x1, 2.0)) - x1) / t_0)) - 6.0)))) * t_2) + (t_1 * t_3)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)));
}
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
    t_0 = 1.0d0 + (x1 ** 2.0d0)
    t_1 = (3.0d0 * x1) * x1
    t_2 = (x1 * x1) + 1.0d0
    t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
    code = x1 + (((((((((2.0d0 * x1) * t_3) * (t_3 - 3.0d0)) + ((8.0d0 * (((x2 * x1) * x1) / t_0)) + ((x1 ** 2.0d0) * ((4.0d0 * (((3.0d0 * (x1 ** 2.0d0)) - x1) / t_0)) - 6.0d0)))) * t_2) + (t_1 * t_3)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)))
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 = 1.0 + Math.pow(x1, 2.0);
	double t_1 = (3.0 * x1) * x1;
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
	return x1 + (((((((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((8.0 * (((x2 * x1) * x1) / t_0)) + (Math.pow(x1, 2.0) * ((4.0 * (((3.0 * Math.pow(x1, 2.0)) - x1) / t_0)) - 6.0)))) * t_2) + (t_1 * t_3)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)));
}
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 = 1.0 + math.pow(x1, 2.0)
	t_1 = (3.0 * x1) * x1
	t_2 = (x1 * x1) + 1.0
	t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2
	return x1 + (((((((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((8.0 * (((x2 * x1) * x1) / t_0)) + (math.pow(x1, 2.0) * ((4.0 * (((3.0 * math.pow(x1, 2.0)) - x1) / t_0)) - 6.0)))) * t_2) + (t_1 * t_3)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))
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(1.0 + (x1 ^ 2.0))
	t_1 = Float64(Float64(3.0 * x1) * x1)
	t_2 = Float64(Float64(x1 * x1) + 1.0)
	t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)
	return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(8.0 * Float64(Float64(Float64(x2 * x1) * x1) / t_0)) + Float64((x1 ^ 2.0) * Float64(Float64(4.0 * Float64(Float64(Float64(3.0 * (x1 ^ 2.0)) - x1) / t_0)) - 6.0)))) * t_2) + Float64(t_1 * t_3)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2))))
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 = code(x1, x2)
	t_0 = 1.0 + (x1 ^ 2.0);
	t_1 = (3.0 * x1) * x1;
	t_2 = (x1 * x1) + 1.0;
	t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
	tmp = x1 + (((((((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((8.0 * (((x2 * x1) * x1) / t_0)) + ((x1 ^ 2.0) * ((4.0 * (((3.0 * (x1 ^ 2.0)) - x1) / t_0)) - 6.0)))) * t_2) + (t_1 * t_3)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)));
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[(1.0 + N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $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]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(8.0 * N[(N[(N[(x2 * x1), $MachinePrecision] * x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[Power[x1, 2.0], $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $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]]]]]
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\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 := 1 + {x1}^{2}\\
t_1 := \left(3 \cdot x1\right) \cdot x1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(8 \cdot \frac{\left(x2 \cdot x1\right) \cdot x1}{t_0} + {x1}^{2} \cdot \left(4 \cdot \frac{3 \cdot {x1}^{2} - x1}{t_0} - 6\right)\right)\right) \cdot t_2 + t_1 \cdot t_3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\right)
\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.5

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

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

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

Alternatives

Alternative 1
Error0.5
Cost33600
\[\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}^{2} \cdot \frac{\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2 - x1\right)}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{4}} + {x1}^{2} \cdot -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} \]
Alternative 2
Error1.2
Cost8264
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := \left(x1 \cdot x1\right) \cdot x1\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\ t_4 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\\ t_5 := t_0 \cdot t_3\\ t_6 := \left(2 \cdot x1\right) \cdot t_3\\ t_7 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\ t_8 := x1 + \left(\left(\left(\left(\left(t_6 \cdot \left(\left(\frac{-1}{x1} \cdot \frac{-1}{x1}\right) \cdot \left(2 \cdot x2 - 3\right) - \frac{1}{x1}\right) + t_4\right) \cdot t_2 + t_5\right) + t_1\right) + x1\right) + t_7\right)\\ \mathbf{if}\;x1 \leq -1:\\ \;\;\;\;t_8\\ \mathbf{elif}\;x1 \leq 1:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(t_6 \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right) + t_4\right) \cdot t_2 + t_5\right) + t_1\right) + x1\right) + t_7\right)\\ \mathbf{else}:\\ \;\;\;\;t_8\\ \end{array} \]
Alternative 3
Error1.2
Cost8136
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := \left(x1 \cdot x1\right) \cdot x1\\ t_2 := x1 \cdot x1 + 1\\ t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\ t_4 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\ t_5 := \left(2 \cdot x1\right) \cdot t_4\\ t_6 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\\ t_7 := t_0 \cdot t_4\\ t_8 := x1 + \left(\left(\left(\left(\left(t_5 \cdot \left(\frac{1}{x1 \cdot x1} \cdot \left(2 \cdot x2 - 3\right) - \frac{1}{x1}\right) + t_6\right) \cdot t_2 + t_7\right) + t_1\right) + x1\right) + t_3\right)\\ \mathbf{if}\;x1 \leq -1:\\ \;\;\;\;t_8\\ \mathbf{elif}\;x1 \leq 1:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(t_5 \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right) + t_6\right) \cdot t_2 + t_7\right) + t_1\right) + x1\right) + t_3\right)\\ \mathbf{else}:\\ \;\;\;\;t_8\\ \end{array} \]
Alternative 4
Error1.2
Cost8136
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := 2 \cdot x2 - 3\\ t_2 := x1 \cdot x1 + 1\\ t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\ t_4 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\ t_5 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\\ t_6 := t_0 \cdot t_4\\ t_7 := \left(2 \cdot x1\right) \cdot t_4\\ t_8 := \left(x1 \cdot x1\right) \cdot x1\\ \mathbf{if}\;x1 \leq -1:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(t_7 \cdot \left(\frac{\frac{-1}{x1}}{-x1} \cdot t_1 - \frac{1}{x1}\right) + t_5\right) \cdot t_2 + t_6\right) + t_8\right) + x1\right) + t_3\right)\\ \mathbf{elif}\;x1 \leq 1:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(t_7 \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right) + t_5\right) \cdot t_2 + t_6\right) + t_8\right) + x1\right) + t_3\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(t_7 \cdot \left(\frac{1}{x1 \cdot x1} \cdot t_1 - \frac{1}{x1}\right) + t_5\right) \cdot t_2 + t_6\right) + t_8\right) + x1\right) + t_3\right)\\ \end{array} \]
Alternative 5
Error0.5
Cost8128
\[\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} \]
Alternative 6
Error2.7
Cost7624
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := \left(x1 \cdot x1\right) \cdot x1\\ 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 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\ t_6 := \left(2 \cdot x1\right) \cdot t_3\\ t_7 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\\ \mathbf{if}\;x1 \leq -1.2:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(t_6 \cdot \left(\frac{\frac{-1}{x1}}{-x1} \cdot \left(2 \cdot x2 - 3\right) - \frac{1}{x1}\right) + 6 \cdot \left(x1 \cdot x1\right)\right) \cdot t_2 + t_4\right) + t_1\right) + x1\right) + t_5\right)\\ \mathbf{elif}\;x1 \leq 1.35:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(t_6 \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right) + t_7\right) \cdot t_2 + t_4\right) + t_1\right) + x1\right) + t_5\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(-6 + t_7\right) \cdot t_2 + t_4\right) + t_1\right) + x1\right) + t_5\right)\\ \end{array} \]
Alternative 7
Error2.8
Cost7496
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\\ t_3 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ t_4 := t_0 \cdot t_3\\ t_5 := \left(2 \cdot x1\right) \cdot t_3\\ t_6 := 2 \cdot x2 - 3\\ t_7 := \left(x1 \cdot x1\right) \cdot x1\\ t_8 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\\ \mathbf{if}\;x1 \leq -1:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(t_5 \cdot \left(\frac{\frac{-1}{x1}}{-x1} \cdot t_6 - \frac{1}{x1}\right) + 6 \cdot \left(x1 \cdot x1\right)\right) \cdot t_1 + t_4\right) + t_7\right) + x1\right) + t_2\right)\\ \mathbf{elif}\;x1 \leq 1.35:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(t_5 \cdot t_6 + t_8\right) \cdot t_1 + t_4\right) + t_7\right) + x1\right) + t_2\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(-6 + t_8\right) \cdot t_1 + t_4\right) + t_7\right) + x1\right) + t_2\right)\\ \end{array} \]
Alternative 8
Error2.8
Cost6788
\[\begin{array}{l} t_0 := 2 \cdot x2 - 3\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := \left(x1 \cdot x1\right) \cdot x1\\ t_3 := x1 \cdot x1 + 1\\ t_4 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_3}\\ t_5 := t_1 \cdot t_4\\ t_6 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_3}\\ \mathbf{if}\;x1 \leq -0.8:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_4\right) \cdot \left(\frac{\frac{-1}{x1}}{-x1} \cdot t_0 - \frac{1}{x1}\right) + 6 \cdot \left(x1 \cdot x1\right)\right) \cdot t_3 + t_5\right) + t_2\right) + x1\right) + t_6\right)\\ \mathbf{elif}\;x1 \leq 0.29:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot t_0\right)\right)\right) \cdot t_3 + t_5\right) + t_2\right) + x1\right) + t_6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(-6 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\right) \cdot t_3 + t_5\right) + t_2\right) + x1\right) + t_6\right)\\ \end{array} \]
Alternative 9
Error2.8
Cost6596
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\\ t_3 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ t_4 := t_0 \cdot t_3\\ t_5 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\\ t_6 := 2 \cdot x2 - 3\\ t_7 := \left(x1 \cdot x1\right) \cdot x1\\ \mathbf{if}\;x1 \leq -1.5:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(\left(2 \cdot \frac{1 + 3 \cdot t_6}{x1} - 6\right) + t_5\right) \cdot t_1 + t_4\right) + t_7\right) + x1\right) + t_2\right)\\ \mathbf{elif}\;x1 \leq 2.4:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot t_6\right)\right)\right) \cdot t_1 + t_4\right) + t_7\right) + x1\right) + t_2\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(-6 + t_5\right) \cdot t_1 + t_4\right) + t_7\right) + x1\right) + t_2\right)\\ \end{array} \]
Alternative 10
Error2.8
Cost5832
\[\begin{array}{l} t_0 := \left(x1 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \left(3 \cdot x1\right) \cdot x1\\ t_3 := 3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_1}\\ t_4 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_1}\\ t_5 := t_2 \cdot t_4\\ t_6 := x1 + \left(\left(\left(\left(\left(-6 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\right) \cdot t_1 + t_5\right) + t_0\right) + x1\right) + t_3\right)\\ \mathbf{if}\;x1 \leq -2.8:\\ \;\;\;\;t_6\\ \mathbf{elif}\;x1 \leq 2.7:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) \cdot t_1 + t_5\right) + t_0\right) + x1\right) + t_3\right)\\ \mathbf{else}:\\ \;\;\;\;t_6\\ \end{array} \]
Alternative 11
Error12.3
Cost4544
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ x1 + \left(\left(\left(\left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) \cdot t_0 + t_1 \cdot \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\right) \end{array} \]
Alternative 12
Error16.6
Cost1480
\[\begin{array}{l} t_0 := x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right) + -6 \cdot x2\right)\\ \mathbf{if}\;x1 \leq -7 \cdot 10^{-78}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-150}:\\ \;\;\;\;x1 + \left(-2 \cdot x1 + -6 \cdot x2\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 13
Error20.0
Cost576
\[x1 + \left(-2 \cdot x1 + -6 \cdot x2\right) \]
Alternative 14
Error34.2
Cost192
\[-6 \cdot x2 \]
Alternative 15
Error61.8
Cost64
\[x1 \]

Error

Reproduce?

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