3 ms·
Almost every year, I reread the famous Goldberg paper, What Every Computer Scientist Should Know About Floating Point Arithmetic[1]. And with every time I'm mor
by saljam 13y ago
Almost every year, I reread the famous Goldberg paper, What Every Computer Scientist Should Know About Floating Point Arithmetic[1]. And with every time I'm more astonished at how the hell can anyone do anything nontrivial with floats and trust it.
[1] http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.ht...
- StefanKarpinski 13y agoThis is the reason that support for changing rounding modes is so incredibly important for numerical reliability. One of the best ways to assess if your algorithm is numerically stable is to try it in all the rounding modes. If all of the answers are similar, you're probably doing ok. If they're wildly different, you may be computing complete nonsense.