HP-41: Formula Evaluation ROM
|
06-12-2017, 07:13 AM
(This post was last modified: 06-12-2017 08:40 AM by Ángel Martin.)
Post: #18
|
|||
|
|||
RE: HP-41: Formula Evaluation ROM
(06-11-2017 03:47 PM)Gene Wrote: Step 4: "|-(T-1))/T" And the same for line #35 - and in general for every formula that spans two program steps. Here's another example to calculate the Lambert function W(x) This one requires calling EVAL$ twice because Newton's formula exceeds 24 chars, so we break it in two sections. Despite that it only takes 15 steps. Type: x, XEQ "WL$" => successive approximations shown until final result. Note that in some cases there may be some oscillations around the last decimal digit due to the Newton method. You can modify the program to cover for this contingency (the root cause is the X#Y? instruction at step #13, thus you can add X<>Y, RND, X<>Y RND right before the test is made - with the calculator in FIX 9). Code: 1 LBL "WL$ "To live or die by your own sword one must first learn to wield it aptly." |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)