# TITLE: Euclidean Algorithm (Gaussian Integers) # AUTHOR: Roy F.A. Maclean # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 18Jun1996, 28Oct2006 # MAKE: CASIO # MODEL: fx9700G or greater # SIZE: 54 # NOTES: Enter two gaussian integers a,b. The GCD(a,b) will be returned. # e.g. gcd(1+8i, 5+5i) = 2+i # @@ Program 1 1->A~B ?->X:?->Y Lbl 1 Int (X/Y)->Q Q=0=>Isz Q X-QY->R Y->X:R->Y Y<>0=>Goto 1 X