Average Error: 0.0 → 0.0
Time: 3.5s
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 r387494 = x;
        double r387495 = 2.0;
        double r387496 = r387494 * r387495;
        double r387497 = r387494 * r387494;
        double r387498 = r387496 + r387497;
        double r387499 = y;
        double r387500 = r387499 * r387499;
        double r387501 = r387498 + r387500;
        return r387501;
}

double f(double x, double y) {
        double r387502 = x;
        double r387503 = 2.0;
        double r387504 = r387502 * r387503;
        double r387505 = r387502 * r387502;
        double r387506 = r387504 + r387505;
        double r387507 = y;
        double r387508 = r387507 * r387507;
        double r387509 = r387506 + r387508;
        return r387509;
}

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