Average Error: 0.0 → 0.0
Time: 1.0s
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 r442668 = x;
        double r442669 = 2.0;
        double r442670 = r442668 * r442669;
        double r442671 = r442668 * r442668;
        double r442672 = r442670 + r442671;
        double r442673 = y;
        double r442674 = r442673 * r442673;
        double r442675 = r442672 + r442674;
        return r442675;
}

double f(double x, double y) {
        double r442676 = x;
        double r442677 = 2.0;
        double r442678 = r442676 * r442677;
        double r442679 = r442676 * r442676;
        double r442680 = r442678 + r442679;
        double r442681 = y;
        double r442682 = r442681 * r442681;
        double r442683 = r442680 + r442682;
        return r442683;
}

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