Average Error: 0.1 → 0.1
Time: 6.4s
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 r599665 = x;
        double r599666 = r599665 * r599665;
        double r599667 = y;
        double r599668 = r599667 * r599667;
        double r599669 = r599666 + r599668;
        double r599670 = r599669 + r599668;
        double r599671 = r599670 + r599668;
        return r599671;
}

double f(double x, double y) {
        double r599672 = x;
        double r599673 = r599672 * r599672;
        double r599674 = y;
        double r599675 = r599674 * r599674;
        double r599676 = r599673 + r599675;
        double r599677 = r599676 + r599675;
        double r599678 = r599677 + r599675;
        return r599678;
}

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