Average Error: 0.1 → 0.1
Time: 18.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 r339997 = x;
        double r339998 = r339997 * r339997;
        double r339999 = y;
        double r340000 = r339999 * r339999;
        double r340001 = r339998 + r340000;
        double r340002 = r340001 + r340000;
        double r340003 = r340002 + r340000;
        return r340003;
}

double f(double x, double y) {
        double r340004 = x;
        double r340005 = r340004 * r340004;
        double r340006 = y;
        double r340007 = r340006 * r340006;
        double r340008 = r340005 + r340007;
        double r340009 = r340008 + r340007;
        double r340010 = r340009 + r340007;
        return r340010;
}

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