Average Error: 0.0 → 0.0
Time: 3.4s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
double f(double x, double y) {
        double r352964 = x;
        double r352965 = r352964 * r352964;
        double r352966 = 2.0;
        double r352967 = r352964 * r352966;
        double r352968 = y;
        double r352969 = r352967 * r352968;
        double r352970 = r352965 + r352969;
        double r352971 = r352968 * r352968;
        double r352972 = r352970 + r352971;
        return r352972;
}

double f(double x, double y) {
        double r352973 = x;
        double r352974 = r352973 * r352973;
        double r352975 = 2.0;
        double r352976 = r352973 * r352975;
        double r352977 = y;
        double r352978 = r352976 * r352977;
        double r352979 = r352974 + r352978;
        double r352980 = r352977 * r352977;
        double r352981 = r352979 + r352980;
        return r352981;
}

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
\[x \cdot x + \left(y \cdot y + \left(x \cdot y\right) \cdot 2\right)\]

Derivation

  1. Initial program 0.0

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

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

Reproduce

herbie shell --seed 2020042 
(FPCore (x y)
  :name "Examples.Basics.ProofTests:f4 from sbv-4.4"
  :precision binary64

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

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