41C/CV root finders
|
05-27-2015, 01:50 PM
(This post was last modified: 05-27-2015 01:52 PM by Dieter.)
Post: #23
|
|||
|
|||
RE: 41C/CV root finders
(05-27-2015 05:17 AM)Ángel Martin Wrote: Well, the initial guess is i0 = 0,01650475658, alas not greater than 100% (I don't remember saying anything about it being over 100% before, was than in another thread??) ... No, that was me. ;-) You said the inital guess was evaluated as abs(PV+n*PMT+FV))^(1/n). Which is almost always > 1 i.e. > 100%. For the example the result is 150^0,1 = 1,650475 = 165,0475%. Hmmm... the actual estimate is exactly 1/100 of this, so your i0 formula must be slightly different. (05-27-2015 05:17 AM)Ángel Martin Wrote: ...and the number of loops (iterations) needed is 7 for the "begin" case and 13 for the "end" case. On the CL (or V41 in turbo mode) it's obtained in the blink of an eye. Hmm... 7 or 13 iterations? I am sure it works for you, but maybe... maybe I can trigger your ambition a bit anyway...? ;-) I tried a simple program in HP41 user code. It returns the two interest rates in both cases (begin and end mode) after merely 4 iterations. And both results are dead on. I also tried the same algorithm with your initial estimate. Again, it took not more than 5 iterations, and both results were exact. (05-27-2015 05:17 AM)Ángel Martin Wrote: I guess what I'm saying is that it works for me and hopefully also does for other folks. Naturally will be nice to improve it, say implement the counter idea: how many loops are too many and where would you put the cut-off point? Please don't get me wrong. Everything is fine if the current implementation works for you. But I can't help: my ambition is to trigger yours. ;-) Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)