Average Error: 0.1 → 0.1
Time: 16.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 r331755 = x;
        double r331756 = r331755 * r331755;
        double r331757 = y;
        double r331758 = r331757 * r331757;
        double r331759 = r331756 + r331758;
        double r331760 = r331759 + r331758;
        double r331761 = r331760 + r331758;
        return r331761;
}

double f(double x, double y) {
        double r331762 = x;
        double r331763 = r331762 * r331762;
        double r331764 = y;
        double r331765 = r331764 * r331764;
        double r331766 = r331763 + r331765;
        double r331767 = r331766 + r331765;
        double r331768 = r331767 + r331765;
        return r331768;
}

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