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


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

But I am confused. In your example numbers of 1, 2 and 3 digits round to the nearest 10 and numbers of 4 digits round to the nearest 100. Could you please be more explicit about when to round to what?

It need to be rounded like that to find maximum number which will be used to build Y scale on the bar chart. That's way I need to round small numbers up to nearest ten, but big numbers - up to handred etc.

---
Michael Stepanov aka nite_man

It's only my opinion and it doesn't have pretensions of absoluteness!