Average Error: 0.1 → 0.1
Time: 10.3s
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 r614786 = x;
        double r614787 = r614786 * r614786;
        double r614788 = y;
        double r614789 = r614788 * r614788;
        double r614790 = r614787 + r614789;
        double r614791 = r614790 + r614789;
        double r614792 = r614791 + r614789;
        return r614792;
}

double f(double x, double y) {
        double r614793 = x;
        double r614794 = r614793 * r614793;
        double r614795 = y;
        double r614796 = r614795 * r614795;
        double r614797 = r614794 + r614796;
        double r614798 = r614797 + r614796;
        double r614799 = r614798 + r614796;
        return r614799;
}

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