Average Error: 0.0 → 0.0
Time: 4.1s
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 r326325 = x;
        double r326326 = 2.0;
        double r326327 = r326325 * r326326;
        double r326328 = r326325 * r326325;
        double r326329 = r326327 + r326328;
        double r326330 = y;
        double r326331 = r326330 * r326330;
        double r326332 = r326329 + r326331;
        return r326332;
}

double f(double x, double y) {
        double r326333 = y;
        double r326334 = r326333 * r326333;
        double r326335 = x;
        double r326336 = 2.0;
        double r326337 = r326336 + r326335;
        double r326338 = r326335 * r326337;
        double r326339 = r326334 + r326338;
        return r326339;
}

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