Average Error: 0.0 → 0.0
Time: 8.6s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(2 \cdot y + x\right)\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot y + x \cdot \left(2 \cdot y + x\right)
double f(double x, double y) {
        double r555271 = x;
        double r555272 = r555271 * r555271;
        double r555273 = 2.0;
        double r555274 = r555271 * r555273;
        double r555275 = y;
        double r555276 = r555274 * r555275;
        double r555277 = r555272 + r555276;
        double r555278 = r555275 * r555275;
        double r555279 = r555277 + r555278;
        return r555279;
}

double f(double x, double y) {
        double r555280 = y;
        double r555281 = r555280 * r555280;
        double r555282 = x;
        double r555283 = 2.0;
        double r555284 = r555283 * r555280;
        double r555285 = r555284 + r555282;
        double r555286 = r555282 * r555285;
        double r555287 = r555281 + r555286;
        return r555287;
}

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. Simplified0.0

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

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

Reproduce

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