?

Average Error: 0.5 → 0.5
Time: 59.6s
Precision: binary64
Cost: 8128

?

\[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot 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 := 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}\\ x1 + \left(x1 + \left(\left(t_1 \cdot \left(t_2 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_2 - 3\right)\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(\left(x1 \cdot 3\right) \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)\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 (* x1 (* x1 3.0)))
        (t_1 (+ (* x1 x1) 1.0))
        (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
   (+
    x1
    (+
     x1
     (+
      (+
       (*
        t_1
        (+
         (* t_2 (* (* x1 2.0) (- t_2 3.0)))
         (* (* x1 x1) (- (* t_2 4.0) 6.0))))
       (+ (* x1 (* (* x1 3.0) t_2)) (* x1 (* x1 x1))))
      (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))))))
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 = x1 * (x1 * 3.0);
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	return x1 + (x1 + (((t_1 * ((t_2 * ((x1 * 2.0) * (t_2 - 3.0))) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + ((x1 * ((x1 * 3.0) * t_2)) + (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
    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
    t_0 = x1 * (x1 * 3.0d0)
    t_1 = (x1 * x1) + 1.0d0
    t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
    code = x1 + (x1 + (((t_1 * ((t_2 * ((x1 * 2.0d0) * (t_2 - 3.0d0))) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + ((x1 * ((x1 * 3.0d0) * t_2)) + (x1 * (x1 * x1)))) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1))))
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 = x1 * (x1 * 3.0);
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	return x1 + (x1 + (((t_1 * ((t_2 * ((x1 * 2.0) * (t_2 - 3.0))) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + ((x1 * ((x1 * 3.0) * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))));
}
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 = x1 * (x1 * 3.0)
	t_1 = (x1 * x1) + 1.0
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1
	return x1 + (x1 + (((t_1 * ((t_2 * ((x1 * 2.0) * (t_2 - 3.0))) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + ((x1 * ((x1 * 3.0) * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))))
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(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)
	return Float64(x1 + Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(t_2 * Float64(Float64(x1 * 2.0) * Float64(t_2 - 3.0))) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))))
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 = x1 * (x1 * 3.0);
	t_1 = (x1 * x1) + 1.0;
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	tmp = x1 + (x1 + (((t_1 * ((t_2 * ((x1 * 2.0) * (t_2 - 3.0))) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + ((x1 * ((x1 * 3.0) * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))));
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[(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]}, N[(x1 + N[(x1 + N[(N[(N[(t$95$1 * N[(N[(t$95$2 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 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]), $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 := 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}\\
x1 + \left(x1 + \left(\left(t_1 \cdot \left(t_2 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_2 - 3\right)\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + \left(x1 \cdot \left(\left(x1 \cdot 3\right) \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)\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. Simplified0.5

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

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

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

    \[ x1 + \color{blue}{\left(3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot 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)\right)} \]
  3. Final simplification0.5

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

Alternatives

Alternative 1
Error0.5
Cost8000
\[\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}\\ \left(t_0 \cdot \left(t_2 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_2 - 3\right)\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{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\right) + x1\right) \end{array} \]
Alternative 2
Error2.0
Cost7240
\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\\ t_3 := x1 \cdot \left(x1 \cdot 3\right)\\ t_4 := \frac{\left(t_3 + 2 \cdot x2\right) - x1}{t_1}\\ t_5 := \left(x1 + 3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_1}\right) + x1\\ t_6 := x2 + \left(t_3 + \left(x2 - x1\right)\right)\\ t_7 := \frac{t_6}{t_0}\\ \mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{+123}:\\ \;\;\;\;\left(t_1 \cdot \left(t_4 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_4 - 3\right)\right) + 2 \cdot \frac{x1}{\frac{0.3333333333333333}{x1}}\right) + t_2\right) + t_5\\ \mathbf{elif}\;2 \cdot x2 \leq 2 \cdot 10^{+149}:\\ \;\;\;\;\left(t_1 \cdot \left(x1 \cdot \left(x1 \cdot \left(4 \cdot t_7 + -6\right) + 2 \cdot \frac{t_6}{\frac{t_0}{-3 + t_7}}\right)\right) + t_2\right) + t_5\\ \mathbf{else}:\\ \;\;\;\;\left(-6 + \left(x2 + \left(x2 + -3\right)\right) \cdot \left(x1 \cdot 4\right)\right) \cdot x2\\ \end{array} \]
Alternative 3
Error1.8
Cost7240
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_0}\\ t_4 := \frac{t_2 + \left(2 \cdot x2 - x1\right)}{t_0}\\ t_5 := 3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0}\\ t_6 := \left(t_0 \cdot \left(t_3 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_3 - 3\right)\right) + 2 \cdot \frac{x1}{\frac{0.3333333333333333}{x1}}\right) + t_1\right) + \left(\left(x1 + t_5\right) + x1\right)\\ \mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{+123}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;2 \cdot x2 \leq 5 \cdot 10^{+138}:\\ \;\;\;\;\left(t_0 \cdot \left(x1 \cdot \left(x1 \cdot \left(t_4 \cdot 4 - 6\right) + \left(t_4 - 3\right) \cdot \left(2 \cdot t_4\right)\right)\right) + t_1\right) + \left(t_5 + \left(x1 + x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_6\\ \end{array} \]
Alternative 4
Error1.5
Cost6976
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := x1 \cdot x1 + 1\\ t_3 := x2 + \left(3 \cdot \left(x1 \cdot x1\right) + \left(x2 - x1\right)\right)\\ \left(t_2 \cdot \left(t_3 \cdot \left(\left(\frac{t_3}{t_1} + -3\right) \cdot \left(\frac{2}{t_1} \cdot x1\right)\right) + \frac{\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{x2 + \left(t_0 + \left(x2 - x1\right)\right)}{t_1} + -6\right)}{1}\right) + x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\right) + \left(\left(x1 + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\right) + x1\right) \end{array} \]
Alternative 5
Error1.5
Cost6976
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x2 + \left(t_0 + \left(x2 - x1\right)\right)\\ t_2 := x1 \cdot x1 + 1\\ \left(t_2 \cdot \left(\frac{2}{\frac{t_2}{\frac{t_1}{t_2} + -3}} \cdot \left(x1 \cdot t_1\right) + \frac{\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{t_1}{1 + x1 \cdot x1} + -6\right)}{1}\right) + x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\right) + \left(\left(x1 + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\right) + x1\right) \end{array} \]
Alternative 6
Error1.5
Cost6848
\[\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}\\ \left(t_0 \cdot \left(t_2 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_2 - 3\right)\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\right) + \left(\left(x1 + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\right) + x1\right) \end{array} \]
Alternative 7
Error3.0
Cost5696
\[\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}\\ \left(t_0 \cdot \left(t_2 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_2 - 3\right)\right) + 2 \cdot \frac{x1}{\frac{0.3333333333333333}{x1}}\right) + x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\right) + \left(\left(x1 + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\right) + x1\right) \end{array} \]
Alternative 8
Error2.6
Cost4936
\[\begin{array}{l} t_0 := x2 \cdot 2 - 3\\ t_1 := x1 \cdot x1 + 1\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := 3 \cdot \frac{\left(t_2 - x1\right) - 2 \cdot x2}{t_1} + \left(x1 + x1\right)\\ t_4 := x1 \cdot \left(x1 \cdot \left(x1 + 3 \cdot \frac{t_2 + \left(2 \cdot x2 - x1\right)}{t_1}\right) + t_1 \cdot \left(x1 \cdot 6 + \left(-4 - \frac{6 + t_0 \cdot -4}{x1}\right)\right)\right) + t_3\\ \mathbf{if}\;x1 \leq -3.1:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x1 \leq 3:\\ \;\;\;\;t_0 \cdot \left(\left(x2 \cdot x1\right) \cdot 4\right) + t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 9
Error5.2
Cost4928
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ \left(t_0 \cdot \left(4 \cdot \left(\left(x2 \cdot 2 - 3\right) \cdot \left(x2 \cdot x1\right)\right) + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0} \cdot 4 - 6\right)\right) + x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\right) + \left(\left(x1 + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\right) + x1\right) \end{array} \]
Alternative 10
Error2.6
Cost4552
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot x1 + 1\\ \mathbf{if}\;x1 \leq -3.1:\\ \;\;\;\;\left(t_1 \cdot \left(-6 + \frac{\frac{t_0 + \left(x2 + \left(x2 - x1\right)\right)}{t_1} \cdot 4 + -6}{\frac{1}{x1 \cdot x1}}\right) + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\right) + \left(\left(-2 \cdot x1 + -6 \cdot x2\right) + x1\right)\\ \mathbf{elif}\;x1 \leq 0.42:\\ \;\;\;\;\left(x2 \cdot 2 - 3\right) \cdot \left(\left(x2 \cdot x1\right) \cdot 4\right) + \left(3 \cdot \frac{\left(t_0 - x1\right) - 2 \cdot x2}{t_1} + \left(x1 + x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_1 \cdot \left(-6 + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1} \cdot 4 - 6\right)\right) + x1 \cdot \left(x1 \cdot x1 + x1 \cdot 9\right)\right) + \left(\left(x1 + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) + x1\right)\\ \end{array} \]
Alternative 11
Error2.6
Cost3912
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \left(t_1 \cdot \left(-6 + \frac{\frac{t_0 + \left(x2 + \left(x2 - x1\right)\right)}{t_1} \cdot 4 + -6}{\frac{1}{x1 \cdot x1}}\right) + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\right) + \left(\left(-2 \cdot x1 + -6 \cdot x2\right) + x1\right)\\ \mathbf{if}\;x1 \leq -3.2:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x1 \leq 3:\\ \;\;\;\;\left(x2 \cdot 2 - 3\right) \cdot \left(\left(x2 \cdot x1\right) \cdot 4\right) + \left(3 \cdot \frac{\left(t_0 - x1\right) - 2 \cdot x2}{t_1} + \left(x1 + x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error2.6
Cost3656
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \left(t_1 \cdot \left(-6 + \frac{\frac{t_0 + \left(x2 + \left(x2 - x1\right)\right)}{t_1} \cdot 4 + -6}{\frac{1}{x1 \cdot x1}}\right) + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\right) + \left(-6 \cdot x2 + x1\right)\\ \mathbf{if}\;x1 \leq -3.9:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x1 \leq 0.36:\\ \;\;\;\;\left(x2 \cdot 2 - 3\right) \cdot \left(\left(x2 \cdot x1\right) \cdot 4\right) + \left(3 \cdot \frac{\left(t_0 - x1\right) - 2 \cdot x2}{t_1} + \left(x1 + x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 13
Error2.6
Cost3528
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \left(t_1 \cdot \left(-6 + \frac{\frac{t_0 + \left(x2 + \left(x2 - x1\right)\right)}{t_1} \cdot 4 + -6}{\frac{1}{x1 \cdot x1}}\right) + x1 \cdot \left(x1 \cdot x1 + \left(x1 \cdot 9 - 3\right)\right)\right) + \left(x1 + x1\right)\\ \mathbf{if}\;x1 \leq -3.1:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x1 \leq 3.1:\\ \;\;\;\;\left(x2 \cdot 2 - 3\right) \cdot \left(\left(x2 \cdot x1\right) \cdot 4\right) + \left(3 \cdot \frac{\left(t_0 - x1\right) - 2 \cdot x2}{t_1} + \left(x1 + x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Error3.7
Cost2504
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x2 \cdot \left(x1 \cdot 6\right) + t_0 \cdot \left(x1 \cdot 6\right)\right) + \left(x2 \cdot -6 + \left(-x1\right)\right)\\ \mathbf{if}\;x1 \leq -3.5:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq 5.5:\\ \;\;\;\;\left(x2 \cdot 2 - 3\right) \cdot \left(\left(x2 \cdot x1\right) \cdot 4\right) + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x1\right) - 2 \cdot x2}{t_0} + \left(x1 + x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error3.7
Cost2504
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x1\right) - 2 \cdot x2}{t_0} + \left(x1 + x1\right)\\ \mathbf{if}\;x1 \leq -3.1:\\ \;\;\;\;6 \cdot \left(x1 \cdot \left(x1 \cdot \left(x1 \cdot x1 + \left(x2 + 1\right)\right)\right)\right) + t_1\\ \mathbf{elif}\;x1 \leq 2.5:\\ \;\;\;\;\left(x2 \cdot 2 - 3\right) \cdot \left(\left(x2 \cdot x1\right) \cdot 4\right) + t_1\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \left(x2 \cdot \left(x1 \cdot 6\right) + t_0 \cdot \left(x1 \cdot 6\right)\right) + \left(x2 \cdot -6 + \left(-x1\right)\right)\\ \end{array} \]
Alternative 16
Error9.3
Cost1872
\[\begin{array}{l} t_0 := x1 \cdot \left(x2 \cdot \left(x1 \cdot 6\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(x1 \cdot 6\right)\right) + x2 \cdot -6\\ t_1 := x1 \cdot \left(x2 \cdot \left(4 \cdot \left(x2 \cdot 2 - 3\right)\right)\right) + \left(x2 \cdot -6 + \left(-x1\right)\right)\\ \mathbf{if}\;x1 \leq -3.3:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq -5.9 \cdot 10^{-192}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq 1.4 \cdot 10^{-168}:\\ \;\;\;\;\left(-6 + \left(x2 + \left(x2 + -3\right)\right) \cdot \left(x1 \cdot 4\right)\right) \cdot x2\\ \mathbf{elif}\;x1 \leq 1.7:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 17
Error5.0
Cost1800
\[\begin{array}{l} t_0 := \left(-6 + \left(x2 + \left(x2 + -3\right)\right) \cdot \left(x1 \cdot 4\right)\right) \cdot x2\\ \mathbf{if}\;x2 \leq -2.15 \cdot 10^{+73}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x2 \leq 7.5 \cdot 10^{+61}:\\ \;\;\;\;x1 \cdot \left(x2 \cdot \left(x1 \cdot 6\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(x1 \cdot 6\right)\right) + \left(x2 \cdot -6 + \left(-x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 18
Error12.3
Cost1416
\[\begin{array}{l} t_0 := \left(-6 + \left(x2 + \left(x2 + -3\right)\right) \cdot \left(x1 \cdot 4\right)\right) \cdot x2\\ \mathbf{if}\;x2 \leq -1 \cdot 10^{+121}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x2 \leq 8.8 \cdot 10^{-7}:\\ \;\;\;\;x1 \cdot \left(x2 \cdot \left(4 \cdot \left(x2 \cdot 2 - 3\right)\right)\right) + \left(x2 \cdot -6 + \left(-x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 19
Error26.3
Cost832
\[\left(-6 + \left(x2 + \left(x2 + -3\right)\right) \cdot \left(x1 \cdot 4\right)\right) \cdot x2 \]
Alternative 20
Error34.2
Cost448
\[x2 \cdot \left(x1 \cdot -12 - 6\right) \]
Alternative 21
Error34.2
Cost192
\[-6 \cdot x2 \]

Error

Reproduce?

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