Average Error: 0.0 → 0.0
Time: 1.2s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[\left(y \cdot \left(x \cdot 2\right) + {y}^{2}\right) + x \cdot x\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
\left(y \cdot \left(x \cdot 2\right) + {y}^{2}\right) + x \cdot x
double f(double x, double y) {
        double r601335 = x;
        double r601336 = r601335 * r601335;
        double r601337 = 2.0;
        double r601338 = r601335 * r601337;
        double r601339 = y;
        double r601340 = r601338 * r601339;
        double r601341 = r601336 + r601340;
        double r601342 = r601339 * r601339;
        double r601343 = r601341 + r601342;
        return r601343;
}

double f(double x, double y) {
        double r601344 = y;
        double r601345 = x;
        double r601346 = 2.0;
        double r601347 = r601345 * r601346;
        double r601348 = r601344 * r601347;
        double r601349 = 2.0;
        double r601350 = pow(r601344, r601349);
        double r601351 = r601348 + r601350;
        double r601352 = r601345 * r601345;
        double r601353 = r601351 + r601352;
        return r601353;
}

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 \left(x \cdot 2 + y\right) + x \cdot x}\]
  3. Using strategy rm
  4. Applied distribute-lft-in0.0

    \[\leadsto \color{blue}{\left(y \cdot \left(x \cdot 2\right) + y \cdot y\right)} + x \cdot x\]
  5. Simplified0.0

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

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

Reproduce

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