Lambert W Function (hp-42s)
|
09-28-2020, 04:06 PM
Post: #21
|
|||
|
|||
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, but it is not found in ordinary scientific calculators or spreadsheet software. 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 »
|
User(s) browsing this thread: 1 Guest(s)