> Thanks Peter, that is very detailed. In my case, I have to deal with amounts
> that are always doubles with two decimals. Since I need to add these
> numbers, but only after transforming them to integers, I do not have to
> implement my own rounding routine. I need however to prevent the
> introduction of rounding errors...
So you know you must sum the amounts using the Kahan Summation Formula,
don't you? ;)
The worst thing you can do is to round at every step of your
iteration, round the grand total..