I need to create a number picker via slider where you can pick numbers from 1 to a million, but the lower numbers should have a better resolution
so you could choose 1, 13,43,50 easily but when it gets to higher numbers the jumps will be higher, since there is no significance between 100,000 and 100,001 (in my case)
This looks to me like something exponential, but I'm not sure how to construct such a function. Given a low number L and a highest number H, I need to construct the function so f(L) = L and it will gradually climb to H (doesn't have to reach it, since it is not significance, but it should be close
How do I create such a function?
You indeed need an exponential law, aka a geometric progression.
If the slider can slide from ticks $0$ to $N$, use
$$v=L\left(\frac HL\right)^{i/N}=L\left(\sqrt[N]{\frac HL}\right)^i.$$
Examples:
$N=4,L=1,H=10000$ gives $1,10,100,1000,10000$.
$N=8,L=1,H=10000$ gives $1,3,10,31,100,316,1000,3162,10000$ (decimals omitted).