(28/48/50) Lambert W Function
|
03-23-2023, 05:53 PM
Post: #10
|
|||
|
|||
RE: (28/48/50) Lambert W Function
(03-23-2023 12:16 AM)Albert Chan Wrote: There is a flaw with Iacono and Boyd W guess formula. That explains the problem that I saw when |z| was < 10^8. Lines 3 and 7 of my first program are a patch around the flaw. The program doesn't crash without the patch but it returns a complex result in a different branch. There is one line in your program that concerns me: if h == err then return -1 end It seems that the program would return -1 if a is the closest machine representation of -1/e, which would be -.367879441171 on the HP calculators. Instead, we would want the program to return -.999998449288 in branch 0, or -1.00000155071 in branch -1, which are the correct 12-digit representations of W(-.367879441171). My apologies if I am reading your program incorrectly. Also, there is another line whose meaning is unclear to me: x = sqrt(2*h/r) * (x and -1 or 1) In RPL this statement always returns 1. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)