Post Reply 
(12C) Greatest Common Divisor
10-08-2021, 08:08 AM (This post was last modified: 10-08-2021 08:15 AM by Gamo.)
Post: #4
RE: (12C) Greatest Common Divisor
Long time no update for the GCD program.

I dig around some HP manual and found the HP-91 User's Manual on

Page 122 demostrated the manually keys in steps to find GCD with this

algorithm the slower computation speed on Original Classic HP-12C

will do really well and here I adapted this to run on the HP-12C

Code:

01 STO 1
02 R/S
03 ENTER
04 ENTER
05 RCL 1
06 รท
07 INTG
08 RCL 1
09  x
10  -
11 X=0
12 GTO 19
13 RCL 1
14 X<>Y
15 STO 1
16 CLx
17  +
18  GTO 03
19  RCL 1
20 GTO 00

Example:
GCD (153, 351)

153 [R/S] display 153
351 [R/S] display answer 9

GCD = 9

Gamo 10/2021
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) Greatest Common Divisor - Gamo - 01-06-2018, 12:29 AM
RE: (12C) Greatest Common Divisor - Carsen - 01-06-2018, 01:10 AM
RE: (12C) Greatest Common Divisor - Gamo - 01-06-2018, 04:23 AM
RE: (12C) Greatest Common Divisor - Gamo - 10-08-2021 08:08 AM
RE: (12C) Greatest Common Divisor - Gamo - 01-26-2022, 07:35 AM



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