Where does this approximation for $2^x-1$ come from? I found this fairly good approximation for $2^x-1$ while reverse-engineering a fast exp2f() C++ (undocumented, uncommented) implementation:
$$2^x-1\approx \frac{27.7280233}{4.84252568 - x} -0.49012907 x -5.7259425$$
This approximation is accurate for $x$ in $[0,1]$ and it is quite so (about 4 decimal digits). However I never found it mentioned anywhere. It is simply a hyperbole shifted linearly which fits $2^x-1$ in that range very nicely.
I tried to google around for "rational exp2 approximation", "fractional exponential base two approximation" or with similar keywords, but I found nothing relevant to it.
Does anybody know where it comes from and whether it has a name ?
My curiosity is not just academical, I wanted to know where it come from just to understand whether it can be extended with more terms to improve its approximation accuracy. I know I can approximate $2^x$ or $2^x-1$ in that or another range by polynomial approximation, but they usually requires several terms, while this formula without any powers higher than one and one fraction does a very nice job, comparable more or less to a 4th degree polynomial!
Thanks
 A: When you make a change of variable to express $e^x-1$ instead, you get a formula close to the local (near $0$) approximation $\dfrac{x^2/\sqrt2+(2+\sqrt2)x}{2+\sqrt2-x}$.
However, your formula is much better near $1$, and the error is uniformly small on $[0,1]$ and oscillating. Therefore I suspect some kind of minimax rational approximation (Remez). However, Remez is slightly better overall, but your formula is better near $0$, so the minimax approximation has been tuned to be good near $0$, which is desirable, as this function is probably often used for small arguments.
Below, the error with your function (blue) and Remez approximation (red). The Remez approximation was computed with Maple, with a numerator of degree $2$ and a denominator of degree $1$.

We can do better: Maple allows a weight on the error. With a weight $1000$ for $|x|<10^{-8}$ and $1$ otherwise, we get the approximation
$$\frac{ 27.704226690769845416}{4.8416702244134115171-x}- 0.48942480030516666506 x - 5.7220391320516093836$$
As you can see it's quite close to your formula.
Here is the error, again your function in blue and the Remez approximation in red:

It's possible to get a result even closer to your function by adjusting weights also at $1$ and $1/2$:

A: I would recommend, if high accuracy is not very important, the following, easy manageable approximation:
$$2^{x}-1 \approx x+3\left(\frac{2}{\ln 2}-3\right)x(1-x)$$
Maximum approximation error here is about $0.004$
Average approximation error here is about $0.003$
The advantage of this approximation is that  it can be used in approximate analytical calculations.
Say we need to compute the following integral:
$$\int_{0}^1\frac{2^{x}-1}{x}dx$$
With this approximation the approximate value of the integral is easy to calculate in closed form.
