4 ms·
> If you design software that works with money amounts, always use fixed point decimals. Don't use floats, it's just wrong! I find it funny the gap between wha
by vba616 4y ago
> If you design software that works with money amounts, always use fixed point decimals. Don't use floats, it's just wrong!
I find it funny the gap between what computer people think finance requires and actual practice.
The tax people in the US generally aren't interested in pennies any more! And when you use tax software that throws away the pennies before the final results, then your sums may very well not match the forms whose information is independently reported to the IRS, by well over a dollar. But nobody cares!
- sowbug 4y agoNo need to invent a divide between "computer people" and "tax people," whoever they are. Maybe the IRS allows small errors because bugs attributable to floating-point precision are too hard to fix.
- jdmichal 4y agoAFAIK the IRS has always been accepting of truncating / rounding values to full dollars and discarding cents. It's certainly been that way for the decades that I've been doing taxes.
- jay_kyburz 4y agoIn Australia the tax office doesn't event let you enter cents in online fields.
- vba616 4y agoMy point was that (at least some) standard US tax software rounds to dollars on intermediate results, apparently permitted and required by the IRS. ...while financial institutions send reports to clients and the IRS that have the totals rounded only at the end, meaning the things that are supposed to match don't and can't. Even though they are both in dollars, they are not consistent even to the nearest dollar.