Average Error: 0.0 → 0.0
Time: 11.8s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + \left(x \cdot x + \left(x \cdot 2\right) \cdot y\right)\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot y + \left(x \cdot x + \left(x \cdot 2\right) \cdot y\right)
double f(double x, double y) {
        double r437614 = x;
        double r437615 = r437614 * r437614;
        double r437616 = 2.0;
        double r437617 = r437614 * r437616;
        double r437618 = y;
        double r437619 = r437617 * r437618;
        double r437620 = r437615 + r437619;
        double r437621 = r437618 * r437618;
        double r437622 = r437620 + r437621;
        return r437622;
}

double f(double x, double y) {
        double r437623 = y;
        double r437624 = r437623 * r437623;
        double r437625 = x;
        double r437626 = r437625 * r437625;
        double r437627 = 2.0;
        double r437628 = r437625 * r437627;
        double r437629 = r437628 * r437623;
        double r437630 = r437626 + r437629;
        double r437631 = r437624 + r437630;
        return r437631;
}

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

Reproduce

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