Average Error: 0.0 → 0.0
Time: 2.2s
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 r481216 = x;
        double r481217 = 2.0;
        double r481218 = r481216 * r481217;
        double r481219 = r481216 * r481216;
        double r481220 = r481218 + r481219;
        double r481221 = y;
        double r481222 = r481221 * r481221;
        double r481223 = r481220 + r481222;
        return r481223;
}

double f(double x, double y) {
        double r481224 = x;
        double r481225 = 2.0;
        double r481226 = r481224 * r481225;
        double r481227 = r481224 * r481224;
        double r481228 = r481226 + r481227;
        double r481229 = y;
        double r481230 = r481229 * r481229;
        double r481231 = r481228 + r481230;
        return r481231;
}

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