Average Error: 0.1 → 0.1
Time: 3.7s
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 r436663 = x;
        double r436664 = r436663 * r436663;
        double r436665 = y;
        double r436666 = r436665 * r436665;
        double r436667 = r436664 + r436666;
        double r436668 = r436667 + r436666;
        double r436669 = r436668 + r436666;
        return r436669;
}

double f(double x, double y) {
        double r436670 = x;
        double r436671 = r436670 * r436670;
        double r436672 = y;
        double r436673 = r436672 * r436672;
        double r436674 = r436671 + r436673;
        double r436675 = r436674 + r436673;
        double r436676 = r436675 + r436673;
        return r436676;
}

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