Average Error: 0.0 → 0.0
Time: 2.8s
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 r347868 = x;
        double r347869 = 2.0;
        double r347870 = r347868 * r347869;
        double r347871 = r347868 * r347868;
        double r347872 = r347870 + r347871;
        double r347873 = y;
        double r347874 = r347873 * r347873;
        double r347875 = r347872 + r347874;
        return r347875;
}

double f(double x, double y) {
        double r347876 = y;
        double r347877 = r347876 * r347876;
        double r347878 = x;
        double r347879 = 2.0;
        double r347880 = r347879 + r347878;
        double r347881 = r347878 * r347880;
        double r347882 = r347877 + r347881;
        return r347882;
}

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 2019308 
(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)))