Average Error: 0.1 → 0.1
Time: 14.8s
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 r296975 = x;
        double r296976 = r296975 * r296975;
        double r296977 = y;
        double r296978 = r296977 * r296977;
        double r296979 = r296976 + r296978;
        double r296980 = r296979 + r296978;
        double r296981 = r296980 + r296978;
        return r296981;
}

double f(double x, double y) {
        double r296982 = x;
        double r296983 = r296982 * r296982;
        double r296984 = y;
        double r296985 = r296984 * r296984;
        double r296986 = r296983 + r296985;
        double r296987 = r296986 + r296985;
        double r296988 = r296987 + r296985;
        return r296988;
}

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