[SciPy-dev] Lambert W implementation

Pauli Virtanen pav+sp@iki...
Thu Oct 29 16:30:13 CDT 2009

Thu, 29 Oct 2009 14:54:31 -0400, Skipper Seabold wrote:
> On Thu, Oct 29, 2009 at 1:04 PM, Yosef Meller <mellerf@netvision.net.il>
> wrote:
>> Hello,
>> I searched through scipy.special and I saw no implementation of the
>> Lambert W function. I'd like to add one, but before I do I thought I'd
>> ask:
>> 1) Did I just miss it?
>> 2) Is there any implementation you know off that is suitable for
>> wrapping or a good reference for an algorithm (I can find some, but if
>> there's something well known...)
> There's a Python example on the wikipedia page for Lambert W that works
> for W(x) where x >= -1/e.  There's probably more information in the
> references for more general implementations and/or improved accuracy.

There's an implementation of lambertw in mpmath. It probably doesn't rely 
on arbitrary precision either, so might just work with floats.

Pauli Virtanen

More information about the Scipy-dev mailing list