Average Error: 0.0 → 0.0
Time: 4.0s
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 r592186 = x;
        double r592187 = r592186 * r592186;
        double r592188 = 2.0;
        double r592189 = r592186 * r592188;
        double r592190 = y;
        double r592191 = r592189 * r592190;
        double r592192 = r592187 + r592191;
        double r592193 = r592190 * r592190;
        double r592194 = r592192 + r592193;
        return r592194;
}

double f(double x, double y) {
        double r592195 = x;
        double r592196 = r592195 * r592195;
        double r592197 = 2.0;
        double r592198 = r592195 * r592197;
        double r592199 = y;
        double r592200 = r592198 * r592199;
        double r592201 = r592196 + r592200;
        double r592202 = r592199 * r592199;
        double r592203 = r592201 + r592202;
        return r592203;
}

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