Average Error: 0.0 → 0.0
Time: 4.5s
Precision: 64
\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(2 \cdot y + x\right)\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
y \cdot y + x \cdot \left(2 \cdot y + x\right)
double f(double x, double y) {
        double r441195 = x;
        double r441196 = r441195 * r441195;
        double r441197 = 2.0;
        double r441198 = r441195 * r441197;
        double r441199 = y;
        double r441200 = r441198 * r441199;
        double r441201 = r441196 + r441200;
        double r441202 = r441199 * r441199;
        double r441203 = r441201 + r441202;
        return r441203;
}

double f(double x, double y) {
        double r441204 = y;
        double r441205 = r441204 * r441204;
        double r441206 = x;
        double r441207 = 2.0;
        double r441208 = r441207 * r441204;
        double r441209 = r441208 + r441206;
        double r441210 = r441206 * r441209;
        double r441211 = r441205 + r441210;
        return r441211;
}

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 y + x \cdot \left(2 \cdot y + x\right)}\]
  3. Final simplification0.0

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

Reproduce

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