Post Reply 
Lambert W function (for HP Prime)
11-05-2020, 03:18 PM (This post was last modified: 11-05-2020 08:24 PM by Albert Chan.)
Post: #10
RE: Lambert W function (for HP Prime)
(11-04-2020 08:12 PM)lyuka Wrote:  LW0H(-1.78)
[Image: LW0H-slow-convergence-at--1.78.png]

We may detect chaos faster by measuring actual corrections of y, instead of t's
Assuming above numbers is base-10, 12 digits precision:

y1 = y0 - t1 = 0.0892175267236 + 1.62562359481*i
y2 = y1 - t2 = 0.0892180498540 + 1.62562367443*i
y3 = y2 - t3 = 0.0892180498555 + 1.62562367443*i

Imaginery part converged. Real part of y, ULP = 1e-13

y4 = y3 - t4 = y3 + 11 ULP
y5 = y4 - t5 = y4 + 9 ULP
y6 = y5 - t6 = y5 + 7 ULP
...

Chaos detected going from y10 to y11. Correction = 2 ULP = previously.

W(-1.78) ≈ y10 = y3 + (11+9+7+5+4+3+2) ULP = y3 + 41 ULP = 0.0892180498596 + 1.62562367443*i

Here is proposed patch, for LW0H, Rev 1.36 (Nov 5, 2020):
Code:
    ...
    y := y - t / v;  // Householder's method of order 4 
    t := abs(y - p); // correction radius
  UNTIL 0 == t OR (r < 1 AND r <= t); // convergence check
  return p;
END
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Lambert W function (for HP Prime) - lyuka - 10-25-2020, 08:31 AM
RE: Lambert W function (for HP Prime) - Albert Chan - 11-05-2020 03:18 PM



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