Suppose, $u$ is the unique real solution of $x^x=\pi$ and $v$ is the unique real solution of $x\cdot e^x=\pi$
Expressed with the Lambert-w-function we have $u=e^{W(\ln(\pi))}$ and $v=W(\pi)$
Wolfram gives the following very good approximations
$$u\approx \frac{1256-84\pi-5\pi^2}{-232-157\pi+125\pi^2}$$
with an absolute error of less than $2\cdot 10^{-18}$
and $$v\approx \frac{125-211\pi+235\pi^2}{-712-461\pi+387\pi^2}$$
with an absolute error of less than $2\cdot 10^{-19}$
- How can I calculate such approximations ?
The approximations look like Pade-approximations. PARI/GP can calculate such Pade-approximations, but I only managed to do it for functions and not for real numbers.
The object is obviously to find a rational function $f(x)$, such that for a given constant $s$, $f(s)$ is the best approximation of a given number (given some limit to the degrees of the polynomials).
With the bestappr-function, PARI could then find a function $g(x)$ such that for a given limit of the absolute value of the coefficients, $g(x)$ is the best approximation of $f(x)$.
But how can I get the function $f(x)$ ?