Lambert W Function (hp-42s)
09-28-2020, 04:06 PM
Post: #21
 lyuka Junior Member Posts: 48 Joined: May 2014
RE: Lambert W Function (hp-42s)
Oh, I was overlooked this thread.
The Lambert W function came out when I was writing a description of the Widlar current souce a few months ago,
So I wrote an e^W calculation program for 42S, and additionally in C.

http://www.finetune.co.jp/~lyuka/technot...w-42s.html

It's nice to be able to handle complex numbers easily with 42S,
but if you try to find e^W with Newton-Raphson method, it will fail very close to -1/e.
So, it is desirable that the approximation error of the initial value is asymptotic to 0 at -1/e.
For that reason, I chose the following formula as an approximate expression that gives the initial value.

y0 = 1 / e + sqrt ((2 / e) * (x + 1 / e)) + 0.3 * (x + 1 / e);

Thanks to sqrt in this equation, in 42S we can automatically get the complex y0 from x less than -1 / e.

Instead of the coefficient of 0.3 in the formula above,
it can be "e - sqrt2 - 1" which makes zero error at x = 0,
or "1 / 3" from Puiseux series, but 0.3 is quite good enough for this purpose.
 « Next Oldest | Next Newest »

 Messages In This Thread Lambert W Function (hp-42s) - Juan14 - 05-16-2020, 04:07 PM RE: Lambert W Function (hp-42s) - Werner - 05-17-2020, 07:56 AM RE: Lambert W Function (hp-42s) - J-F Garnier - 05-17-2020, 08:09 AM RE: Lambert W Function (hp-42s) - Werner - 05-17-2020, 08:15 AM RE: Lambert W Function (hp-42s) - Gerald H - 05-17-2020, 09:29 AM RE: Lambert W Function (hp-42s) - Werner - 05-18-2020, 08:04 AM RE: Lambert W Function (hp-42s) - Juan14 - 05-17-2020, 12:12 PM RE: Lambert W Function (hp-42s) - Albert Chan - 05-18-2020, 03:54 PM RE: Lambert W Function (hp-42s) - Juan14 - 05-18-2020, 10:51 PM RE: Lambert W Function (hp-42s) - Albert Chan - 05-19-2020, 12:29 AM RE: Lambert W Function (hp-42s) - Albert Chan - 05-20-2020, 03:25 PM RE: Lambert W Function (hp-42s) - Juan14 - 05-21-2020, 12:09 AM RE: Lambert W Function (hp-42s) - Werner - 05-22-2020, 11:39 AM RE: Lambert W Function (hp-42s) - Albert Chan - 05-23-2020, 12:43 AM RE: Lambert W Function (hp-42s) - Werner - 05-23-2020, 04:20 AM RE: Lambert W Function (hp-42s) - Albert Chan - 06-11-2020, 03:27 AM RE: Lambert W Function (hp-42s) - Werner - 06-11-2020, 05:17 AM RE: Lambert W Function (hp-42s) - Albert Chan - 06-11-2020, 08:12 AM RE: Lambert W Function (hp-42s) - Werner - 06-11-2020, 09:20 AM RE: Lambert W Function (hp-42s) - Albert Chan - 06-11-2020, 10:42 AM RE: Lambert W Function (hp-42s) - lyuka - 09-28-2020 04:06 PM RE: Lambert W Function (hp-42s) - Albert Chan - 09-28-2020, 10:01 PM RE: Lambert W Function (hp-42s) - Werner - 09-30-2020, 09:12 AM RE: Lambert W Function (hp-42s) - Albert Chan - 09-30-2020, 05:28 PM RE: Lambert W Function (hp-42s) - Werner - 10-02-2020, 03:02 PM RE: Lambert W Function (hp-42s) - Albert Chan - 10-02-2020, 05:55 PM RE: Lambert W Function (hp-42s) - Werner - 09-30-2020, 07:08 AM RE: Lambert W Function (hp-42s) - lyuka - 09-29-2020, 09:21 AM RE: Lambert W Function (hp-42s) - Albert Chan - 09-29-2020, 07:07 PM RE: Lambert W Function (hp-42s) - lyuka - 09-29-2020, 11:17 PM RE: Lambert W Function (hp-42s) - lyuka - 09-30-2020, 11:04 AM RE: Lambert W Function (hp-42s) - Albert Chan - 09-30-2020, 05:40 PM RE: Lambert W Function (hp-42s) - lyuka - 09-30-2020, 07:16 PM RE: Lambert W Function (hp-42s) - Werner - 10-01-2020, 09:37 AM RE: Lambert W Function (hp-42s) - Albert Chan - 10-01-2020, 12:33 PM RE: Lambert W Function (hp-42s) - Werner - 10-01-2020, 01:39 PM RE: Lambert W Function (hp-42s) - lyuka - 10-01-2020, 06:25 PM RE: Lambert W Function (hp-42s) - Albert Chan - 10-01-2020, 10:25 PM RE: Lambert W Function (hp-42s) - lyuka - 10-02-2020, 05:44 AM RE: Lambert W Function (hp-42s) - Albert Chan - 10-02-2020, 07:29 PM RE: Lambert W Function (hp-42s) - Albert Chan - 10-03-2020, 04:31 PM RE: Lambert W Function (hp-42s) - Albert Chan - 10-03-2020, 05:29 PM RE: Lambert W Function (hp-42s) - lyuka - 10-03-2020, 07:56 PM RE: Lambert W Function (hp-42s) - Werner - 10-05-2020, 08:03 AM RE: Lambert W Function (hp-42s) - Albert Chan - 10-05-2020, 03:20 PM RE: Lambert W Function (hp-42s) - lyuka - 10-05-2020, 06:09 PM RE: Lambert W Function (hp-42s) - Werner - 10-06-2020, 06:16 AM RE: Lambert W Function (hp-42s) - Albert Chan - 10-21-2020, 03:05 PM RE: Lambert W Function (hp-42s) - lyuka - 11-09-2020, 08:30 AM RE: Lambert W Function (hp-42s) - Bill Triplett - 08-24-2022, 09:48 PM RE: Lambert W Function (hp-42s) - Albert Chan - 12-29-2022, 04:17 AM RE: Lambert W Function (hp-42s) - Albert Chan - 12-29-2022, 12:21 PM RE: Lambert W Function (hp-42s) - Albert Chan - 12-29-2022, 08:01 PM

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