function sample( rand, n, p ) {
	if ( p > 0.5 ) {
		return n - sample( rand, n, 1.0-p );
	}
	if ( n*p < 10.0 ) {
		return sample1( rand, n, p );
	}
	return sample2( rand, n, p );
}
Returns a pseudorandom number drawn from a binomial distribution.

@private
@param {PRNG} rand - PRNG for uniformly distributed numbers
@param {PositiveInteger} n - number of trials
@param {Probability} p - probability of success
@returns {NonNegativeInteger} pseudorandom number