Average Error: 0.0 → 0.0
Time: 6.5s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[x \cdot \left(2 \cdot y + x\right) + {y}^{2}\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
x \cdot \left(2 \cdot y + x\right) + {y}^{2}
double f(double x, double y) {
        double r425709 = x;
        double r425710 = r425709 * r425709;
        double r425711 = 2.0;
        double r425712 = r425709 * r425711;
        double r425713 = y;
        double r425714 = r425712 * r425713;
        double r425715 = r425710 + r425714;
        double r425716 = r425713 * r425713;
        double r425717 = r425715 + r425716;
        return r425717;
}

double f(double x, double y) {
        double r425718 = x;
        double r425719 = 2.0;
        double r425720 = y;
        double r425721 = r425719 * r425720;
        double r425722 = r425721 + r425718;
        double r425723 = r425718 * r425722;
        double r425724 = 2.0;
        double r425725 = pow(r425720, r425724);
        double r425726 = r425723 + r425725;
        return r425726;
}

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 x \cdot \left(2 \cdot y + x\right) + {y}^{2}\]

Reproduce

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