Lambert W Function (hp-42s)
|
05-19-2020, 12:29 AM
(This post was last modified: 05-25-2020 12:14 PM by Albert Chan.)
Post: #10
|
|||
|
|||
RE: Lambert W Function (hp-42s)
Hi, Juan14
I was experimenting another way to get W(a), via infinite tetration route. Solving for y = exp(W(a)) maybe better than directly going for W(a): Code: from cmath import * >>> test(1) y->w = ((0.56714329040978384+0j), 4) w = ((0.56714329040978384+0j), 5) >>> test(1e10) y->w = ((20.028685413304952+0j), 5) w = ((20.028685413304952+0j), 8) >>> test(1e100) y->w = ((224.84310644511851+0j), 4) w = ((224.84310644511851+0j), 10) Note: both versions use the same guess, y = e^x = 1+a Note: y->w uses a/y instead of log(y) to recover W(a), to reduce errors when y ≈ 1 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)