Average Error: 0.0 → 0.0
Time: 5.0s
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 r762645 = x;
        double r762646 = r762645 * r762645;
        double r762647 = 2.0;
        double r762648 = r762645 * r762647;
        double r762649 = y;
        double r762650 = r762648 * r762649;
        double r762651 = r762646 + r762650;
        double r762652 = r762649 * r762649;
        double r762653 = r762651 + r762652;
        return r762653;
}

double f(double x, double y) {
        double r762654 = x;
        double r762655 = r762654 * r762654;
        double r762656 = 2.0;
        double r762657 = r762654 * r762656;
        double r762658 = y;
        double r762659 = r762657 * r762658;
        double r762660 = r762655 + r762659;
        double r762661 = r762658 * r762658;
        double r762662 = r762660 + r762661;
        return r762662;
}

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