Post Reply 
(11C) Purchase or Lease
09-26-2018, 06:59 PM
Post: #9
RE: (11C) Purchase or Lease
(09-26-2018 12:53 PM)Albert Chan Wrote:  HP-12C, Horner's for NPV (cash-flow input in reverse)
Multiply flipped rate => 907.76891 00
Divide discount rate => 907.76893 00

Hey, that's a difference of 0,002 Cents!!!!1111eleven!!!

(09-26-2018 12:53 PM)Albert Chan Wrote:  HP-12C, Horner's for FV, then back to NPV => 907.76892 51

HP-12C build-in CFj/Nj code => 907.76893 37 ... Amazingly Good

How does HP-12C code get it so close ?

Simple. Since 1976 most HPs use three additional guard digits for their internal functions. So the 10-digit 12C internally works with 13 digits. Only this way the usual 10-digit accuracy for scientific or financial functions can be achieved. Well, mostly, but not always. Try the infamous 3201 example on a regular 10-digit HP. ;-)

(09-26-2018 12:53 PM)Albert Chan Wrote:  My guess is calculations all done in 13 internal digits, only 1 rounding for the NPV result ...

That's the main reason. But there is more. As far as I remember the financial calculators have special internal functions that evaluate (1+i)n and (1+i)n–1 with higher accuracy. I assume this means they have something like ln(1+x) and ex–1 implemented so that these expressions can be accurately calculated even for small interest rates. There is a nice example in the HP15C Advanced Functions Handbook that shows what happens when these expressions are evaluated with standard functions.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Purchase or Lease - Gamo - 09-25-2018, 10:24 AM
RE: (11C) Purchase or Lease - Albert Chan - 09-25-2018, 01:28 PM
RE: (11C) Purchase or Lease - Dieter - 09-25-2018, 04:27 PM
RE: (11C) Purchase or Lease - Albert Chan - 09-25-2018, 06:36 PM
RE: (11C) Purchase or Lease - Gamo - 09-26-2018, 02:11 AM
RE: (11C) Purchase or Lease - Dieter - 09-26-2018, 05:40 AM
RE: (11C) Purchase or Lease - Gamo - 09-26-2018, 07:37 AM
RE: (11C) Purchase or Lease - Albert Chan - 09-26-2018, 12:53 PM
RE: (11C) Purchase or Lease - Dieter - 09-26-2018 06:59 PM
RE: (11C) Purchase or Lease - Gamo - 09-27-2018, 01:23 AM
RE: (11C) Purchase or Lease - Dieter - 09-30-2018, 05:45 PM



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