\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\mathsf{fma}\left(3, y \cdot y, x \cdot x\right)double f(double x, double y) {
double r599745 = x;
double r599746 = r599745 * r599745;
double r599747 = y;
double r599748 = r599747 * r599747;
double r599749 = r599746 + r599748;
double r599750 = r599749 + r599748;
double r599751 = r599750 + r599748;
return r599751;
}
double f(double x, double y) {
double r599752 = 3.0;
double r599753 = y;
double r599754 = r599753 * r599753;
double r599755 = x;
double r599756 = r599755 * r599755;
double r599757 = fma(r599752, r599754, r599756);
return r599757;
}




Bits error versus x




Bits error versus y
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020083 +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)))