Average Error: 0.0 → 0.0
Time: 8.8s
Precision: 64
\[-1 \le x \le 1 \land -1 \le y \le 1\]
\[1 - \left(x \cdot x + y \cdot y\right)\]
\[1 - \left(\sqrt[3]{x \cdot x + y \cdot y} \cdot \sqrt[3]{x \cdot x + y \cdot y}\right) \cdot \sqrt[3]{x \cdot x + y \cdot y}\]
1 - \left(x \cdot x + y \cdot y\right)
1 - \left(\sqrt[3]{x \cdot x + y \cdot y} \cdot \sqrt[3]{x \cdot x + y \cdot y}\right) \cdot \sqrt[3]{x \cdot x + y \cdot y}
double f(double x, double y) {
        double r19764 = 1.0;
        double r19765 = x;
        double r19766 = r19765 * r19765;
        double r19767 = y;
        double r19768 = r19767 * r19767;
        double r19769 = r19766 + r19768;
        double r19770 = r19764 - r19769;
        return r19770;
}

double f(double x, double y) {
        double r19771 = 1.0;
        double r19772 = x;
        double r19773 = r19772 * r19772;
        double r19774 = y;
        double r19775 = r19774 * r19774;
        double r19776 = r19773 + r19775;
        double r19777 = cbrt(r19776);
        double r19778 = r19777 * r19777;
        double r19779 = r19778 * r19777;
        double r19780 = r19771 - r19779;
        return r19780;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[1 - \left(x \cdot x + y \cdot y\right)\]
  2. Using strategy rm
  3. Applied add-cube-cbrt0.0

    \[\leadsto 1 - \color{blue}{\left(\sqrt[3]{x \cdot x + y \cdot y} \cdot \sqrt[3]{x \cdot x + y \cdot y}\right) \cdot \sqrt[3]{x \cdot x + y \cdot y}}\]
  4. Final simplification0.0

    \[\leadsto 1 - \left(\sqrt[3]{x \cdot x + y \cdot y} \cdot \sqrt[3]{x \cdot x + y \cdot y}\right) \cdot \sqrt[3]{x \cdot x + y \cdot y}\]

Reproduce

herbie shell --seed 1 
(FPCore (x y)
  :name "1 - (x*x + y*y)"
  :precision binary64
  :pre (and (<= (- 1) x 1) (<= (- 1) y 1))
  (- 1 (+ (* x x) (* y y))))