Average Error: 0.0 → 0.0
Time: 7.1s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(x + 2 \cdot y\right)\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot y + x \cdot \left(x + 2 \cdot y\right)
double f(double x, double y) {
        double r45399409 = x;
        double r45399410 = r45399409 * r45399409;
        double r45399411 = 2.0;
        double r45399412 = r45399409 * r45399411;
        double r45399413 = y;
        double r45399414 = r45399412 * r45399413;
        double r45399415 = r45399410 + r45399414;
        double r45399416 = r45399413 * r45399413;
        double r45399417 = r45399415 + r45399416;
        return r45399417;
}

double f(double x, double y) {
        double r45399418 = y;
        double r45399419 = r45399418 * r45399418;
        double r45399420 = x;
        double r45399421 = 2.0;
        double r45399422 = r45399421 * r45399418;
        double r45399423 = r45399420 + r45399422;
        double r45399424 = r45399420 * r45399423;
        double r45399425 = r45399419 + r45399424;
        return r45399425;
}

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 y + x \cdot \left(x + 2 \cdot y\right)}\]
  3. Final simplification0.0

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

Reproduce

herbie shell --seed 2019174 
(FPCore (x y)
  :name "Examples.Basics.ProofTests:f4 from sbv-4.4"

  :herbie-target
  (+ (* x x) (+ (* y y) (* (* x y) 2.0)))

  (+ (+ (* x x) (* (* x 2.0) y)) (* y y)))