Average Error: 0.1 → 0.1
Time: 5.7s
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 r605719 = x;
        double r605720 = r605719 * r605719;
        double r605721 = y;
        double r605722 = r605721 * r605721;
        double r605723 = r605720 + r605722;
        double r605724 = r605723 + r605722;
        double r605725 = r605724 + r605722;
        return r605725;
}

double f(double x, double y) {
        double r605726 = x;
        double r605727 = r605726 * r605726;
        double r605728 = y;
        double r605729 = r605728 * r605728;
        double r605730 = r605727 + r605729;
        double r605731 = r605730 + r605729;
        double r605732 = r605731 + r605729;
        return r605732;
}

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