HP Forums
42 Complex Menu - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: 42 Complex Menu (/thread-10825.html)



42 Complex Menu - Logan - 05-30-2018 02:37 PM

I'm working on a very simple complex menu for the DM42/HP42 and would like some feedback, if anyone is willing.

The menu keys, similar to the suggestion found in another thread are:

i /_ ABS ARG Conj Cmplx

The idea is straightforward: hitting the i, changes display mode to rectangular, /_ changes to polar, ABS takes the magnitude, ARG takes the argument, Conj gives the complex conjugate, and Cmplx operates just like the COMPLEX key, to compose or decompose a complex number.

My current method of entry for say, 4 + i5 is:
4
i
5
Cmplx
Note that the menu keys are used and the result is that I see 4 + i5 displayed (automatically switching mode for verification).

The one function I'm really not sure about is the ARG. Everything else except Conj leaves the stack and LastX as is but I don't know of a built-in way to get the argument (like the ABS gets the magnitude but leaves the stack intact).

Any thoughts on this, on the layout, or other functions that might be useful? I've uploaded the program to my drive here:

https://drive.google.com/open?id=17tz7uNXQmSwf7W51KIRsuQ7KKIwit3ua


RE: 42 Complex Menu - Thomas Okken - 05-30-2018 03:14 PM

How about:

Code:
00 { 25-Byte Prgm }
01▸LBL "ARG"
02 FS? 73
03 GTO 00
04 POLAR
05 COMPLEX
06 RECT
07 GTO 01
08▸LBL 00
09 COMPLEX
10▸LBL 01
11 X<>Y
12 R↓
13 END

It loses the contents of T but otherwise does the job. It could also be improved by checking that X is complex first.


RE: 42 Complex Menu - Logan - 05-31-2018 12:44 PM

Thanks Thomas.


RE: 42 Complex Menu - morex - 12-07-2018 03:31 PM

Logan:

Maybe you want to consider in your menu This way to have 4 level complex stack.

Regards


RE: 42 Complex Menu - Logan - 12-17-2018 04:20 PM

Thank you, that's a nice program.