Average Error: 0.0 → 0.0
Time: 1.5s
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 r481310 = x;
        double r481311 = 2.0;
        double r481312 = r481310 * r481311;
        double r481313 = r481310 * r481310;
        double r481314 = r481312 + r481313;
        double r481315 = y;
        double r481316 = r481315 * r481315;
        double r481317 = r481314 + r481316;
        return r481317;
}

double f(double x, double y) {
        double r481318 = x;
        double r481319 = 2.0;
        double r481320 = r481318 * r481319;
        double r481321 = r481318 * r481318;
        double r481322 = r481320 + r481321;
        double r481323 = y;
        double r481324 = r481323 * r481323;
        double r481325 = r481322 + r481324;
        return r481325;
}

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