Define $\operatorname{magnitude}\left(x\right) = 10 ^ { \lfloor \log_{10} x \rfloor }$
and $\operatorname{magnitude'}\left(x\right) = 10 ^ { \lfloor \log_{10} x \rceil }$
Currently I'm using this $\operatorname{magnitude}$ function to divide a set of empirical data into "tiers." However it's a little imprecise: 900 and 100 are in the same tier, but based on some spot checks I feel that 900 ought to be in the thousands tier.
Using $\operatorname{magnitude'}$ is not a good alternative, because then 500 is in the thousands tier; it overcorrects too far in the other direction.
The problem, I think, lies in the rounding: I can always try rounding to some intermediate value (rather than an integer), but I'm thinking maybe a continuous solution might be preferable.
What I think I'm looking for is something like this:
$$\operatorname{magnitude''}\left(x\right) = 10 ^ { \lfloor \log_{10} x \rfloor + f\left( \log_{10} x - \lfloor \log_{10} x \rfloor \right) }$$
for some $f: [0,1] \to [0,1]$ , where $f' > 0$ and $f'' > 0$. That is, I need some function that interpolates between integers.
I was thinking of using $f\left(x\right) = x ^ p$ for some large-ish $p$ like 8 or 10, but in that case I'm relying on some kind of "magic number" and the scaling becomes totally subjective.
Am I thinking on the right track? Is there a generally accepted practice for interpolating between orders of magnitude?
Edit - here's an example plot of my "smooth magnitude" function:

the "floor magnitude" from above is a special case:
