Post Reply 
Missing function on HP 42S
11-23-2021, 03:27 AM
Post: #5
RE: Missing function on HP 42S
(11-22-2021 08:01 AM)Werner Wrote:  
(11-21-2021 11:20 PM)Allen Wrote:  I would say the same about my own desires for a PMOD- Modular exponentiation function.
Here's my 41-compatible, stack-only version: Z^YMOD.

Warner,
Thank you for the menu tip!

I did write my own 39 byte program (with 4 char label), but use storage registers:
Code:

00 { 39-Byte Prgm }
01>LBL "PMOD"
02 STO 03
03 SIGN
04 X<>Y
05>LBL 01
06 STO 02
07 1
08 AND
09 RCL× ST Z
10 X=0?
11 SIGN
12 ×
13 RCL 03
14 MOD
15 X<>Y
16 X^2
17 RCL 03
18 MOD
19 X<>Y
20 RCL 02
21 2
22 BASE÷
23 X!=0?
24 GTO 01
25 Rv
26 END

17bii | 32s | 32sii | 41c | 41cv | 41cx | 42s | 48g | 48g+ | 48gx | 50g | 30b

Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Missing function on HP 42S - lrdheat - 11-17-2021, 06:51 PM
RE: Missing function on HP 42S - Allen - 11-21-2021, 11:20 PM
RE: Missing function on HP 42S - Werner - 11-22-2021, 08:01 AM
RE: Missing function on HP 42S - Allen - 11-23-2021 03:27 AM
RE: Missing function on HP 42S - lrdheat - 11-22-2021, 03:20 PM



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