17BII & 17BII+ Discounted Payback Period Revisited



#2

I have been trying to program an equation for discounted payback period into my 17BII (serial 3211S) and my 17BII+ (silver). In the forums, I have found Peter's excellent discounted payback solution in the following post:

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv019.cgi?read=153562

Curiously, this equation works reasonably well on the 17BII+ (reasonably because the answers are slightly off, but very close) but the equation fails as invalid after pressing CALC on the 17BII. I have triple-checked my typing, so it is not an entry error.

Any insight about this behaviour? Is it perhaps a memory limitation that allows equations of only a certain length in the original 17BII? (It shouldn't be, though, because the trig functions are much longer...)

Is this an unusual example the otherwise dodgy "plus" solver outperforming the original?

Is there an edit to Peter's tremendously useful formula that would make it work on the 17BII?

Many thanks in advance!


#3

Tom, my first guess would be that it might be a memory size problem. The 17bii+ has a lot more memory (for storing equations and lists) than the 17bii. Peter's equation is not that big, but if you have a lot of other things stored on the 17bii, it might not have room to compile your equation.

#4

I entered Peter's equation into my 17bii and got an error message when I CALC'd. The error occurred at the 3 right parens before >=1E-15 at the end of line 18. I deleted one of those right parens (leaving 2 of them) and added a right paren after the 15, and it then CALC'd OK.

Apparently, the 17bii does not like it when you enclose the first expression in an IF statement in parens, but it's ok if you enclose the second expression (the one following the logical symbol) in parens. It looks like the 17bii+ must handle both of these ok.

The 17b has the same problem as the 17bii.

Ahh, I found the answer to this problem. In the 17b and 17bii manual is found the following caveat:

A conditional expression that contains within it an algebraic expression might cause the error INVALID EQUATION. If this happens, insert a + before the left parenthesis starting the algebraic expression. For example, change IF((A+2)/5<12: ... to IF(+(A+2)/5<12: ...

They must have fixed this in the plusses.

Edited: 20 Nov 2013, 10:49 p.m.


#5

Don

Fantastic detective work! Thank you so much - your solution has helped add useful functionality to this great little calculator.

Indeed, the outermost set of parentheses before the >= comparison operator seems redundant. In this case, the problem is equally fixed by removing it altogether, but the general workaround you found will be useful in other circumstances too.

Thanks again!

Tom


#6

I vaguely remember reading that caveat in the 17bii manual years ago, but I must not have written an equation that encountered that problem. I'm glad you brought this up.

It makes one wonder, if they had the time to put the caveat in the manual, why didn't they take the time to make the fix and test it? Perhaps it wasn't an easy fix.

#7

Quote:
They must have fixed this in the plusses.

And broken other things as a compensation...

#8

Yeah, I have to wonder if fixing this problem in the plusses may have caused the other problems that caused the behavior of the solver to be so different between the 17b/17bii and the plusses. If that is true, I wish they would have not made this fix!


#9

Interesting!

The change certainly appears to have been made intentionally, or at least to have actively been given attention, as I do not see the caveat in Edition 3 of the manual, which shipped with the 17BII+...

What page does it appear on in the earlier editions?

Tom


#10

In my 17b manual, edition 3 (November 1988), it's on page 161.

In my 17bii manual, edition 1 (December 1989), it's also on page 161.

In my 17bii manual, edition 3 (November 1994), it's also on page 161.

Now there's consistency for you!

I don't have any 17bii+ manual, but I'm supposing it's not in any of them since they fixed the problem in the plusses (as your testing shows).

Edited: 25 Nov 2013, 10:31 a.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Solver issue with HP 17BII - different from 19BII Jeff Kearns 13 587 11-28-2013, 02:36 AM
Last Post: Don Shepherd
  Touch periodic table on HP Prime - revisited Terje Vallestad 2 207 11-23-2013, 11:47 AM
Last Post: Mic
  Is the Prime a superset of the HP 17bII+ ? vrrr 3 257 10-16-2013, 12:03 PM
Last Post: Michael de Estrada
  hp 17bii+ dates calculation... JoePaul 6 390 07-14-2013, 11:32 AM
Last Post: Katie Wasserman
  HP-17bII+ emulator problem (TW?) fhub 7 348 06-23-2013, 09:57 AM
Last Post: Olivier De Smet
  A slide rule to conquer the moon revisited Palmer O. Hanson, Jr. 12 610 06-19-2013, 03:05 PM
Last Post: Ken Shaw
  HEPAX Revisited: Revision 1E available Ángel Martin 4 278 05-03-2013, 01:57 PM
Last Post: Diego Diaz
  HP-17bII+ Solve Compatibility Issues Robert Prosperi 7 413 04-22-2013, 10:11 PM
Last Post: Gerson W. Barbosa
  A very long HP-17BII equation Gerson W. Barbosa 22 894 04-19-2013, 12:37 AM
Last Post: Gerson W. Barbosa
  Trigonometric Functions (HP-17BII) Gerson W. Barbosa 2 253 04-09-2013, 11:57 PM
Last Post: Gerson W. Barbosa

Forum Jump: