Lambert's W-function is the inverse function of
$f(y) = y e^y$.
That is, $W$ is the function such that
$$W(x) e^{W(x)} = x$$ This command LambertW
computes $W(x)$ for each entry
in the argument x
.
If the library gsl has been installed, then the function
lambert_W0
in that library is invoked. Otherwise,
values of the W-function are computed by root-finding, using the
function uniroot
.
Computation using gsl is about 100 times faster.