"Jerry W. Lewis" wrote in message
...
MOD is working exactly as it should. The "problem" is that most floating
point numbers (including .2) have no exact binary representation (just as
1/3 has no exact decimal representation). When you have to approximate
your inputs, that the output is only approximate should be no surprise.
100 times the binary approximation to 622.2 is
62220.0000000000072759576141834259033203125
...
If x has a fractional part but x*100 is supposed to be an integer, then
you need to use =MOD(ROUND(x*100,0),10) to ensure that you get rid of any
residues of the original binary approximation to x.
Jerry
Or, you can use VatType Currency (only four decimals) or Decimal.
They are not affected by floating point bugs.
Bruno
|