Average Error: 0.0 → 0.0
Time: 3.4s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + \left(x \cdot x + x \cdot 2\right)\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
y \cdot y + \left(x \cdot x + x \cdot 2\right)
double f(double x, double y) {
        double r358773 = x;
        double r358774 = 2.0;
        double r358775 = r358773 * r358774;
        double r358776 = r358773 * r358773;
        double r358777 = r358775 + r358776;
        double r358778 = y;
        double r358779 = r358778 * r358778;
        double r358780 = r358777 + r358779;
        return r358780;
}

double f(double x, double y) {
        double r358781 = y;
        double r358782 = r358781 * r358781;
        double r358783 = x;
        double r358784 = r358783 * r358783;
        double r358785 = 2.0;
        double r358786 = r358783 * r358785;
        double r358787 = r358784 + r358786;
        double r358788 = r358782 + r358787;
        return r358788;
}

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 y \cdot y + \left(x \cdot x + x \cdot 2\right)\]

Reproduce

herbie shell --seed 2019195 
(FPCore (x y)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, A"

  :herbie-target
  (+ (* y y) (+ (* 2.0 x) (* x x)))

  (+ (+ (* x 2.0) (* x x)) (* y y)))