Average Error: 0.0 → 0.0
Time: 12.7s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(2 + x\right)\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
y \cdot y + x \cdot \left(2 + x\right)
double f(double x, double y) {
        double r402887 = x;
        double r402888 = 2.0;
        double r402889 = r402887 * r402888;
        double r402890 = r402887 * r402887;
        double r402891 = r402889 + r402890;
        double r402892 = y;
        double r402893 = r402892 * r402892;
        double r402894 = r402891 + r402893;
        return r402894;
}

double f(double x, double y) {
        double r402895 = y;
        double r402896 = r402895 * r402895;
        double r402897 = x;
        double r402898 = 2.0;
        double r402899 = r402898 + r402897;
        double r402900 = r402897 * r402899;
        double r402901 = r402896 + r402900;
        return r402901;
}

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

Reproduce

herbie shell --seed 2019294 
(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)))