Average Error: 0.0 → 0.0
Time: 4.6s
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 r745519 = x;
        double r745520 = r745519 * r745519;
        double r745521 = 2.0;
        double r745522 = r745519 * r745521;
        double r745523 = y;
        double r745524 = r745522 * r745523;
        double r745525 = r745520 + r745524;
        double r745526 = r745523 * r745523;
        double r745527 = r745525 + r745526;
        return r745527;
}

double f(double x, double y) {
        double r745528 = x;
        double r745529 = r745528 * r745528;
        double r745530 = 2.0;
        double r745531 = r745528 * r745530;
        double r745532 = y;
        double r745533 = r745531 * r745532;
        double r745534 = r745529 + r745533;
        double r745535 = r745532 * r745532;
        double r745536 = r745534 + r745535;
        return r745536;
}

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 2020047 +o rules:numerics
(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)))