I'm new to this forum, but I wanted to post this question hoping to know if anyone has come across it.
Is there a formula in math to round down to the closest power of ten?
For example, $n$ : the number, $r$: the round value. if $n = 101\Rightarrow r = 100$. if $n = 322\Rightarrow r = 100$. if $n = 1200\Rightarrow r = 1000$. if $n = 77\Rightarrow r = 10$.
We need this in finance business, where trades are bought in lot sizes of $10, 100, 1000$ etc.