4 ms·
> For example, most monetary transactions are settled to the nearest penny. Settled, yes, but all kinds of financial operations require higher precision. IME
by Merad 4y ago
> For example, most monetary transactions are settled to the nearest penny.
Settled, yes, but all kinds of financial operations require higher precision. IME with payment processing the backend calculations and account balances were done to a thousandth of a cent. It was a common point of confusion because when clients were billed for their processing fees they usually ended up with a fraction of a cent balance that couldn’t be billed and stayed on their account. Every couple of months those fractions of a cent would add up to a full cent and their detailed billing breakdown would include a 1 cent charge in the “other” category that would drive them crazy. But of course financial calculations usually don’t use floating point anyway.
- jqpabc123 4y agoWhen the bill is issued, round the amount due and recorded to the nearest penny (integer) since this is what is being paid. Do this continuously and consistently and you can easily avoid the "mystery" penny problem.
- Merad 4y agoYes, obviously that's an option, but it's one that gives up revenue. At that company most clients were billed monthly, and it was a small-ish company, so the loss wouldn't be huge (I'd guess mid to high 5 figures). However many payment processors do daily billing, meaning you'd be giving up a penny every few days instead of every few months. I also overstated the customer impact... perhaps 1% of customers would inspect every detail of their statements and they tended to be annoyed by it. The overwhelming majority didn't notice or care.
- jqpabc123 4y agobut it's one that gives up revenue. Done consistently and properly, it is just as likely to *gain* revenue. Over the course of time and probability, it should be revenue neutral. I suggest looking into "banker's rounding".