Lambert W Function (hp-42s)
|
09-29-2020, 07:07 PM
(This post was last modified: 09-29-2020 08:17 PM by Albert Chan.)
Post: #24
|
|||
|
|||
RE: Lambert W Function (hp-42s)
(09-28-2020 04:06 PM)lyuka Wrote: y0 = 1 / e + sqrt ((2 / e) * (x + 1 / e)) + 0.3 * (x + 1 / e); Very nice approximation ! However, the formula might be too good. At x = -1/e, above return *exactly* y0 = 1/e. With f(y) = y*ln(y) - x, f'(y) = ln(y) + 1, we get f'(y0) = -1 + 1 = 0 Unless we test for zero slope, Newton's formula, y -= f(y)/f'(y), will crash with divide-by-zero. You might want to adjust the formula a tiny bit ... |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)