docs: function gamma( x ) {
  	var sign;
  	var q;
  	var p;
  	var z;
  	if (
  		(x%1 === 0 && x < 0) || // negative integer
  		x === NINF ||
  		x !== x // NaN
  	) {
  		return NaN;
  	}
  	if ( x === 0 ) {
  		// Check for negative zero...
  		if ( 1/x < 0 ) {
  			return NINF;
  		}
  		return PINF;
  	}
  	if (
  		x < -170.5674972726612 ||
  		x > 171.61447887182298
  	) {
  		return PINF;
  	}
  	q = abs( x );
  	if ( q > 33 ) {
  		if ( x >= 0 ) {
  			return stirlingApprox( x );
  		}
  		p = floor( q );
  
  		// Check whether `x` is even...
  		if ( (p&1) === 0 ) {
  			sign = -1;
  		} else {
  			sign = 1;
  		}
  		z = q - p;
  		if ( z > 0.5 ) {
  			p += 1;
  			z = q - p;
  		}
  		z = q * sin( PI * z );
  		return sign * PI / ( abs(z)*stirlingApprox(q) );
  	}
  	// Reduce `x`...
  	z = 1;
  	while ( x >= 3 ) {
  		x -= 1;
  		z *= x;
  	}
  	while ( x < 0 ) {
  		if ( x > -1e-9 ) {
  			return smallApprox( x, z );
  		}
  		z /= x;
  		x += 1;
  	}
  	while ( x < 2 ) {
  		if ( x < 1e-9 ) {
  			return smallApprox( x, z );
  		}
  		z /= x;
  		x += 1;
  	}
  	if ( x === 2 ) {
  		return z;
  	}
  	x -= 2;
  	return z * rateval( x );
  }