Average Error: 0.0 → 0.0
Time: 1.9s
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 r376531 = x;
        double r376532 = 2.0;
        double r376533 = r376531 * r376532;
        double r376534 = r376531 * r376531;
        double r376535 = r376533 + r376534;
        double r376536 = y;
        double r376537 = r376536 * r376536;
        double r376538 = r376535 + r376537;
        return r376538;
}

double f(double x, double y) {
        double r376539 = x;
        double r376540 = 2.0;
        double r376541 = r376539 * r376540;
        double r376542 = r376539 * r376539;
        double r376543 = r376541 + r376542;
        double r376544 = y;
        double r376545 = r376544 * r376544;
        double r376546 = r376543 + r376545;
        return r376546;
}

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