A somewhat different Newton solver (HP35s)
|
09-26-2018, 07:56 AM
Post: #4
|
|||
|
|||
RE: A somewhat different Newton solver (HP35s)
You don't have to execute the function twice since both, value and derivative are returned:
Code: 01 LBL "ZNWT" ; h x Example: 2 ENTER 1E-9 XEQ "ZNWT" 2.000000000 1.642857143 1.487473705 1.453261463 1.451609751 1.451605963 (09-25-2018 11:46 AM)Ángel Martin Wrote: The execution shows the successive values of the root if user flag 10 is set (a la PPC-ROM). Feel free to change that to your needs: Add the check of user flag 10 and remove RND. Quote:Supposedly more accurate results would be obtained with smaller values of h... Usually 1e-9 will be small enough. But you might also use 1e-50. Kind regards Thomas |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)