Average Error: 0.0 → 0.0
Time: 2.5s
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 r477689 = x;
        double r477690 = r477689 * r477689;
        double r477691 = 2.0;
        double r477692 = r477689 * r477691;
        double r477693 = y;
        double r477694 = r477692 * r477693;
        double r477695 = r477690 + r477694;
        double r477696 = r477693 * r477693;
        double r477697 = r477695 + r477696;
        return r477697;
}

double f(double x, double y) {
        double r477698 = x;
        double r477699 = r477698 * r477698;
        double r477700 = 2.0;
        double r477701 = r477698 * r477700;
        double r477702 = y;
        double r477703 = r477701 * r477702;
        double r477704 = r477699 + r477703;
        double r477705 = r477702 * r477702;
        double r477706 = r477704 + r477705;
        return r477706;
}

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