Are floats inaccurate?
One often thinks that the use of decimals provides the most accurate
recording of numbers with decimal places.
Whilst that is the case when you don't have any rounding. At the point that
you round data you are starting to loose accuracy.
Colin has blogged about the use of floats. "Do
you use the float datatype?". Which has got a good discussion started on
it.
If you are performing multiple calculations where you are multiplying numbers
with decimal places then you can soon end up requiring lots of decimal places to
maintain total accuracy. However the second you start dividing numbers you are
in a whole world of in accuracy.
So you need split a payment of £10 3 ways. Who gets what, 3.33 to each and
then 1 p remaining.
-