4f8h
last updated 2 years ago by effbot #
While 'integer division rounds down' is indeed true, what I have found most people want to know at this point is how not to get integer division when they don't want it.
>>> 15.0/2
7.5
>>>
And what they really, really, really need to know is that floating point numbers are not the fixed point decimal numbers they look precisely like, and they should not use them for money. Here is where an important note on floating point is needed.
