function sample( randu, randn, alpha, beta ) {
	var sigma;
	var flg;
	var mu;
	var A;
	var B;
	var C;
	var L;
	var s;
	var u;
	var x;
	var y;

	A = alpha - 1.0;
	B = beta - 1.0;
	C = A + B;
	L = C * ln( C );
	mu = A / C;
	sigma = 0.5 / pow( C, 0.5 );

	flg = true;
	while ( flg === true ) {
		s = randn();
		x = mu + (s*sigma);
		if ( x >= 0.0 && x <= 1.0 ) {
			u = randu();
			y = A * ln( x/A );
			y += B * ln((1.0-x) / B);
			y += L + (0.5*s*s);
			if ( y >= ln( u ) ) {
				flg = false;
			}
		}
	}
	return x;
}
Handles case where both `alpha` and `beta` are greater than `1.0`.

@private
@param {PRNG} randu - PRNG for uniformly distributed numbers
@param {PRNG} randn - PRNG for normally distributed numbers
@param {PositiveNumber} alpha - first shape parameter
@param {PositiveNumber} beta - second shape parameter
@returns {Probability} pseudorandom number