LambertW
LambertW copied to clipboard
feature request: lambert_w_of_exp()
I like the library, thanks for writing it and making it available with such good documentation.
I have a project where I need to evaluate W0(exp(x)), in cases where exp(x) would cause overflows. Since this turns up in my application, I suspect it may be something that other people would need as well. I implemented a function lambert_w_of_exp() here:
https://github.com/bcrowell/karl/blob/master/src/lambert_w_stuff.pp
My implementation is in python, and the initial guess is not chosen as accurately as in your code, but perhaps my code would be useful to you as a reference, if you think it makes sense to do a C implementation.
I did a C implementation here: https://github.com/bcrowell/karl/blob/master/src/lambert_w.cpp