int function ( int arg0 , int arg1 ) { if ( arg0 < 0 ) arg0 = - 1 * arg0 ; if ( arg1 < 0 ) arg1 = - 1 * arg1 ; while ( arg1 != 0 ) { int loc0 = arg1 ; arg1 = arg0 % arg1 ; arg0 = loc0 ; } return arg0 ; }
implements euclid 's algorithm to find the greatest common divisor or any two integers . concode_field_sep int p concode_elem_sep Rational ONE concode_elem_sep int q concode_elem_sep Rational ZERO concode_elem_sep Rational MINUS_ONE concode_field_sep boolean isSmallerThan concode_elem_sep boolean isOne concode_elem_sep boolean isNegative concode_elem_sep Rational inverse concode_elem_sep Rational minus concode_elem_sep Rational negation concode_elem_sep Rational one concode_elem_sep boolean isPositive concode_elem_sep int getP concode_elem_sep int getQ concode_elem_sep Rational plus concode_elem_sep Rational zero concode_elem_sep Rational div concode_elem_sep Rational times concode_elem_sep Rational times concode_elem_sep Rational abs concode_elem_sep int hashCode concode_elem_sep boolean equals concode_elem_sep boolean isZero concode_elem_sep String toString concode_elem_sep Rational minusOne