SpecialFunctions.jl
SpecialFunctions.jl copied to clipboard
Add (and unify) Julia Lambert W function?
There are two packages for the Lambert W function:
-
LambertW.jl, and
Surely the Lambert W function is special enough for the special club.
CC @jlapeyre, @robertdj.
Thats a good idea. I haven't followed recent discussion on core library, metapackages, etc. But, LambertW should be in some kind of "special functions" package or metapackage so people don't have to scrounge around for this or that function..... I just realized that this comment is in SpecialFunctions.jl and not my LambertW.jl repo. So, yes, I am for incorporating the jlapeyre LambertW repo into SpecialFunctions.jl . There is also jlapeyre/FunctionZeros.jl
I forgot about the robertdj LambertW.jl. It appears to predate this one. I just did some quick tests on large arrays and found that either one of the LambertW's is consistently faster than the other, depending on both argument and branch. Usually by less than a factor of two. They both appear accurate more or less to machine precision. But, the jlapeyre LambertW also handles all the branches, complex arguments, and BigFloats. The robertdj LambertW is only useful for two branches and Float64 arguments.
From my point of view, it is perhaps worth incorporating some Float64 code from the other into my LambertW, after mapping out the efficiency. But, I don't have time at the moment to look into it more.
I may be able to work on a PR this weekend.
It sounds like a good idea to incorporate the Lambert W in this broader package! My version definitely has a more modest scope, but let me know if I can help out.
Bump :-)
@mschauer I felt that bump. Must have traveled slowly. :) I made a PR about a week ago. I first fixed some bugs in the stand-alone package LambertW.jl and brought up v0.7 compliance.
LambertW.jl (from jlapeyre) has been moved to https://github.com/JuliaMath/LambertW.jl
See also #371 and #84