LambertW icon indicating copy to clipboard operation
LambertW copied to clipboard

feature request: lambert_w_of_exp()

Open bcrowell opened this issue 6 years ago • 1 comments

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.

bcrowell avatar Jun 25 '18 19:06 bcrowell

I did a C implementation here: https://github.com/bcrowell/karl/blob/master/src/lambert_w.cpp

bcrowell avatar Jun 25 '18 23:06 bcrowell