Average Error: 0.0 → 0.0
Time: 915.0ms
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 r392950 = x;
        double r392951 = 2.0;
        double r392952 = r392950 * r392951;
        double r392953 = r392950 * r392950;
        double r392954 = r392952 + r392953;
        double r392955 = y;
        double r392956 = r392955 * r392955;
        double r392957 = r392954 + r392956;
        return r392957;
}

double f(double x, double y) {
        double r392958 = x;
        double r392959 = 2.0;
        double r392960 = r392958 * r392959;
        double r392961 = r392958 * r392958;
        double r392962 = r392960 + r392961;
        double r392963 = y;
        double r392964 = r392963 * r392963;
        double r392965 = r392962 + r392964;
        return r392965;
}

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