Kyle Schmitt
7/19/2007 9:18:00 PM
On 7/19/07, John Joyce <dangerwillrobinsondanger@gmail.com> wrote:
> If you absolutely must use floats for something, and you need greater
> accuracy, you should use something like C and its extra long float
> types, coupled with at least a 64 bit system, ideally go get an old
Just remember, sadly even with C and a 64 bits, all you get is a
better estimation. The numbers that can't exactly be represented by a
32bit IEEE float still can't be exactly represented if you give them
more bits. :(
As far as accounting applications go, you'd think that the fixed
precision data types would be just the thing. The problem is fixed
precision data types tend have the EXACT same problems brought about
by 2s compliment (some .net projects here at work ran into that).
Some languages apparently provide a decimal type that doesn't have
these problems, but I've never played with them.
--Kyle