\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\mathsf{fma}\left(x, x, \left(3 \cdot y\right) \cdot y\right)double f(double x, double y) {
double r441176 = x;
double r441177 = r441176 * r441176;
double r441178 = y;
double r441179 = r441178 * r441178;
double r441180 = r441177 + r441179;
double r441181 = r441180 + r441179;
double r441182 = r441181 + r441179;
return r441182;
}
double f(double x, double y) {
double r441183 = x;
double r441184 = 3.0;
double r441185 = y;
double r441186 = r441184 * r441185;
double r441187 = r441186 * r441185;
double r441188 = fma(r441183, r441183, r441187);
return r441188;
}




Bits error versus x




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