The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

TVM bug in HP 20b?
Message #1 Posted by Daniel Castro on 9 Dec 2009, 2:36 p.m.

Hello all,

This is my first post in this forum though I have been following it for some time. I have detected a strange behavior on the HP 20b doing a NPV calculation when the I/YR is 0%. As an example see the following scenario:

P/YR:12

PV:-1000

PMT:500

FV:0

I/YR:0

In this case the resulting N on my calculator is Ė1000 ??

Repeating the scenario with I/YR: 0.0000000001 gets the right solution N=2 (the same result obtained with the 50g or the 17BII in the first scenario, i.e. I/YR=0)

My firmware is an old one (6.24.2008). Could someone here check if this error is also present with newer firmware versions?

Thank you in advance

      
Re: TVM bug in HP 20b?
Message #2 Posted by Thomas Radtke on 10 Dec 2009, 3:42 a.m.,
in response to message #1 by Daniel Castro

Same on the 8.01.2008 version.

            
Re: TVM bug in HP 20b?
Message #3 Posted by Tim Wessman on 10 Dec 2009, 11:16 a.m.,
in response to message #2 by Thomas Radtke

Oops.

TW

                  
Re: TVM bug in HP 20b?
Message #4 Posted by Gene Wright on 10 Dec 2009, 12:27 p.m.,
in response to message #3 by Tim Wessman

Good news:

1) Solving for N when the interest rate is zero is a division problem: PV divided by PMT = N. That's a lot less work than keying in the information into the TVM registers. It DOES require recognizing the I% is zero and changing how you operate, but I've taught my students for years to do just that.

2) The NPV function itself works FINE with a 0% interest rate. This is confined to the TVM functions / registers (N, I%/YR, PV, PMT, and FV) only.

Bad news:

1) Yes, it does give the wrong answer to N when the interest rate is zero.

As Tim said, Oops.

                        
Re: TVM bug in HP 20b?
Message #5 Posted by Daniel Castro on 11 Dec 2009, 4:05 p.m.,
in response to message #4 by Gene Wright

Quote:
Solving for N when the interest rate is zero is a division problem: PV divided by PMT = N.

Yes, maths are amazing :D

Obviously I donít think many people ever use the financial functions for such calculation on real life (I myself found it while playing with the calculator). That might also be a reason about why nobody has informed about the error before (or at least I couldn't find anything on Google before posting here). All in all, this is not a problem that will cause a probe to crash on Mars surface, but a bug is a bug ;).

Quote:
2) The NPV function itself works FINE with a 0% interest rate.

Yes, NPV calculation in cash flow analysis works fine, as it does any other TVM analysis with I%=0. As a matter of fact the buggy scenario is a particularization of a payback analysis on a cash flow with an initial investment, constant inflows and no interests (or flows increasing evenly at I% rate). Luckily the payback function on the Cash Flow works fine AFAIK.

My intention was to check with others if this bug was still present on the new firmware version, as I have the old one (including the logarithm bug) and wanted to know if it worth the time to build a serial cable to upgrade it... now I see I can live without the cable unless HP decides to correct this and release the new firmware on their SDK.

Anyway, thank you to you all for taking the time to check this. I will contact HP's customer support to let them know about the bug.

                              
Re: TVM bug in HP 20b?
Message #6 Posted by Gene Wright on 11 Dec 2009, 4:40 p.m.,
in response to message #5 by Daniel Castro

Actually, HP knows about it by now. They search this forum often. I **know** they know about the error. :-)

And, please don't take anything I said OR how I said it as indicating that some bugs don't matter. They do and this is certainly a bug that should be fixed. Quite!

I wanted to make sure that anyone finding this thread later through a google search also saw that this is a very special case error which, although it should be fixed, occurs in a very easily recognized circumstance AND that can be avoided by a procedure that is MUCH easier to do anyway.

No worries! Good catch! Now, find something else! :-)

                                    
Re: TVM bug in HP 20b?
Message #7 Posted by Daniel Castro on 16 Dec 2009, 3:46 p.m.,
in response to message #6 by Gene Wright

Quote:
And, please don't take anything I said OR how I said it as indicating that some bugs don't matter. They do and this is certainly a bug that should be fixed. Quite! I wanted to make sure that anyone finding this thread later through a google search also saw that this is a very special case error which, although it should be fixed, occurs in a very easily recognized circumstance AND that can be avoided by a procedure that is MUCH easier to do anyway.

Seems that by then the error will be fixed by HP. Luckily this is easily detectable, so as you say I do not think this bug will cause too much trouble. All in all, calculators are a wonderful tool but nothing substitutes common sense...

To be fair with the 20b, even after this it is still my preferred calculator for work as it covers 90% of my daily needs, itís easy to carry and work with, pretty fast, can switch from RPN to algebraic in case someone borrows it, and it is cheap enough to not committing suicide in case it is stolen. Sure, the keys are not up to the quality of vintage models or even modern ones as 50g (hope to see this improved in future revisionsÖ) but I suppose HP had to reach a compromise to get a certain price point on retail.

Quote:
Now, find something else! :-)

Hope not :D. In any case, HP had a great idea about adding a serial interface for updating the firmware. Good move! Letís see if HP can keep it on future mid-range models.

                              
Re: TVM bug in HP 20b?
Message #8 Posted by Tim Wessman on 11 Dec 2009, 7:40 p.m.,
in response to message #5 by Daniel Castro

Yes, we know about it now. Thanks for the report! We much prefer people reporting on it here to be fixed rather than calling support. Makes it much easier to just get it done. :-)

At first glance, it looks like there is code to detect an I of zero, but it should be returning (pv+fv)/(i*FV-PMT*(1+i)*beg) but is returning the wrong variable so it is actually pv+fv coming back.

I'll investigate why this is happening to make sure it doesn't break something else, and give it a thorough testing next week.

TW

Edited: 11 Dec 2009, 8:21 p.m.

                                    
Re: TVM bug in HP 20b?
Message #9 Posted by Daniel Castro on 16 Dec 2009, 3:53 p.m.,
in response to message #8 by Tim Wessman

Thank you Tim, it seems that I will have to build my serial cable to reflash the firmware sooner than I thought ! ;) This is what I call super technical service.

Talking about the serial cable, does someone in this forum know where in Europe can I get the 6 pin pogo connector for interfacing with the 20b? It is proving to be more difficult to find than I expected.

                                          
Re: TVM bug in HP 20b?
Message #10 Posted by Eric Smith on 16 Dec 2009, 4:36 p.m.,
in response to message #9 by Daniel Castro

It's custom made, not a standard connector. Perhaps you could make your own with six pogo pins and some low-melting-point plastic (e.g., Shapelock).

                                                
Re: TVM bug in HP 20b?
Message #11 Posted by Daniel Castro on 18 Dec 2009, 1:37 p.m.,
in response to message #10 by Eric Smith

Quote:
It's custom made, not a standard connector. Perhaps you could make your own with six pogo pins and some low-melting-point plastic (e.g., Shapelock).

Thank you very much Eric, will take a look at it. These plastics could be pretty useful for some of my projects.

                                          
Re: TVM bug in HP 20b?
Message #12 Posted by Tim Wessman on 17 Dec 2009, 4:07 p.m.,
in response to message #9 by Daniel Castro

Send me an email at myname at hp.com and I'll see what I can do. May be after the new year though. . .

The issue is fixed now BTW.

TW

Edited: 17 Dec 2009, 4:07 p.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall