Post Reply 
(28/48/50) Lambert W Function
04-03-2023, 08:47 PM (This post was last modified: 04-03-2023 09:15 PM by Albert Chan.)
Post: #25
RE: (28/48/50) Lambert W Function
(04-03-2023 07:24 PM)John Keith Wrote:  My program gets exact or near-exact results for all branches, but it is slower for branches other than 0 and -1.

I was getting stupid. Of course you get near-exact result for other branches.

For branches besides (0, -1), a ≈ -1/e is not that important, since W(-1/e) ≠ -1
With huge complex parts in the way, there is no catastrophic cancellation issues.      (*)

The singularity is at only at 0, not -1/e

W-1 is the "hard" branch, with singularities at both places, 0 and -1/e.

Plot[{Re[LambertW[-1,x]], Im[LambertW[-1,x]]}, {x,-1,1}]


(*) Except for W1: lambertw(z, k) == conj(lambertw(conj(z), -k))

>>> lambertw(-.36787944+1e-99j, k=-1)
mpc(real='-1.0000798057615958', imag='-3.4063941215654215e-95')

>>> conj(lambertw(-.36787944-1e-99j, k=1))
mpc(real='-1.0000798057615958', imag='-3.4063941215654215e-95')
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(28/48/50) Lambert W Function - John Keith - 03-20-2023, 08:43 PM
RE: (28/48/50) Lambert W Function - Albert Chan - 04-03-2023 08:47 PM
RE: (28/48/50) Lambert W Function - Gil - 01-29-2024, 11:04 AM
RE: (28/48/50) Lambert W Function - Gil - 01-29-2024, 02:47 PM
RE: (28/48/50) Lambert W Function - Gil - 01-29-2024, 06:46 PM
RE: (28/48/50) Lambert W Function - Gil - 01-29-2024, 09:50 PM
RE: (28/48/50) Lambert W Function - Gil - 01-30-2024, 12:33 AM
RE: (28/48/50) Lambert W Function - Gil - 01-30-2024, 12:04 PM
RE: (28/48/50) Lambert W Function - Gil - 01-30-2024, 02:52 PM
RE: (28/48/50) Lambert W Function - Gil - 01-31-2024, 07:10 PM



User(s) browsing this thread: 1 Guest(s)