function gcd( a, b ) {
	if ( isnan( a ) || isnan( b ) ) {
		return NaN;
	}
	if (
		a === PINF ||
		b === PINF ||
		a === NINF ||
		b === NINF
	) {
		return NaN;
	}
	if ( !( isInteger( a ) && isInteger( b ) ) ) {
		return NaN;
	}
	if ( a < 0 ) {
		a = -a;
	}
	if ( b < 0 ) {
		b = -b;
	}
	if ( a <= INT32_MAX && b <= INT32_MAX ) {
		return bitwise( a, b );
	}
	return largeIntegers( a, b );
}
Computes the greatest common divisor (gcd).

@param {integer} a - first number
@param {integer} b - second number
@returns {integer} greatest common divisor

@example
var v = gcd( 48, 18 );
// returns 6

@example
var v = gcd( 3.14, 18 );
// returns NaN

@example
var v = gcd( NaN, 18 );
// returns NaN