Average Error: 0.0 → 0.0
Time: 6.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 r336717 = x;
        double r336718 = 2.0;
        double r336719 = r336717 * r336718;
        double r336720 = r336717 * r336717;
        double r336721 = r336719 + r336720;
        double r336722 = y;
        double r336723 = r336722 * r336722;
        double r336724 = r336721 + r336723;
        return r336724;
}

double f(double x, double y) {
        double r336725 = x;
        double r336726 = 2.0;
        double r336727 = r336725 * r336726;
        double r336728 = r336725 * r336725;
        double r336729 = r336727 + r336728;
        double r336730 = y;
        double r336731 = r336730 * r336730;
        double r336732 = r336729 + r336731;
        return r336732;
}

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