05-30-2018, 02:37 PM (This post was last modified: 05-30-2018 02:40 PM by Logan.)
Post: #1
 Logan Member Posts: 130 Joined: Jul 2016
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:

05-30-2018, 03:14 PM
Post: #2
 Thomas Okken Senior Member Posts: 929 Joined: Feb 2014

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.
05-31-2018, 12:44 PM
Post: #3
 Logan Member Posts: 130 Joined: Jul 2016
Thanks Thomas.
12-07-2018, 03:31 PM
Post: #4
 morex Junior Member Posts: 18 Joined: Nov 2018
Logan:

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

Regards

10C 11C 12C 15C 16C 28C 28S 32S 32SII 33C 41C 41CV 41CX 42S 48SX 48G 97 100LX
12-17-2018, 04:20 PM
Post: #5
 Logan Member Posts: 130 Joined: Jul 2016