News for hackers. Stuff that matters.
Re:Trump says he has directed Treasury to stop minting new p... by rstuart4133 on Monday February 10, 2025 @05:17PM (#43006021)
I come from a country that has rounding. The unrounded price always shown on the shelf, and is what you pay unless it's cash.

If you do pay cash, it's not the item's price that's rounded, it's the total. That's important because the amount being rounded is essentially random, so the shop can't chose a price that would be rounded in one direction. In a $10 purchase using 0.05 rounding the maximum difference amounts to 0.4%, but is usually 0.2% or less. It's so small it could be used as an advertising gimmick, and consequently some retailers chose to always round down. The remainder went with rounding to the nearest with the lowest value winning in a tie.

I do not remember a single one always rounding up. That would be a customer relations disaster.

Re:Trump says he has directed Treasury to stop minting new p... by duskwuff on Monday February 10, 2025 @07:39PM (#43007372)
If you're rounding to 0.05, you don't even need to break ties - any price ending in an integer number of cents can be rounded fairly to the nearest 0.05, e.g.

  1.00       -> already round
  1.01, 1.02 -> round down to 1.00
  1.03, 1.04 -> round up to 1.05
  1.05       -> already round
  1.06, 1.07 -> round down to 1.05
  1.08, 1.09 -> round up to 1.10
  1.10       -> already round
Re:Trump says he has directed Treasury to stop minting new p... by krapp on Monday February 10, 2025 @07:10PM (#43007091)
We're talking about the US. We'll just round everything up because it's simpler and blame it on communists or the wokes or something.