Average Error: 0.0 → 0.0
Time: 3.4s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[\left(y \cdot \left(x \cdot 2\right) + {y}^{2}\right) + x \cdot x\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
\left(y \cdot \left(x \cdot 2\right) + {y}^{2}\right) + x \cdot x
double f(double x, double y) {
        double r705292 = x;
        double r705293 = r705292 * r705292;
        double r705294 = 2.0;
        double r705295 = r705292 * r705294;
        double r705296 = y;
        double r705297 = r705295 * r705296;
        double r705298 = r705293 + r705297;
        double r705299 = r705296 * r705296;
        double r705300 = r705298 + r705299;
        return r705300;
}

double f(double x, double y) {
        double r705301 = y;
        double r705302 = x;
        double r705303 = 2.0;
        double r705304 = r705302 * r705303;
        double r705305 = r705301 * r705304;
        double r705306 = 2.0;
        double r705307 = pow(r705301, r705306);
        double r705308 = r705305 + r705307;
        double r705309 = r705302 * r705302;
        double r705310 = r705308 + r705309;
        return r705310;
}

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. Using strategy rm
  4. Applied distribute-lft-in0.0

    \[\leadsto \color{blue}{\left(y \cdot \left(x \cdot 2\right) + y \cdot y\right)} + x \cdot x\]
  5. Simplified0.0

    \[\leadsto \left(y \cdot \left(x \cdot 2\right) + \color{blue}{{y}^{2}}\right) + x \cdot x\]
  6. Final simplification0.0

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

Reproduce

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