41C/CV root finders
|
05-21-2015, 07:36 PM
Post: #10
|
|||
|
|||
RE: 41C/CV root finders
(05-21-2015 12:51 PM)Dave Britten Wrote: I knocked out a simple lazy Newton's method solver (lazy in that it approximates the 1st derivative using f(1.000001x) and f(.999999x)), and it seems functional but definitely suboptimal. Well.... ;-) (05-21-2015 12:51 PM)Dave Britten Wrote: I'll have to study the HP-80 article more so as to have a better approximation of its algorithm. I would not recommend the HP80 as a reference. It used a different TVM paradigm with unsigned variables that was changed with the HP92, which essentially used the method that was later implemented in many classic HP financial calculators. (05-21-2015 12:51 PM)Dave Britten Wrote: I don't even necessarily need a general purpose solver, just one that's suited for handling the TVM equation. I already suggested the method in post #7 of the older thread linked in my previous post. Here is a quick and dirty implementation of that idea. Try it and see what you get. Code: Registers: This is essentially untested code, so beware. ;-) But it seems to work. Try the standard example: 10 STO 01 (n) 50 STO 03 (PV) –30 STO 04 (PMT) 400 STO 05 (FV) XEQ"I%" => 14,4359 The program evaluates a first guess of 9,8361% and finally returns 14,4359% after five iterations. With flag 01 set (BEGIN) the result is 10,2051%. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)