Average Error: 0.0 → 0.0
Time: 4.2s
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 r597646 = x;
        double r597647 = r597646 * r597646;
        double r597648 = 2.0;
        double r597649 = r597646 * r597648;
        double r597650 = y;
        double r597651 = r597649 * r597650;
        double r597652 = r597647 + r597651;
        double r597653 = r597650 * r597650;
        double r597654 = r597652 + r597653;
        return r597654;
}

double f(double x, double y) {
        double r597655 = x;
        double r597656 = r597655 * r597655;
        double r597657 = 2.0;
        double r597658 = r597655 * r597657;
        double r597659 = y;
        double r597660 = r597658 * r597659;
        double r597661 = r597656 + r597660;
        double r597662 = r597659 * r597659;
        double r597663 = r597661 + r597662;
        return r597663;
}

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