Hacker News new | ask | show | jobs
by jwigg 2166 days ago
> it will round however the manufacturer told it to round (which will be correctly)

either you're way too optimistic, or i'm way too pessimistic, but lemme tell you, we do not see eye-to-eye on that point.

1 comments

Do you believe that they are already screwing you out of fractional cents? After all there is already rounding going on.

Concretely, $1.20 with 7% tax is $1.284, do you believe merchants would charge you $1.29?

I mostly meant that I don't have any faith that the code will work correctly. I'm not even assuming malice. There are all kinds of super simple rounding mistakes you could make that would mess up the rounding. Especially if you're writing for a market that you're not part of (eg, out-sourced coders living in one country, but writing POS code that is deployed in another country).

That said, do I think that someone, somewhere, has/does/will out of malice abuse this specific oft-ignored dark corner of the marketplace, for personal gain? Yeah, I absolutely think that:

https://en.wikipedia.org/wiki/Salami_slicing

https://www.youtube.com/watch?v=eVSlE28hOgI