(11C) TVM for HP-11C
|
12-06-2020, 02:32 PM
(This post was last modified: 06-16-2021 01:35 PM by Albert Chan.)
Post: #13
|
|||
|
|||
RE: (11C) TVM for HP-11C
pv_i() and fv_i() are similar, we can combine them.
Just keep pv_i(), using previous post guess_i() for the guess. Code: function pv_i(n, a, i) -- a = -pv/pmt lua> g = pv_i(12, 5000/500) lua> g(), g() 0.029228537101221044 0.029228540769133633 For fv_i() problems, where PV=0, add negative sign for the input. In other words, fv_i(n, a) ≡ pv_i(-n, -a) lua> g = pv_i(-12, -5000/400) lua> g(), g() 0.007390622809688779 0.007390622804149185 This setup has another advantage, with invariant: sign(i) = sign(n-a) For above examples, 12 > 10, -12 > -12.5, thus positive interest rate. Update: numbers adjusted with updated guess_i() |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)