Average Error: 0.0 → 0.0
Time: 5.0s
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 r297457 = x;
        double r297458 = 2.0;
        double r297459 = r297457 * r297458;
        double r297460 = r297457 * r297457;
        double r297461 = r297459 + r297460;
        double r297462 = y;
        double r297463 = r297462 * r297462;
        double r297464 = r297461 + r297463;
        return r297464;
}

double f(double x, double y) {
        double r297465 = x;
        double r297466 = 2.0;
        double r297467 = r297465 * r297466;
        double r297468 = r297465 * r297465;
        double r297469 = r297467 + r297468;
        double r297470 = y;
        double r297471 = r297470 * r297470;
        double r297472 = r297469 + r297471;
        return r297472;
}

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