This is for references, code examples, and discussion regarding the floating-point article in the October 2012 Game Developer Magazine.
Years ago I wrote an article on comparing floating-point numbers that became unexpectedly popular – despite numerous flaws. As an act of penance for its imperfect advice I wrote a series of blog posts discussing floating-point math. I then wrote a Game Developer Magazine article to summarize the most important points.
The entire series of posts can be found here: https://randomascii.wordpress.com/category/floating-point/
Specific articles relevant to the Game Developer Magazine article include:
- Stupid float tricks – the format of floating-point numbers
- Comparing floats – techniques for comparing floating-point numbers, plus discussion of precision problems
- Don’t store that in a float – a plea to not store elapsed game time in a float
- Exceptional floating point – using floating-point exceptions to find bugs
- Round-tripping of floats – how many digits should you use when printing floats?
- Testing the printing and scanning of all floats
- Intermediate precision – the complex and variable rules regarding expression evaluation, and their affect on performance and results
No floating-point article would be complete without a reference to David Goldberg’s classic article “What Every Computer Scientist Should Know About Floating-Point Arithmetic”. It was written in a time when the IEEE floating-point math standard was not yet universal, but it still contains important insights.
http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
One of the creators if the IEEE floating-point math format is William Kahan and his lecture notes contain excellent insights.
How about mentioning William Kahan? (I don’t know him, only his articles)
It seems you have mentioned him only in the obsolete version of an FP post.
Thanks for your posts (that I have discovered only lately) – I have warned, on my web-page, my students (and peers) of reckless FP comparisons, but it’s nice to see it here.
Yours truly
Yechiel
—
===============================================
Search C++ bad books [first link]
Good point — I should add some links to some Kahan articles. He’s an important figure in floating-point math, and he’s written some excellent articles.
Pingback: Float Precision Revisited: Nine Digit Float Portability | Random ASCII