Average Error: 0.1 → 0.1
Time: 16.4s
Precision: 64
\[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
\[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
double f(double x, double y) {
        double r349578 = x;
        double r349579 = r349578 * r349578;
        double r349580 = y;
        double r349581 = r349580 * r349580;
        double r349582 = r349579 + r349581;
        double r349583 = r349582 + r349581;
        double r349584 = r349583 + r349581;
        return r349584;
}

double f(double x, double y) {
        double r349585 = x;
        double r349586 = r349585 * r349585;
        double r349587 = y;
        double r349588 = r349587 * r349587;
        double r349589 = r349586 + r349588;
        double r349590 = r349589 + r349588;
        double r349591 = r349590 + r349588;
        return r349591;
}

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.1
Target0.1
Herbie0.1
\[x \cdot x + y \cdot \left(y + \left(y + y\right)\right)\]

Derivation

  1. Initial program 0.1

    \[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
  2. Final simplification0.1

    \[\leadsto \left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]

Reproduce

herbie shell --seed 2019325 +o rules:numerics
(FPCore (x y)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, E"
  :precision binary64

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

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