³ò jÈKc@sdZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zhed <ed <ed <ed <ed <ed<ed<edWx|d@p|dL}q[WxW||joI||jo||}}n||8}x|d@p|dL}q°WqxW||>S(Nii((RRtnExp2((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pytgcdRSB$s*        cCs×d}x2||Bdp"|d}|d}|d9}q Wx|d@p|d}q>Wx|d@p|d}q[WxW||joI||jo||}}n||8}x|d@p|d}q°WqxW||S(Nii((RRtn2((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pytgcdRSB25s*        cCs³||jo||}}nxŽ|djo€d||d>}}}x,||jo|d7}|}|dK}qIWt||||ƒ}||jo||}}q!q!W|S(Nii(tmin(RRRtnBTtnBT1((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pytgcdLSBFs     cCs³||jo||}}nxŽ|djo€d||d}}}x,||jo|d7}|}|d9}qIWt||||ƒ}||jo||}}q!q!W|S(Niii(R (RRRR R ((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pytgcdLSB2Ts     tEtCtNtRtLtntrtlcCsŒt|tƒo!|oti|dtƒ}n|pdSn|d|d}}x0|o(|d|d}}|||ƒ}qXW|S(Nii(t isinstancetstrtdfGcdtgetR(tfGcdtlntnResultR((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pytgcdlistmsiÿÿÿÿ(t commanderNtCmdGcdcBs6eZd„Zd„Zd„Zddd„ƒYZRS(cCs*d||_d|_ti||ƒdS(Ns­python %%prog n1 n2 ... Write the %s of the arguments to standard output. "No bitshift" use multiplication, division and modulo by 2 instead of bit shift and test.s%prog 2008.08.05.0(tsUsagetsVersionR t__init__(tselftlsLinetsName((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pyR$~s  cCs°d}d|_|iiddddddd d d |d d dd|ƒ|iidddddddƒ|iidddddddddƒ|iidddddddddƒ|iiddddddd ddƒ|iiddddddddd ƒ|iid!dddddd"dd#ƒ|iid$dddddd%dd&ƒ|iid'dddddd(dd)ƒ|iid*dddddd+dd,ƒd-S(.s8populate the option parser (self.optParser) with optionsiRs-vs --verbosetactiontstoretdesttnVerbosettypetinttdefaulttmetavarRthelps#set the verbosity to N (default %d)s-it store_truetisStdInsget further input from stdins-Et store_consttsAlgtconsts use Euclid's algorithm (default)s-CRs use Euclid's recursive algorithms-Ns4use Euclid's algorithm, allowing negative remainderss-nRsAuse Euclid's algorithm, allowing negative remainders, no bitshifts-RRs$use the Right shift binary algorithms-rRs1use the Right shift binary algorithm, no bitshifts-LRs#use the Left shift binary algorithms-lRs0use the Left shift binary algorithm, no bitshiftN(tsAlgDeft optParsert add_option(R%tnVerbDef((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pytoptions‡s@  cCsÝ|i|ii||iƒ}d}x¬|i|i|iiƒD]}d|iijo(d||iip|i||fGny|t|ƒ|ƒ}Wnt j o qAnXd|iijo |GHqAqAW|GHdS(Niis%s%s(%s, %d) =i( RtoptR4R6t CommanderArgstlsArgsR2R+R-t ValueError(R%tdftsAbbrtfRts((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pytmain·s( R<cBs#eZd„Zd„Zd„ZRS(cCs||_||_dS(N(tlsR2(R%RDR2((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pyR$Ås cCs|S(N((R%((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pyt__iter__ÉscCsj|io&|id|id}|_|Sn7|io&tiiƒiƒ|_|iƒSnt‚dS(Nii(RDR2tsyststdintnexttsplitt StopIteration(R%RB((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pyRHËs  (t__name__t __module__R$RERH(((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pyR<Ãs  ((RKRLR$R:RCR<(((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pyR!zs 0 t__main__sgreatest common divisorR(t__doc__RRRRRR RRRRtcommander.commanderR RFR!RKtargvRC(((sp/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/mathlib/gcd.pys s.                  [