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 r513382 = x;
        double r513383 = 2.0;
        double r513384 = r513382 * r513383;
        double r513385 = r513382 * r513382;
        double r513386 = r513384 + r513385;
        double r513387 = y;
        double r513388 = r513387 * r513387;
        double r513389 = r513386 + r513388;
        return r513389;
}

double f(double x, double y) {
        double r513390 = x;
        double r513391 = 2.0;
        double r513392 = r513390 * r513391;
        double r513393 = r513390 * r513390;
        double r513394 = r513392 + r513393;
        double r513395 = y;
        double r513396 = r513395 * r513395;
        double r513397 = r513394 + r513396;
        return r513397;
}

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