Average Error: 0.1 → 0.1
Time: 3.2s
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 r515576 = x;
        double r515577 = r515576 * r515576;
        double r515578 = y;
        double r515579 = r515578 * r515578;
        double r515580 = r515577 + r515579;
        double r515581 = r515580 + r515579;
        double r515582 = r515581 + r515579;
        return r515582;
}

double f(double x, double y) {
        double r515583 = x;
        double r515584 = r515583 * r515583;
        double r515585 = y;
        double r515586 = r515585 * r515585;
        double r515587 = r515584 + r515586;
        double r515588 = r515587 + r515586;
        double r515589 = r515588 + r515586;
        return r515589;
}

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