Average Error: 0.0 → 0.0
Time: 7.9s
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 r1293259 = x;
        double r1293260 = r1293259 * r1293259;
        double r1293261 = 2.0;
        double r1293262 = r1293259 * r1293261;
        double r1293263 = y;
        double r1293264 = r1293262 * r1293263;
        double r1293265 = r1293260 + r1293264;
        double r1293266 = r1293263 * r1293263;
        double r1293267 = r1293265 + r1293266;
        return r1293267;
}

double f(double x, double y) {
        double r1293268 = x;
        double r1293269 = r1293268 * r1293268;
        double r1293270 = 2.0;
        double r1293271 = r1293268 * r1293270;
        double r1293272 = y;
        double r1293273 = r1293271 * r1293272;
        double r1293274 = r1293269 + r1293273;
        double r1293275 = r1293272 * r1293272;
        double r1293276 = r1293274 + r1293275;
        return r1293276;
}

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