Average Error: 0.0 → 0.0
Time: 2.4s
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 r489215 = x;
        double r489216 = 2.0;
        double r489217 = r489215 * r489216;
        double r489218 = r489215 * r489215;
        double r489219 = r489217 + r489218;
        double r489220 = y;
        double r489221 = r489220 * r489220;
        double r489222 = r489219 + r489221;
        return r489222;
}

double f(double x, double y) {
        double r489223 = x;
        double r489224 = 2.0;
        double r489225 = r489223 * r489224;
        double r489226 = r489223 * r489223;
        double r489227 = r489225 + r489226;
        double r489228 = y;
        double r489229 = r489228 * r489228;
        double r489230 = r489227 + r489229;
        return r489230;
}

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