Average Error: 0.0 → 0.0
Time: 2.9s
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 r331556 = x;
        double r331557 = 2.0;
        double r331558 = r331556 * r331557;
        double r331559 = r331556 * r331556;
        double r331560 = r331558 + r331559;
        double r331561 = y;
        double r331562 = r331561 * r331561;
        double r331563 = r331560 + r331562;
        return r331563;
}

double f(double x, double y) {
        double r331564 = x;
        double r331565 = 2.0;
        double r331566 = r331564 * r331565;
        double r331567 = r331564 * r331564;
        double r331568 = r331566 + r331567;
        double r331569 = y;
        double r331570 = r331569 * r331569;
        double r331571 = r331568 + r331570;
        return r331571;
}

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