Average Error: 0.1 → 0.1
Time: 13.1s
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 r343863 = x;
        double r343864 = r343863 * r343863;
        double r343865 = y;
        double r343866 = r343865 * r343865;
        double r343867 = r343864 + r343866;
        double r343868 = r343867 + r343866;
        double r343869 = r343868 + r343866;
        return r343869;
}

double f(double x, double y) {
        double r343870 = x;
        double r343871 = r343870 * r343870;
        double r343872 = y;
        double r343873 = r343872 * r343872;
        double r343874 = r343871 + r343873;
        double r343875 = r343874 + r343873;
        double r343876 = r343875 + r343873;
        return r343876;
}

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