Solver issue with HP 17BII - different from 19BII



#15

I recently acquired a very nice HP 17BII (Singapore 1994), and like it very much - especially now that I have functions for TRIG and Inverse TRIG!

Source: W.B. Maguire II - Improved TRIG and INVERSE TRIG functions for the HP-17BII

I am not yet proficient in the use of the solver or its many interesting features that qualify it as a pseudo-programmable calculator with the L() and G() functions (LET and GET), IF structures and Sigma functions. However, I have noticed while copying some solver equations from my HP 19BII over to the 17BII, that it does not accept the same equation syntax as the 19BII, despite what Valentin Albillo quoted in a 2003 discussion:

Quote:
The solver in this machine is exactly the same as that of the 19bii and includes all 19bii functions even if not documented, including Let and Get.

The following equation for Canadian mortgages (right out of the 19BII Owner's Manual):
CAN~MORT: FV(N:((1+CI%YR/200)^(1/6)-1)*1200:PV:PMT:12:0)=FV

displays a standard TVM menu: "N" "CI%YR" "PV" "PMT" "FV". Unfortunately, the 17BII will not accept this equation! If gives an error (INVALID EQUATION) at the first bracket - after FV.

Instead, I have had to use this equation from the 17BII manual:

CAN~MORT: PV=-PMTxUSPV(((1+I%YR/200)^(1/6)-1)x100:N)-FVxSPPV(((1+I%YR/200)^(1/6)-1)x100:N)

The problem with this equation (even though it works and I could re-arrange the terms... but that's not the point) is the use of USPV and SPPV functions which are not needed as well as the order of the variables: "PV" "PMT" "I/YR" "N" "FV".

How can I make the 19BII equation work in the 17BII?

Thanks,

Jeff


Edited: 27 Nov 2013, 11:43 a.m.


#16

Hi Jeff,

The 17Bii does not have the entire suite of solver functions available in the 19B*.

At one point I had a comparitive list of all the solver functions in the 17B*, 19B*, and 27S. However, I cannot seem to locate it at the moment. Maybe I compiled it myself from the various manuals -- don't recall.

For the Canadian mortgage solver, you need to use equations presented in the 17B* manual.

As you no doubt found, the 17B* is also missing many of the 19B*'s mathematical functions as well.


#17

Hi Neil,

Thanks for your response. I am aware of the meager subset of math functions in the 17BII. Added Trig and inverse Trig functions (although no hyperbolics) make it quite useful for an engineer.

I now understand why it cannot accept the relatively simple-looking equation for Canadian mortgages presented in the 19BII manual: while I get the lack of trigonometric functions, the 19BII solver TVM function FV(n:i%yr:pv:pmt:p/yr:m) is surprisingly absent from the 17BII list.

Bottom line is: the solvers are definitely not identiacal.

Jeff

#18

Quote:
How can I make the 19BII equation work in the 17BII?

Well, you can't, since the 17bii solver does not support the FV function (which is why the error occurs right where it did). Valentin is correct about L() and G(), but there are several 19bii solver functions that are not in the 17bii solver (including random number, unfortunately).

About all you can do is figure out exactly what the FV function does on the 19bii, and duplicate that in your equation.

#19

Quote:
I recently acquired a very nice HP 17BII (Singapore 1994), and like it very much - especially now that I have functions for TRIG and Inverse TRIG!

Source: W.B. Maguire II - Improved TRIG and INVERSE TRIG functions for the HP-17BII


The following might be faster - once verified - and accurate to at least eleven digits:

IF(S(SIN):(-1)^INT(X/180+0*L(X:MOD(X:180)*PI/180))*(2*SIGMA(K
:1:21:4:X^K/FACT(K))-(EXP(X)-EXP(-X))/2)-SIN:IF(S(COS):COS-(-
1)^INT(X/180+0*L(X:MOD(X:180)*PI/180))*(2*SIGMA(K:4:20:4:X^K/
FACT(K))+2-(EXP(X)+EXP(-X))/2):IF(S(TAN):TAN-(0*L(X:MOD(X:180
)*PI/180)+4*SIGMA(K:1:21:4:X^K/FACT(K))-EXP(X)+EXP(-X))/(4*
SIGMA(K:4:20:4:X^K/FACT(K))+4-EXP(X)-EXP(-X)):IF(S(R~D):X*180
/PI-R~D:IF(S(D~R):X*PI/180-D~R:IF(S(ASIN):ASIN-(0*(L(B:SGN(X)
+IP(X))+L(X:ABS(X))+L(X:IF(X<>1:X/SQRT(1-SQ(X)):X))+L(X:IF(X<
1:L(A:1)*X+L(Q:0):0*(L(Q:PI)+L(A:-1))+INV(X)))+L(X:IF(X>SQRT(
2)-1:0*L(V:PI/2)+(X-1)/(X+1):X+L(V:0))))+(G(Q)+G(A)*(4*SIGMA(
K:1:29:4:X^K/K)-LN((1+X)/(1-X))+G(V)))*G(B)*90/PI):IF(S(ACOS)
:ACOS-(0*(L(X:IF(X<>-1:SQRT((1-X)/(1+X)):X))+L(B:SGN(X))+L(X:
ABS(X))+L(X:IF(X<1:L(A:1)*X+L(Q:0):0*(L(Q:PI)*L(A:-1))+INV(X)
))+L(X:IF(X>SQRT(2)-1:0*L(V:PI/2)+(X-1)/(X+1):X+L(V:0))))+(G(
Q)+G(A)*(4*SIGMA(K:1:29:4:X^K/K)-LN((1+X)/(1-X))+G(V)))*(3-G(
B))*90/PI):ATAN-(0*(L(B:SGN(X))+L(X:ABS(X))+L(X:IF(X<1:L(A:1)
*X+L(Q:0):0*(L(Q:PI)+L(A:-1))+INV(X)))+L(X:IF(X>SQRT(2)-1:0*L
(V:PI/2)+(X-1)/(X+1):X+L(V:0))))+(G(Q)+G(A)*(4*SIGMA(K:1:29:4
:X^K/K)-LN((1+X)/(1-X))+G(V)))*G(B)*90/PI))))))))

Running times:

SIN: 1.8 s
COS: 1.6 s
TAN: 2.6 s
R~D: 2.0 s
D~R: 2.7 s
ASIN: 5.2 s
ACOS: 8.1 s
ATAN: 10.9 s

That's the equation in message #22 here. Still in my HP-17BII, but I don't think I would key all that in if somehow it got erased from memory :-)

Gerson.


#20

Gerson,

While I do not doubt the run-times, the mere fact that it is 48% longer (character count) than the three routines from Maguire make it unlikely I will spend an hour (or more) entering these 1145 characters to save a fraction of a second.

Great work though... ;-)

Cheers,

Jeff


#21

Guess how long it took me to enter the equation for the 8-queens problem?

Quote:
The problem with this equation (...) is (...) the order of the variables: "PV" "PMT" "I/YR" "N" "FV".

You could probably add the following:

(N+CI%YR+PV+PMT+FV)*0+...

The variables are ordered according to their appearance in the equation. I can't check that right now but IIRC that's why I started with:

QUEENS:
Q=A+B+C+D+E+F+G+H+
(...)

Cheers

Thomas

#22

"Only" 1117 characters, considering SIGMA is one-character long on the HP-17BII :-)

These are shorter, but are not combined into a single equation.

Another SOLVER option, more akin to that on the HP-19BII, is the HP-200LX Solver.

Regards,

Gerson.

#23

Gerson,

The ATAN equation from the W.B. Maguire link executes in about 5 seconds.

Jeff


#24

The delay is due to the ATAN position in the IF-structure. ATAN as an independent function would take no more than three seconds, I think.

Gerson.

#25

Jeff

NO argument w explanations already provided, however the TVM MENU QUESTIONS at the following URL ...
http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/mostViewedDisplay/?sp4ts.oid=33540&spf_p.tpst=psiContentDisplay
&spf_p.prp_psiContentDisplay=wsrp-navigationalState%3DdocId%253Demr_
na-bpia5125-1%257CdocLocale%253Den_US&javax.portlet.begCacheTok=
com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken

... may be useful in further TVM-Solver scenarios for the 17 & 19 model business/finance calculators.

Determining if the TVM menu can be used with the Solver (HP 19bii calculator)

The TVM menu cannot be used with the Solver, but the TVM Solver
functions can be used to do the same calculations.

The TVM Functions

The five Solver TVM functions allow for equations that do
calculations analogous to the calculations done in the TVM menu:

N ( I%yr : pv : pmt : fv : p/yr : m )

I %yr ( n : pv : pmt : fv : p/yr : m )

pv ( n : i%yr : pmt : fv : p/yr : m )

PMT ( n : i%yr : pv : fv : p/yr : m )

FV ( n : i%yr : pv : pmt : p/yr : m )

Each function calculates one TVM value, given the values for all
the others. The parameters of the functions (the contents of the
parentheses) are defined identically to the built-in TVM variables
described in the following table, except that m stands for
BEGIN/END mode. Use m=1 for BEGIN mode and m=0 for END mode. For
example, the first function calculates N (the total number of
payments or compounding periods), given the annual percentage
interest rate, present value, payment amount, future value, number
of payments per year, and the BEGIN/END mode.

Give the parameters any legal variable name; for example use LOAN
in place of pv. Parameters can also be algebraic expressions. For
example, the following equation calculates the monthly payment for
a car loan:

CARPMT = PMT (MONTHS : I% YR : PRICE-DOWN : 0 : 12 : 0)

Where MONTHS is the duration of the loan (in months), PRICE is the
purchase price, and DOWN is the down payment (pv = PRICE-DOWN, n =
months, and the last 0 = END mode). Notice that PMT is not a
variable in the equation--it is the name of the function.

The solver TVM variables are not shared with the variables in the
TVM menu. For example, the variable I%YR in the CARPMT equation is
separate from the TVM variable I%YR.

BLUF - the TVM functions are special when used in the SOLVER.

BEST!

SlideRule

#26

Jeff, why not just use the formula that is in the 17bII manual? If it works, as you say it does, and you can easily change the order of the arguments, why the objection to USPV and SPPV? I'm just curious.


#27

Don,

That is exactly what I decided to do. I was unaware of the FV(...) function issue in the 17BII. As for USPV and SPPV, I have no objection. I just did not understand initially why they were used instead of the more logical 19BII solver functions.

Thanks,

Jeff


#28

OK, thanks Jeff.


Possibly Related Threads…
Thread Author Replies Views Last Post
  hp-prime solver and variable name fabrice48 22 8,482 12-10-2013, 03:25 AM
Last Post: fabrice48
  HP Prime Triangle solver BruceH 29 8,805 11-28-2013, 12:03 AM
Last Post: Dale Reed
  17BII & 17BII+ Discounted Payback Period Revisited Tom Neudorfl 8 2,924 11-25-2013, 10:28 AM
Last Post: Don Shepherd
  HP prime: linear solver app Alberto Candel 1 1,458 11-21-2013, 01:57 AM
Last Post: Michael Carey
  HP Prime: Linear Solver app bug BruceH 0 1,167 11-15-2013, 06:36 PM
Last Post: BruceH
  Another minor Prime hexagesimal issue Jonathan Cameron 1 1,399 11-08-2013, 02:37 PM
Last Post: Michael de Estrada
  HP Prime Solver Variables Issue Anibal Morones Ruelas 8 3,139 10-19-2013, 09:45 AM
Last Post: Harold A Climer
  Is the Prime a superset of the HP 17bII+ ? vrrr 3 1,658 10-16-2013, 12:03 PM
Last Post: Michael de Estrada
  HP Prime triangle solver oddity BruceH 0 1,069 10-13-2013, 09:08 PM
Last Post: BruceH
  Using units in Numeric Solver Harold A Climer 1 1,293 10-13-2013, 10:44 AM
Last Post: Tim Wessman

Forum Jump: