Re:64-Bit Bank Balances ‘Ought to Be Enough for Anybody’?
by eesmith on Tuesday September 19, 2023 @11:50AM
(#37571723)
Yes, it isn't possible for the software to know your local accounting laws and practices.
My point is it's probably better to use existing, well-tested provisions than to build your own from scaled integers, to get one of those three results.
As a bonus, you might get hardware support in the future.
Re:64-Bit Bank Balances ‘Ought to Be Enough for Anybody’?
by jaclaz on Tuesday September 19, 2023 @12:56PM
(#37572804)
Yes, I understand what you are saying, I was highlighting that those (if adopted) would only fix (maybe) part of the problem, they are just (better) tools.
At the end of the day what I want (and I presume any other customer wants) is a correct invoice with the correct net, tax and total, and this will only happen when (if) the programmer understands the base issues and uses the correct library/algorithm/whatever.
A classic example in invoicing is an item that is advertised for 60.00 (to the final user) VAT 10% included.
If you try making an invoice for that sum in a few programs you will find three or four way it is implemented.
Some will have 54.54+5.45=59.99, some will have 54.54+5.46=60.00, some will have 54.55+5.46=60.01 (and possibly a "discount" of 0.01), some will have 54.545+5.45=60.00, some will have 54.54545454+5.45=60,00.