Post Reply 
Looking for TVM formulas
04-01-2014, 08:01 PM (This post was last modified: 04-01-2014 08:30 PM by Dave Britten.)
Post: #10
RE: Looking for TVM formulas
(04-01-2014 07:37 PM)Jeff_Kearns Wrote:  Only if you are content with inevitable rounding errors. Take a look at p. 180 of the HP-15C Advanced Functions Handbook for an example:

Susan tried to calculate FV=PMT x (((1+1/n)^n)-1)/(i/n)
where
payment = $0.01,
i = 0.1125, and
n = 60 X 60 X 24 X 365 = 31,536,000.
She calculated $376,877.67 on her HP-15C, but the bank's total was $333,783.35, and this latter total agrees with the results calculated on good, modern financial calculators like the HP-12C, HP-37E, HP-38E/ 38C, and HP-92. Where did Susan's calculation go awry?
No severe cancellation, no vast accumulation of errors; just one rounding error that grew insidiously caused the damage:
i/n = 0.000000003567351598
1 + i/n = 1.000000004
when rounded to 10 significant digits. There is the rounding error that hurts. Subsequently attempting to calculate (1 + i/n)n, Susan must get instead (1.000000004)31,536,000 = 1.134445516, which is wrong in its second decimal place.
How can the correct value be calculated? Only by not throwing away so many digits of i/n. Observe that (1 + i/n)n = e^(n x ln(1 + i/n),
so we might try to calculate the logarithm in some way that does not discard those precious digits.

Oh yes, I neglected to mention I was using the substitution you recommended for (1 + i)^n. I'll have to take a stab at implementing ln(1+x) as well, I suspect.

EDIT: Sweet, that was pretty easy. I'm now getting FV = -333,783.3499506 when I calculate the Susan problem. My 48SX Equation Library card returns -333,783.349948. I'm fine with that incredibly small error (I suspect the 48 is using extended reals in SysRPL for greater accuracy).
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Looking for TVM formulas - Dave Britten - 03-31-2014, 11:21 PM
RE: Looking for TVM formulas - Jeff_Kearns - 04-01-2014, 10:40 AM
RE: Looking for TVM formulas - Jeff_Kearns - 04-01-2014, 07:37 PM
RE: Looking for TVM formulas - Dave Britten - 04-01-2014 08:01 PM
RE: Looking for TVM formulas - Dieter - 04-02-2014, 12:21 PM
RE: Looking for TVM formulas - Dieter - 04-02-2014, 07:23 PM
RE: Looking for TVM formulas - Dieter - 04-06-2014, 07:46 PM
RE: Looking for TVM formulas - Dieter - 04-09-2014, 01:36 PM
RE: Looking for TVM formulas - Dieter - 04-02-2014, 07:40 PM
RE: Looking for TVM formulas - Dieter - 04-03-2014, 01:22 PM
RE: Looking for TVM formulas - Jeff_Kearns - 04-04-2014, 09:44 PM
RE: Looking for TVM formulas - Dieter - 04-05-2014, 09:58 PM



User(s) browsing this thread: 1 Guest(s)