Average Error: 0.0 → 0.0
Time: 9.7s
Precision: 64
\[\left(x \cdot 2.0 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + \left(x \cdot x + x \cdot 2.0\right)\]
\left(x \cdot 2.0 + x \cdot x\right) + y \cdot y
y \cdot y + \left(x \cdot x + x \cdot 2.0\right)
double f(double x, double y) {
        double r24987196 = x;
        double r24987197 = 2.0;
        double r24987198 = r24987196 * r24987197;
        double r24987199 = r24987196 * r24987196;
        double r24987200 = r24987198 + r24987199;
        double r24987201 = y;
        double r24987202 = r24987201 * r24987201;
        double r24987203 = r24987200 + r24987202;
        return r24987203;
}

double f(double x, double y) {
        double r24987204 = y;
        double r24987205 = r24987204 * r24987204;
        double r24987206 = x;
        double r24987207 = r24987206 * r24987206;
        double r24987208 = 2.0;
        double r24987209 = r24987206 * r24987208;
        double r24987210 = r24987207 + r24987209;
        double r24987211 = r24987205 + r24987210;
        return r24987211;
}

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.0 \cdot x + x \cdot x\right)\]

Derivation

  1. Initial program 0.0

    \[\left(x \cdot 2.0 + x \cdot x\right) + y \cdot y\]
  2. Final simplification0.0

    \[\leadsto y \cdot y + \left(x \cdot x + x \cdot 2.0\right)\]

Reproduce

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