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\]
\[y \cdot \left(x \cdot 2 + y\right) + x \cdot x\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot \left(x \cdot 2 + y\right) + x \cdot x
double f(double x, double y) {
        double r740540 = x;
        double r740541 = r740540 * r740540;
        double r740542 = 2.0;
        double r740543 = r740540 * r740542;
        double r740544 = y;
        double r740545 = r740543 * r740544;
        double r740546 = r740541 + r740545;
        double r740547 = r740544 * r740544;
        double r740548 = r740546 + r740547;
        return r740548;
}

double f(double x, double y) {
        double r740549 = y;
        double r740550 = x;
        double r740551 = 2.0;
        double r740552 = r740550 * r740551;
        double r740553 = r740552 + r740549;
        double r740554 = r740549 * r740553;
        double r740555 = r740550 * r740550;
        double r740556 = r740554 + r740555;
        return r740556;
}

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. Final simplification0.0

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

Reproduce

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