Average Error: 0.0 → 0.0
Time: 1.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 r988432 = x;
        double r988433 = 2.0;
        double r988434 = r988432 * r988433;
        double r988435 = r988432 * r988432;
        double r988436 = r988434 + r988435;
        double r988437 = y;
        double r988438 = r988437 * r988437;
        double r988439 = r988436 + r988438;
        return r988439;
}

double f(double x, double y) {
        double r988440 = x;
        double r988441 = 2.0;
        double r988442 = r988440 * r988441;
        double r988443 = r988440 * r988440;
        double r988444 = r988442 + r988443;
        double r988445 = y;
        double r988446 = r988445 * r988445;
        double r988447 = r988444 + r988446;
        return r988447;
}

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