PC-1211, PC-1250, etc. TVM
|
06-05-2024, 01:05 AM
Post: #20
|
|||
|
|||
RE: PC-1211, PC-1250, etc. TVM
Hi, robve
Conditions required to make sign change suffices, without more iterations. 1. use NPMT formula (equivalent splitted loan method also OK) 2. use true derivative, not secant line slope. 3. use edge rate, in END mode, either [M/-P, M/F] I modified my 2nd post (#9), with Plus42 "smaller" edge as guess. I also make calculations more accurate, just to show it is hard to have f overshoot. 10 INPUT "B,N,P,M,F? ";B,N,P,M,F @ B=B*M 20 DEF FNF(I) @ S=-EXPM1(LOGP1(I)*-N) 25 D=(P+F)/S*(1-N*(1-S)/(S+S/I))+(B-F) 30 FNF=(P+F)*I/S+(B-F)*I+M @ END DEF ! FNF=NPMT 40 X=(ABS(P)<ABS(F))*(P+F)-B @ I=M/(X-P) @ Y=FNF(I) 50 H=-Y/D @ I=I+H @ Y=FNF(I) ! Newton's method 60 DISP 100*I,Y @ IF I+H*H<>I THEN 50 Code: >run |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)