Post Reply 
(42S) Four level stack complex numbers entry.
11-30-2018, 05:04 PM
Post: #1
(42S) Four level stack complex numbers entry.
Four Level stack complex numbers entry.
by Guillermo Castarés
Nov-2018

The "COMPLEX" function provided in 42S to input complex numbers takes two parameters from stack. This leaves only 3 level stack for complex operations.

This little Program help to operate with complex numbers conserving a 4 level stack.

And if you assign the labels to custom menu you can save some keystrokes also.

Example of use:

[RECT]
3 [CpxA] 4 [CpxB]
1 [CpxA] 5 [CpxB]
[POLAR]
5 [CpxA] 45 [CpxB]
4 [CpxA] 30 [CpxB]
[RECT]
[+]
[*]
[+]

-17.6780 i44.5337


The same, other way:
[RECT]
3 [CpxA] 4 [R/S]
1 [R/S] 5 [R/S]
[POLAR]
5 [R/S] 45 [R/S]
4 [R/S] 30 [R/S]
[RECT]
[+]
[*]
[+]

-17.6780 i44.5337

Code:

00 { 71-Byte Prgm }
01>LBL "CpxA"          ;  Enter Re (RECT) or z (POLAR) 
02 STO "C,A"        
03 CLA
04 ARCL ST X
05 FC? 73
06 |-" i"
07 FS? 73
08 |-" \angle"
11 Rv
09 PROMPT               ; You can use R/S to confirm second entry
13>LBL "CpxB"          ; Enter Im (RECT) or angle (POLAR) 
14 R^
15 STO "C,T"
16 Rv
17 RCL "C,A"
18 X<>Y
19 COMPLEX
20 RCL "C,T"
21 Rv
22 CLV "C,A"
23 CLV "C,T"
24 END


Attached File(s)
.zip  HP-42S 4 Stack Complex Entry.zip (Size: 1.2 KB / Downloads: 6)
Find all posts by this user
Quote this message in a reply
11-30-2018, 05:37 PM
Post: #2
RE: (42S) Four level stack complex numbers entry.
Gracias Guillermo por compartirlo / Thanks for sharing.

Saludos Saluti Cordialement Cumprimentos MfG BR + + + + +
Luigi Vampa +
Free42 HuaweiP10 '<3' I + + +
Find all posts by this user
Quote this message in a reply
Post Reply 




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