Average Error: 0.0 → 0.0
Time: 951.0ms
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 r537604 = x;
        double r537605 = 2.0;
        double r537606 = r537604 * r537605;
        double r537607 = r537604 * r537604;
        double r537608 = r537606 + r537607;
        double r537609 = y;
        double r537610 = r537609 * r537609;
        double r537611 = r537608 + r537610;
        return r537611;
}

double f(double x, double y) {
        double r537612 = x;
        double r537613 = 2.0;
        double r537614 = r537612 * r537613;
        double r537615 = r537612 * r537612;
        double r537616 = r537614 + r537615;
        double r537617 = y;
        double r537618 = r537617 * r537617;
        double r537619 = r537616 + r537618;
        return r537619;
}

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