Average Error: 0.0 → 0.0
Time: 5.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 r1003303 = x;
        double r1003304 = 2.0;
        double r1003305 = r1003303 * r1003304;
        double r1003306 = r1003303 * r1003303;
        double r1003307 = r1003305 + r1003306;
        double r1003308 = y;
        double r1003309 = r1003308 * r1003308;
        double r1003310 = r1003307 + r1003309;
        return r1003310;
}

double f(double x, double y) {
        double r1003311 = x;
        double r1003312 = 2.0;
        double r1003313 = r1003311 * r1003312;
        double r1003314 = r1003311 * r1003311;
        double r1003315 = r1003313 + r1003314;
        double r1003316 = y;
        double r1003317 = r1003316 * r1003316;
        double r1003318 = r1003315 + r1003317;
        return r1003318;
}

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