Given a set of numbers
e.g. {1, 2, 3, 4, 5} or { 50, 100} or {50000, 50001}
I want to normalize these into a range with a min and max e.g. 2 >= x <= 50
My current algorithm is $ ((range_{max} - range_{min}) / (x_{max} - x_{min})) * (x - x_{min}) + range_{min} $
This does result is numbers within the range however a set of numbers like {50000,500001} will result in 50000 = 2 and 50000 = 50 which is too skewed. In this case I would like a result still in the range but with 2 numbers closer together e.g. 2 & 3 or 30 & 31 .
What formula could I use to do this? I'm guessing I need to use $\log(x_{max} / x_{min})$ somewhere but I'm not sure how to work it into the equation.