HP Forums

Full Version: (30b) Euclidean GCD Programme
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Returns GCF of integers in X & Y registers to X register:

0 P2
1 =
2 3
3 0
4 0
5 STO Mode
6 R↓
7 Lbl 02
8 /
9 Ans
10 Swap
11 Math
12 Up
13 Input
14 Swap
15 *
16 Ans
17 Swap
18 RND
19 Input
20 GT 02
21 R↓
22 3
23 1
24 2
25 STO Mode
26 R↓
27 X^2
28 √
29 RTN

Lines 22 to 25 return the display to the BEST mode from the FIX 0 mode used in the programme.
Reference URL's