Average Error: 0.0 → 0.0
Time: 2.7s
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 r544477 = x;
        double r544478 = r544477 * r544477;
        double r544479 = 2.0;
        double r544480 = r544477 * r544479;
        double r544481 = y;
        double r544482 = r544480 * r544481;
        double r544483 = r544478 + r544482;
        double r544484 = r544481 * r544481;
        double r544485 = r544483 + r544484;
        return r544485;
}

double f(double x, double y) {
        double r544486 = x;
        double r544487 = r544486 * r544486;
        double r544488 = 2.0;
        double r544489 = r544486 * r544488;
        double r544490 = y;
        double r544491 = r544489 * r544490;
        double r544492 = r544487 + r544491;
        double r544493 = r544490 * r544490;
        double r544494 = r544492 + r544493;
        return r544494;
}

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 2019350 
(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)))