TVM algorithm for FV with longterm highinterest Message #7 Posted by Karl Schneider on 7 June 2006, 12:20 a.m., in response to message #6 by tony(nz)
Tony 
Quote:
With PF=1 and END mode, n=360,i%=10,PV=100,FV=0, solve for PMT, solve for FV, see 100, which is as you say the correct exact solution, if we interpret the other values as exact. Now try PV=144, FV=0, solve for PMT, Solve for FV and see 1000. The 12C still gives 0, which is somewhat closer to 144 than 1000 is.
I only chose 144 because it is 12*12, but all other values stimulate either zero or a power of ten in the FV, in the neighbourhood of PV.
Interesting finding! I had not tried other values corresponding to PMT = PV/i on any Pioneerseries financial, figuring that the code had been refined and that the answer would always be correct.
Quote:
Yup that behaviour started with the 18C clamshell in 1986.
The 18C/28C were the first calculators to utilize the Saturn processor introduced with the HP71B. HP took opportunities to improve algorithms to exploit the 64bit, 12digit words and faster processor. My favorite example is taking the sine of 3.14159265358 radians  Pioneer models give the next 12 digits of pi (979323846264x10^{12}, the correct answer); preSaturn models can accept only 10 input digits (3.141592653), then give only the next two rounded digits (5.9x10^{10}) as the answer. But I digress...
From page 207 of the HP12C manual, the TVM equation (with no odd period) is
(1.) 0 = PV + (1 + iS)PMT*[(1  (1+i)^{N})/i] + FV(1+i)^{N} (i not = 0)
With S = 0 for END mode, this simplifies to
(2.) 0 = PV + PMT*[(1  (1+i)^{N})/i] + FV(1+i)^{N}
Solving for FV,
(3.) FV = PV/(1+i)^{N}  PMT*[1  (1+i)^{N})/(i*(1+i)^{N})]
Which is what I assumed the 12C/p were using. From your example, with i = 0.1 (10% per period) and N = 360, (1+i)^{N} = 1.255x10^{15}. Therefore, 1  (1+i)^{N} = 1, within the limits of the calculators (if internal extended precision is not used), and the calculated FV is simply 0  the difference of two identical enormous values.
However, the multiplicand to PMT can be separated into two terms and regrouped, yielding the following:
(4.) FV = (PV  PMT/i)*(1+i)^{N} + PMT/i
Obviously, if (PV  PMT/i) = 0, then the term (1+i)^{N} doesn't matter, yielding FV = PMT/i.
In your example, with PV = 100, PMT = 10, and i = 0.1, FV = PMT/i = PV = 100 is correct.
If (1+i)^{N} = 1 (as for extremely small i, due to roundoff error), then we get the erroneous result FV = PV, and no value of payment can be applied.
I suppose that very large values of PMT/i could cause roundoff error in certain situations...
Quote: I prefer consistency of the 12C.
I would prefer "consistent correctness" wherever possible, and thought that the Pioneers were indeed using Equation (4.). Apparently, I was mistaken. Only for PV = 100 and PMT = 10 is the correct answer of FV = 100 produced, seemingly by mere coincidence.
Best regards,
 KS
Edited: 10 June 2006, 9:06 p.m. after one or more responses were posted
