http://www.perlmonks.org?node_id=394371


in reply to Re^2: Rounding up nearest ten, hundred etc
in thread Rounding up nearest ten, hundred etc

What people are calling attention to is that your examples show us what you want for numbers 1-4 digits long, and the rule is different for numbers that are 1-3 digits long, and numbers that are 4 digits long. If we knew you were only ever interested in numbers 1-4 digits long, that'd be all we needed to know.

But if you're potentially interested in longer numbers, we're left with no idea what behavior you want or expect for numbers longer than 4 digits.

Basically, I don't know what to make of your 'etc.' above. Are numbers from 4-6 digits rounded to the next hundred, and then 7-9 digits rounded to the next thousand?

  • Comment on Re^3: Rounding up nearest ten, hundred etc