Post Reply 
HP 50g Programming functions to be used in the EQW
06-09-2016, 10:09 AM (This post was last modified: 06-09-2016 11:07 AM by Vtile.)
Post: #2
RE: HP 50g Programming functions to be used in the EQW
Equation Writer aka EQW is algebraic (which I personally like on that, someone else might not like). So in UserRPL you are using RPL/RPN like name suggest so if you like to take sine from angle of X you then enter ie.

<< 45 SIN >>
Results -> 0.7071...

This same logic implies most (all that I know / remember) of the commands in userRPL..

So first the object(s) to be manipulated and after that the action you want to do.

IE. This program creates complex number polar form a "quick" way.
Quote:
Code:
<< DUP2 COS * UNROT SIN * Re±Im >> 'YɑX' STO

You enter in RPN: ABS [SPC] ARG [YɑX]
.. and it creates a complex number representation from polar entry, but shown in the mode you have chosen. Note that I haven't tested it in the radian mode almost at all, but it seems to work also in radians flawlessly (why not).

You can familiarise yourself these commands and RPL logic more by turning the calculator to RPN mode and using letters ie. Y and Z (also X if it doesn't have value in it)

Now you can build the exact equations ( you normally write in EQW ) in stack view. Like
3: 'W'
2: 'Y'
1: 'Z'
Then command: / (=divide key)
Result:
2: 'W'
1: 'Y/Z'
Then command: + (=add key)
Result
1: '(Y/Z)+W'
Then command: SIN (=Sine key)
Result :
1:SIN((Y/Z)+W) [or close to this depending of the settings of the CAS and flags]

So the buety of UserPRL comes from exactly from this, you can make programs precisely as you would using the normal RPN-mode calculator. If you are using Algebraic mode (as is by defaul) as your normal mode, you are giving away most of the benefits of the 50g. It takes week or two to get used to the RPN mode, but you will not ever want to go back after that it is that intuitive.

PS. Were this what you were asking?? I'm not sure if you can use UserRPL programs in EQW, but if you can the difference must be the same as giving values to userRPL program in ALG / RPN mode default view.
The above code example have this (underlined) "Re±Im" command.
<< DUP2 COS * UNROT SIN * Re±Im >>
Which is a call for an another UserRPL program/function. Re±Im contains a code:
<< i * SWAP + >>

Code examples are taken from thread:
http://www.hpmuseum.org/forum/thread-5881.html

PPS. In some point of time you will need this Advanced User Manual. http://www.hpcalc.org/details.php?id=7141 (note: there is also searchable version around on the net, I'm not sure if this is it. This one were first google did give.)

PPPS. Also for more complex programs you should download and install HP useredit software (which contains IDE and emulator for atleast userRPL programming) that also can be found on the HPCalc.org
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 50g Programming functions to be used in the EQW - Vtile - 06-09-2016 10:09 AM



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