Post Reply 
(12C) Modulo Operation
06-30-2024, 04:30 PM
Post: #3
RE: (12C) Modulo Operation
(07-31-2018 06:10 PM)Albert Chan Wrote:  Register Y X --> X Mod(Y, X)

Keep pressing R/S, eventually it display 0, previous Mod was Gcd (Rotate key to get it back)

Code:
                ; HP-12C Mod Program: Y X --> X Mod(Y, X)
Enter Enter     ; Y X X X
- LastX +       ; Y Y X X
Rotate          ; X Y Y X
/ LastX Swap    ; X Y X Y/X
Int * -         ; X X X Mod(Y,X)

From my old post, we can have mod get gcd as well
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) Modulo Operation - Gamo - 06-30-2024, 05:15 AM
RE: (12C) Modulo Operation - C.Ret - 06-30-2024, 11:20 AM
RE: (12C) Modulo Operation - Albert Chan - 06-30-2024 04:30 PM



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