Okay, I agree that rounding is very important in financial scenarios... one can only charge whole dollars and cents and it would be a mistake to, for example, charge late fees for some amount less than one cent. So, rounding has to happen whenever the program wishes to interact with the real world or give final output for human consumption.
And I see your point about rounding, but I don't know that it totally applies. This is exactly like calculating sales tax. How many times have I broken out a receipt in my financial tracking and discovered that I was "overcharged" or "undercharged" by one cent? Many times.
That is, by taking the dollars and whole cents value of the price + tax for each individual item, and summing them, I end up with a different amount than the total actually charged me. At the end of the year, the government wants the store to pay the tax based on the total amount, not based on summing the tax for each product sold. Doing it for the whole receipt will result in lower potential accumulated rounding error. And Benford's law implies that rounding error will tend to accumulate in one direction rather then the other, also dependent on the base used for the float calculations.
So, for your scenario, if all the items being calculated will be billed on one receipt, then I think the rounding should wait until the final step, and using a float value without rounding in the loop is quite appropriate. I mean, why not?
I recently refinanced my car. While I was figuring out the loan I had, though, I put it all into an Excel spreadsheet and fiddled for a few hours until I'd figured out the
exact method used by the financial institution to calculate interest. What I found was that they rounded to 4 decimal places at one point, and didn't round at all at another point, and then finally rounded to dollars and cents only at the final moment. (I know this because I managed to duplicated their exact calculated balances based on dates payments posted, and so on.)
So well, I think I'm finding that I agree with you: knowing when to round and not to round is crucial, but I wouldn't say that rounding itself is always required or beneficial.
Oh, and my long distance phone company bills me by the second, and posts tenths of a cent on the final bill! I really like it, it appeals to me a lot. And supposedly "You saved an extra 20% thanks to one-second billing!" That would mean $7.32 I saved. So there's another reason I'm not convinced that rounding is the final solution.