Average Error: 0.0 → 0.0
Time: 5.1s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
double f(double x, double y) {
        double r341390 = x;
        double r341391 = 2.0;
        double r341392 = r341390 * r341391;
        double r341393 = r341390 * r341390;
        double r341394 = r341392 + r341393;
        double r341395 = y;
        double r341396 = r341395 * r341395;
        double r341397 = r341394 + r341396;
        return r341397;
}

double f(double x, double y) {
        double r341398 = x;
        double r341399 = 2.0;
        double r341400 = r341398 * r341399;
        double r341401 = r341398 * r341398;
        double r341402 = r341400 + r341401;
        double r341403 = y;
        double r341404 = r341403 * r341403;
        double r341405 = r341402 + r341404;
        return r341405;
}

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
\[y \cdot y + \left(2 \cdot x + x \cdot x\right)\]

Derivation

  1. Initial program 0.0

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

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

Reproduce

herbie shell --seed 2019303 +o rules:numerics
(FPCore (x y)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, A"
  :precision binary64

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

  (+ (+ (* x 2) (* x x)) (* y y)))