As programmers, most (if not all of us) know that floating point numbers have a tendency to not be very accurate. I know that this problem can\'t be avoided entirely, but I am w
Use fixed-point mathematics where you can deal with a known limited precision.
As an example, the Rockbox music player firmware uses almost entirely fixed-point media codecs.
If you must be perfectly accurate, use an infinite-length storage type like those provided by the GMP library.
If you're just trying to cut down on your errors, try to work as close to zero as possible, where the IEEE FP numbers are more precise. Reorder your operations to avoid letting your absolute values get too large.