Average Error: 0.0 → 0.0
Time: 4.1s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(x + 2.0 \cdot y\right)\]
\left(x \cdot x + \left(x \cdot 2.0\right) \cdot y\right) + y \cdot y
y \cdot y + x \cdot \left(x + 2.0 \cdot y\right)
double f(double x, double y) {
        double r13446489 = x;
        double r13446490 = r13446489 * r13446489;
        double r13446491 = 2.0;
        double r13446492 = r13446489 * r13446491;
        double r13446493 = y;
        double r13446494 = r13446492 * r13446493;
        double r13446495 = r13446490 + r13446494;
        double r13446496 = r13446493 * r13446493;
        double r13446497 = r13446495 + r13446496;
        return r13446497;
}

double f(double x, double y) {
        double r13446498 = y;
        double r13446499 = r13446498 * r13446498;
        double r13446500 = x;
        double r13446501 = 2.0;
        double r13446502 = r13446501 * r13446498;
        double r13446503 = r13446500 + r13446502;
        double r13446504 = r13446500 * r13446503;
        double r13446505 = r13446499 + r13446504;
        return r13446505;
}

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. Simplified0.0

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

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

Reproduce

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