Average Error: 0.0 → 0.0
Time: 1.3s
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 r761341 = x;
        double r761342 = r761341 * r761341;
        double r761343 = 2.0;
        double r761344 = r761341 * r761343;
        double r761345 = y;
        double r761346 = r761344 * r761345;
        double r761347 = r761342 + r761346;
        double r761348 = r761345 * r761345;
        double r761349 = r761347 + r761348;
        return r761349;
}

double f(double x, double y) {
        double r761350 = x;
        double r761351 = r761350 * r761350;
        double r761352 = 2.0;
        double r761353 = r761350 * r761352;
        double r761354 = y;
        double r761355 = r761353 * r761354;
        double r761356 = r761351 + r761355;
        double r761357 = r761354 * r761354;
        double r761358 = r761356 + r761357;
        return r761358;
}

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