Post Reply 
Most mind-blowing program for your favorite calculator
07-01-2022, 05:02 AM
Post: #17
RE: Most mind-blowing program for your favorite calculator
(06-30-2022 07:34 AM)Csaba Tizedes Wrote:  2.) GCD (8 steps) for HP15C without MOD: GCD (Greatest Common Divisor) for HP-15C (8 steps) without MOD

These programs to calculate the GCD use only 5 steps:

HP-11C
Code:
001 -    42 20  x>y       
002 -       34  x<>y      
003 -       30  -         
004 -    43 36  LSTx      
005 -    42 40  x=y

HP-15C
Code:
001 - 43,30, 7  TEST 7      
002 -       34  x<>y        
003 -       30  -           
004 -    43 36  LSTx        
005 - 43,30, 5  TEST 5

Example

CLEAR PRGM

112
ENTER
63
R/S

7.0000



Remark: These steps must be the only ones in memory.
Otherwise the program will not jump to the first line if the condition in line 005 is false.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Most mind-blowing program for your favorite calculator - Thomas Klemm - 07-01-2022 05:02 AM



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