Hardware floating point is taken for granted by today’s programmers, but it has not always been so. I remember programming 80286/386 CPUs that did not have hardware floating point hardware, and back then the accepted alternative for many programs, especially games, was fixed point math. But fixed point math is HARD. It is hard for many programmers to understand, then it is hard to convert an entire code base from floating to fixed. So I have been looking at other ways to speed up software floating point code, hopefully enough so that many projects will not need to be converted to fixed point to run at a decent speed.
I am not going into a description of floating and fixed point math right now, so if you are not familiar with them you can read this floating point article and/or this fixed point article. For this post, I will begin by highlighting a few of the reasons software floating point math, specifically IEEE 754 conforming floating point, is so slow in software. Read the rest of this entry »