Average Error: 0.0 → 0.0
Time: 7.6s
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 r362560 = x;
        double r362561 = 2.0;
        double r362562 = r362560 * r362561;
        double r362563 = r362560 * r362560;
        double r362564 = r362562 + r362563;
        double r362565 = y;
        double r362566 = r362565 * r362565;
        double r362567 = r362564 + r362566;
        return r362567;
}

double f(double x, double y) {
        double r362568 = x;
        double r362569 = 2.0;
        double r362570 = r362568 * r362569;
        double r362571 = r362568 * r362568;
        double r362572 = r362570 + r362571;
        double r362573 = y;
        double r362574 = r362573 * r362573;
        double r362575 = r362572 + r362574;
        return r362575;
}

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 2019198 
(FPCore (x y)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, A"

  :herbie-target
  (+ (* y y) (+ (* 2.0 x) (* x x)))

  (+ (+ (* x 2.0) (* x x)) (* y y)))