03-16-2016, 09:54 PM
Hello,
Got so accustomed on the HP35s complex entry that 50g parenthesis and comma separation not to mention alpha+Rshift+6 started to feel painfull so I created these two small programs to allow automatic creation of complex number from the parts entered to the stack.
First application is independent, but the 2nd aplication/macro is calling the first one.
You enter in RPN: Re [SPC] Im [Re±Im]
.. and it creates a complex number representation from rectangular entry, but shown in the mode you have chosen.
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).
I also suggest creating a polar <-> rectangular toggler.
All bug reports and improvement suggestions are welcome.
Got so accustomed on the HP35s complex entry that 50g parenthesis and comma separation not to mention alpha+Rshift+6 started to feel painfull so I created these two small programs to allow automatic creation of complex number from the parts entered to the stack.
First application is independent, but the 2nd aplication/macro is calling the first one.
Code:
<< i * SWAP + >> 'Re±Im' STO
.. and it creates a complex number representation from rectangular entry, but shown in the mode you have chosen.
Code:
<< DUP2 COS * UNROT SIN * Re±Im >> 'YɑX' STO
.. 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).
I also suggest creating a polar <-> rectangular toggler.
All bug reports and improvement suggestions are welcome.
(03-18-2016 02:20 PM)Vtile Wrote: [ -> ]Late at yesterday I were watching some HP50g video on the net and noticed a program which put values from the stack to complex number, I figured out that it looks up which mode the calc is and builds the complex number based on that information so I made something similar.
Edit. It seems that the R→C command found in the PRG/TYPE is making only rectangular representation of the complex no matter which mode the calculator is in. Program below is using that now command for Cplx creation, else is the MODE wrapper so the type is based on the coordinate mode the calc is in (polar/rect) so you can type both polar and rect form and chose which one you need / want to enter by selecting coordination system with coordinate toggler program.
Code:
«
«
-16 FS? -15 FS? -103 FS? → Y X C
«
IF 'C==0' THEN
"Not in Complex mode, Exit." MSGBOX
ELSE
IF 'Y==0' THEN
R→C // command in PRG/TYPE i just found.
ELSE
IF 'X==0' THEN
DUP2 COS * UNROT SIN *
R→C // command in PRG/TYPE i just found.
ELSE
"Spherical, error." MSGBOX
END
END
END
»
» 'MKE-C' STO
Toggler program (copied somewhere on the net, propably from 'rolinychupetin' homepage I accidentally did find somewhere at time.)
Code:
« -16 FS? → X
« IF 'X==0' THEN
CYCLIN
ELSE
RECT
END
»
» 'R↔Po' STO