Accurate TVM for HP42S - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: Accurate TVM for HP42S (/thread-68077.html) |
Accurate TVM for HP42S - Tommi - 01-23-2005 An accurate TVM equation written as a program for the HP42S Solver. n number of periods Solve equation: The use of ln1+x and e^x-1 prevents the loss of significant digits for small values of i. Consider these extreme examples for accuracy checking: Example 1: n=63Solving for FV: HP 42S: 63,000,031.4434 (correct is 63,000,031.4433)
Example 2: n=31536000Solving for FV: HP 42S: 331,667.006689 (correct is 331,667.006691) You might compare these results using the "normal" TVM equation, found in many manuals ;) E.g. using the TVM equation in the 42S manual, we get 62,921,744.4422 and 311,565.594018 respectively. The program: 00 {91-Byte Prgm }
Edited: 23 Jan 2005, 12:13 p.m.
Re: Accurate TVM for HP42S - hugh steers - 01-23-2005 hi tommi, yes indeed. that is a good way to tackle the problem. i wrote a page on this problem (also with the same test case) http://www.voidware.com/tvm.htm there's some stuff about how to fix it when you dont have the ln1 and exp1 functions (see the 15c case). also solving for `i' is interesting. checkout the references at the end too.
cheers,
Re: Accurate TVM for HP42S - Tommi - 01-23-2005 Yes, the second test case is well-known. Also known as "A Penny for your Thoughts", see Mathematics Written in Sand
In fact, while lnx+1 and e^x-1 are useful indeed, even better would be the super accurate Cheers!
Edited: 23 Jan 2005, 5:02 p.m.
|