3 ms·
FMA is "safe" in that if it breaks your code, it was already broken. It can only make the results slightly more accurate, unlike for instance the rsqrt instruct
by nwallin 7y ago
FMA is "safe" in that if it breaks your code, it was already broken. It can only make the results slightly more accurate, unlike for instance the rsqrt instruction which is less accurate. (and as such is not a safe optimization)
GCC emits FMA instructions at -O2 without -ffast-math.
- lilyball 7y agoWell, it could "break" your code in that it might make your code produce different results than a separate equivalent implementation that didn't use FMA. Edit: Ok actually it sounds like it could literally break some algorithms, see https://news.ycombinator.com/item?id=21342974 https://news.ycombinator.com/item?id=21342974