The Museum of HP Calculators

HP Forum Archive 18

[ Return to Index | Top of Index ]

UTPN in the solver
Message #1 Posted by Benny on 11 Dec 2007, 1:51 p.m.

Hi, I like to enter the following equation in the singe equation solver:

'p=UTPN(µ, B, x)' but I still get "invalid syntax".

I tried it on the 50g and on the 48gx. Does this look familiar to somebody?

Thanks,

Benny

      
Re: UTPN in the solver
Message #2 Posted by James M. Prange (Michigan) on 11 Dec 2007, 4:56 p.m.,
in response to message #1 by Benny

Hi Benny,

Quote:
Hi, I like to enter the following equation in the singe equation solver:

'p=UTPN(µ, B, x)' but I still get "invalid syntax".

I tried it on the 50g and on the 48gx. Does this look familiar to somebody?


Sure, it's because UTPN is implemented only as a postfix RPN command, not as an algebraic function, thus it can be used an an "immediate" RPN command with the arguments already on the stack, or as a command within a program, but not as a function within an algebraic object.

You can, however, make your own user-defined function with the UTPN command. Write the program:

\<< \-> m v x \<< m v x UTPN \>>
and store it in a global variable with any valid global name that you choose to use. If you use, for example, the name 'Utpn' for the variable, then you can use it as either a postfix RPN command with the syntax m v x Utpn, or within an algebraic object with the syntax 'Utpn(m,v,x)', where m, v, and x represent the mean, variance, and a given value of a normal distribution.

Regards,
James

            
Re: UTPN in the solver
Message #3 Posted by Meenzer on 11 Dec 2007, 5:16 p.m.,
in response to message #2 by James M. Prange (Michigan)

Quote:
Sure, it's because UTPN is implemented only as a postfix RPN command, not as an algebraic function

No. In ALG mode you can use it this way: UTPN(1.2,0.5,0.75)

                  
Re: UTPN in the solver
Message #4 Posted by James M. Prange (Michigan) on 11 Dec 2007, 6:07 p.m.,
in response to message #3 by Meenzer

Quote:
No. In ALG mode you can use it this way: UTPN(1.2,0.5,0.75)

Ah, good point. I'll take your word for that. I often forget that the 49 series has an ALG mode.

Regards,
James

            
Re: UTPN in the solver
Message #5 Posted by Benny on 11 Dec 2007, 5:24 p.m.,
in response to message #2 by James M. Prange (Michigan)

Thanks a lot James,

That does the job. I was confused because I took the example of the 49G+/50g manual where the command is used straight away in the single equation solver (see page 17-16 in the user's guide).

Kind regards,

Benny

                  
Re: UTPN in the solver
Message #6 Posted by James M. Prange (Michigan) on 11 Dec 2007, 6:21 p.m.,
in response to message #5 by Benny

I suppose that the manual was assuming ALG mode, which I'd forgotten about.

Another way to use UTPN while in RPN mode would be to enclose the expression in "back-ticks", which tells the 49 series to treat it as it would in ALG mode. For example, `UTPN(m,v,x)` works just fine.

To key in a "`" character on a 49 series, hold down the Right-Shift key while pressing th "'" ("O") key (without being in ALPHA mode).

Regards,
James

Edited: 11 Dec 2007, 6:21 p.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall