Average Error: 0.1 → 0.1
Time: 16.6s
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 r339379 = x;
        double r339380 = r339379 * r339379;
        double r339381 = y;
        double r339382 = r339381 * r339381;
        double r339383 = r339380 + r339382;
        double r339384 = r339383 + r339382;
        double r339385 = r339384 + r339382;
        return r339385;
}

double f(double x, double y) {
        double r339386 = x;
        double r339387 = r339386 * r339386;
        double r339388 = y;
        double r339389 = r339388 * r339388;
        double r339390 = r339387 + r339389;
        double r339391 = r339390 + r339389;
        double r339392 = r339391 + r339389;
        return r339392;
}

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