Average Error: 0.0 → 0.0
Time: 1.3s
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 r884528 = x;
        double r884529 = r884528 * r884528;
        double r884530 = 2.0;
        double r884531 = r884528 * r884530;
        double r884532 = y;
        double r884533 = r884531 * r884532;
        double r884534 = r884529 + r884533;
        double r884535 = r884532 * r884532;
        double r884536 = r884534 + r884535;
        return r884536;
}

double f(double x, double y) {
        double r884537 = x;
        double r884538 = r884537 * r884537;
        double r884539 = 2.0;
        double r884540 = r884537 * r884539;
        double r884541 = y;
        double r884542 = r884540 * r884541;
        double r884543 = r884538 + r884542;
        double r884544 = r884541 * r884541;
        double r884545 = r884543 + r884544;
        return r884545;
}

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