Average Error: 0.1 → 0.1
Time: 5.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 r472675 = x;
        double r472676 = r472675 * r472675;
        double r472677 = y;
        double r472678 = r472677 * r472677;
        double r472679 = r472676 + r472678;
        double r472680 = r472679 + r472678;
        double r472681 = r472680 + r472678;
        return r472681;
}

double f(double x, double y) {
        double r472682 = x;
        double r472683 = r472682 * r472682;
        double r472684 = y;
        double r472685 = r472684 * r472684;
        double r472686 = r472683 + r472685;
        double r472687 = r472686 + r472685;
        double r472688 = r472687 + r472685;
        return r472688;
}

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