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

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

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