function median( n, p ) {
	if (
		isnan( n ) ||
		isnan( p ) ||
		p < 0.0 ||
		p > 1.0 ||
		!isNonNegativeInteger( n ) ||
		n === PINF
	) {
		return NaN;
	}
	return round( mean( n, p ) );
}
Returns the median of a binomial distribution.

@param {NonNegativeInteger} n - number of trials
@param {Probability} p - success probability
@returns {NonNegativeInteger} median

@example
var v = median( 100, 0.1 );
// returns 10

@example
var v = median( 20, 0.5 );
// returns 10

@example
var v = median( 10.3, 0.5 );
// returns NaN

@example
var v = median( 20, 1.1 );
// returns NaN

@example
var v = median( 20, NaN );
// returns NaN