Average Error: 0.0 → 0.0
Time: 8.4s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + \left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right)\]
\left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right) + y \cdot y
y \cdot y + \left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right)
double f(double x, double y) {
        double r29290523 = x;
        double r29290524 = r29290523 * r29290523;
        double r29290525 = 2.0;
        double r29290526 = r29290523 * r29290525;
        double r29290527 = y;
        double r29290528 = r29290526 * r29290527;
        double r29290529 = r29290524 + r29290528;
        double r29290530 = r29290527 * r29290527;
        double r29290531 = r29290529 + r29290530;
        return r29290531;
}

double f(double x, double y) {
        double r29290532 = y;
        double r29290533 = r29290532 * r29290532;
        double r29290534 = x;
        double r29290535 = r29290534 * r29290534;
        double r29290536 = 2.0;
        double r29290537 = r29290534 * r29290536;
        double r29290538 = r29290537 * r29290532;
        double r29290539 = r29290535 + r29290538;
        double r29290540 = r29290533 + r29290539;
        return r29290540;
}

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.0\right)\]

Derivation

  1. Initial program 0.0

    \[\left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right) + y \cdot y\]
  2. Final simplification0.0

    \[\leadsto y \cdot y + \left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right)\]

Reproduce

herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y)
  :name "Examples.Basics.ProofTests:f4 from sbv-4.4"

  :herbie-target
  (+ (* x x) (+ (* y y) (* (* x y) 2.0)))

  (+ (+ (* x x) (* (* x 2.0) y)) (* y y)))