Average Error: 0.0 → 0.0
Time: 10.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 r1130377 = x;
        double r1130378 = r1130377 * r1130377;
        double r1130379 = 2.0;
        double r1130380 = r1130377 * r1130379;
        double r1130381 = y;
        double r1130382 = r1130380 * r1130381;
        double r1130383 = r1130378 + r1130382;
        double r1130384 = r1130381 * r1130381;
        double r1130385 = r1130383 + r1130384;
        return r1130385;
}

double f(double x, double y) {
        double r1130386 = x;
        double r1130387 = r1130386 * r1130386;
        double r1130388 = 2.0;
        double r1130389 = r1130386 * r1130388;
        double r1130390 = y;
        double r1130391 = r1130389 * r1130390;
        double r1130392 = r1130387 + r1130391;
        double r1130393 = r1130390 * r1130390;
        double r1130394 = r1130392 + r1130393;
        return r1130394;
}

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