Average Error: 0.0 → 0.0
Time: 5.3s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
double f(double x, double y) {
        double r350861 = x;
        double r350862 = 2.0;
        double r350863 = r350861 * r350862;
        double r350864 = r350861 * r350861;
        double r350865 = r350863 + r350864;
        double r350866 = y;
        double r350867 = r350866 * r350866;
        double r350868 = r350865 + r350867;
        return r350868;
}

double f(double x, double y) {
        double r350869 = x;
        double r350870 = 2.0;
        double r350871 = r350869 * r350870;
        double r350872 = r350869 * r350869;
        double r350873 = r350871 + r350872;
        double r350874 = y;
        double r350875 = r350874 * r350874;
        double r350876 = r350873 + r350875;
        return r350876;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[y \cdot y + \left(2 \cdot x + x \cdot x\right)\]

Derivation

  1. Initial program 0.0

    \[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
  2. Final simplification0.0

    \[\leadsto \left(x \cdot 2 + x \cdot x\right) + y \cdot y\]

Reproduce

herbie shell --seed 2019305 
(FPCore (x y)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, A"
  :precision binary64

  :herbie-target
  (+ (* y y) (+ (* 2 x) (* x x)))

  (+ (+ (* x 2) (* x x)) (* y y)))