Post Reply 
(28/48/50) Lambert W Function
03-22-2023, 07:30 PM
Post: #6
RE: (28/48/50) Lambert W Function
(03-21-2023 05:15 PM)Albert Chan Wrote:  I am unfamilar with RPL, can you post actual formula for W(a) guess, and the iteration formula?


Python mpmath lambertw(z, k=0) support all branches.

https://mpmath.org/doc/0.19/functions/po...w-function
https://github.com/mpmath/mpmath/blob/ma...ns.py#L464

Many thanks for the mpmath github reference, that solved my branch problem! Updated program will follow soon.

Here are the formulas that you requested:

Formula for global approximation of W(z) for branch 0.
From "New approximations to the principal real-valued
branch of the Lambert W-function", by Iacono and Boyd.

-1 + a*ln((1 + b*y)/(1 + c*ln(1+y))

where

y = sqrt(1+e*x)

c = (e^(1/a) - 1 - sqrt(2)/a)/(1 - e^(1/a)*ln(2))

b = sqrt(2)/a + c


With 'a' determined empirically to be 2.036, final formula is:

-1 + 2.036*ln((1 + 1.14956131*y)/(1 + 0.4549574*ln(1 + y))


Recurrence from same paper, also from "Guaranteed- and high-precision
evaluation of the Lambert W function" by Lajos Lóczi.

B'(x) = (B(x)/(1 + B(x))*(1 + ln(x/B(x))

where

B(x) is current estimate
B'(x) is new estimate
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 - John Keith - 03-22-2023 07:30 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: 5 Guest(s)