HP-42s Entering 4 complex numbers on the stack
|
06-10-2023, 10:12 AM
Post: #14
|
|||
|
|||
RE: HP-42s Entering 4 complex numbers on the stack
Hi,
I came up with a totally different approach. It gives up on real HP-42S compatibility and makes use of awesome Free42/Plus42 extensions: -FUNC that allows user-defined functions with preserves the original stack; -RCOMPLEX and PCOMPLEX with allow to enter a complex number in a different mode than the current rect/polar mode. -Just launch, mess up with the stack without any fear, generate your complex number as usual (on 2 stack levels) and press either RECT or POLAR. Do it As much as you want (until you have 4 complex numbers on the stack) then press EXIT. Done. I have always found the 35S One-line entry way cute, but limited: it will use one stack level... Only if you know exactly in advance the 2 parts of the complex number and key them in! But in most cases you need to build these parts with intermediate computations. Here you can use the stack as a scratch pad before entering a new complex number, the stack will remain intact. Cute, isn't it? Even more so than on the 15C! If you want to to use a real HP 42S you can use variables to save and restore the stack registers, and conversions to enter in a different rect/polar mode. 00 { 59-Byte Prgm } 01▸LBL "RC" 02 CLMENU 03 "RECT" 04 KEY 1 XEQ 02 05 "POL" 06 KEY 6 XEQ 03 07 KEY 9 XEQ 99 08 MENU 09▸LBL 04 10 XEQ 01 11 GTO 04 12 RTN 13▸LBL 02 14 RCOMPLX 15 RTN 16▸LBL 03 17 PCOMPLX 18 RTN 19▸LBL 01 20 FUNC 01 21 STOP 22 RTN 23▸LBL 99 24 CLMENU 25 EXITALL 26 RTN 27 END |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)