@bjolling said:
At her company, they do a lot of calculations using Excel. If at the end, the balance is off by a few cents, they just let it pass. Otherwise, they fiddle with the rounding functions to make it give the correct result. Floating point IS inaccurate but it depends on your needs if you want to decide if it's TOO inaccurate.
That rounding error isn't because of the Floating point. You get the same problem with Fixed point. The problem comes from the order of rounding. If you round all the items, then sum, you get a different answer than if you sum all the items, then round. And you always have to round, because the tax percent doesn't come out as an exact number of cents.
The basic historical function of a spread sheet was to compare the sum of the columns with the sum of the rows, which was a basic duty of accountants back when it was all done by hand, and you always get rounding differences when you do the tax. You have to fiddle with the rounding to get the correct result. But in most jurisdictions there is a defined correct result: The tax rules tell you which way is correct.