41C/CV root finders
|
05-29-2015, 08:04 AM
(This post was last modified: 05-29-2015 08:16 AM by Ángel Martin.)
Post: #39
|
|||
|
|||
RE: 41C/CV root finders
(05-28-2015 06:33 PM)Dieter Wrote: This sounds like there is something wrong with f(i) and/or f'(i). Could you post these two formulas here? (05-28-2015 06:33 PM)Dieter Wrote: ..... f(i)/f'(i) is the correction term, the mentioned "delta i". My 10-digit program quits if delta_i : i drops below 5E–8. Not really, I approach this from a math standpoint and not a financial expert - which I'm not by any stretch of the imagination. The formulas are posted below, but this is certainly strange - I need to revise the implementation, it might be something goofed up in the way I program them... the execution times were comparable to the 12C in the examples I tried so I assumed it was ok though. f(i) as per the Advantage's manual: f(i) = PV + (1+ip) PMT [ (1- (1+i)^-n) / i] + FV (1+i)^-n Hence: f ’ (i) = (PMT / i^2 ) * [ (1+i)^(-n) - 1 ] + n * [PMT (1 + ip)/i – FV ] * (1+i)^-(n+1) where p=1 in Begin mode or 0 in End mode. BTW the Source Code is also posted at TOS - so anyone with an inclination can have a look and help me find the glitch - it there's one ;-) Çheers, ÁM PS.- You don't need the Library#4 for the TVM$ module - althought it doesn't hurt to have it always configured on V41 of course. You'll need it for the SandMath, SandMatrix and 41Z if you decide to venture there. "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: 1 Guest(s)