Exponential function to map from [0, 1] to arbitrary [min, max]? Maybe you can help out a programmer whose last math class was 20 years ago:
Given a base $b$, $y_{min}$ and $y_{max}$:
Define a function so that $f(0) = y_{min}$, $f(1) = y_{max}$ and f(x) is exponential in [0, 1] using the given base.
Define the inverse function.
Trivial example
$y_{min} = 1$, $y_{max} = 16$, $b = 2$
$$y = 2 ^ 4x$$
$$x = log_2(y) / 4$$
For positive values of $y_{min}$
I came up with the general form:
$$y = 2^{ x (log_b(y_{max}) - log_b(y_{min})) + log_b(y_{min}) }$$
$$x = \frac{log_b(y) - log_b(y_{min})}{(log_b(y_{max}) - log_b(y_{min})}$$
Arbitrary ranges?
How to make it work, with arbitrary values, for example $b = 10$, $y_{min} = -1.000$, $y_{max} = 10,000$.
I suspect the question is not even valid for this range, but for my requirement it looks sensible at first sight:
Have a slider (user interface component) whose 


*

*minimum value is -1,000 

*maximum value is 10,000

*with equal-distances for -100, -10, 0, 10, 100, 1000

*sensible values in between



It also looks simple when you define x = 0 for leftmost slider position, x = 1 for rightmost position and draw the graph with a (pseudo?) logarithmic scale on the y-axis:

How to best handle that?
A problem, of course is that there is just no $x$ for which $b^x = 0$.
Maybe we need three separate functions: One for $y = [y_{min}, -eps]$, one for $y = [eps, y_{max}]$, and one for $y = ]-eps, eps[$ where we cheat and approximate?

Exponential functions can't change sign: if $f(x)=ab^x$ ($b$ positive, $a\not=0$) then either $f$ is positive everywhere or $f$ is negative everywhere.
Why? Well, remember that $b^x>0$ for all $x$, since $b$ is positive (and an exponential function with negative base doesn't really make sense over an interval unless we're in the complex numbers). So either $a$ is negative, in which case $f$ is always negative, or $a$ is positive, in which case $f$ is always positive.
So we need $y_{min}$ and $y_{max}$ to have the same sign. And your function 
$$y = 2^{ x (log_b(y_{max}) - log_b(y_{min})) + log_b(y_{min}) }$$ does the job in each case.
