function factory( alpha, beta ) {
	if (
		isnan( alpha ) ||
		isnan( beta ) ||
		alpha <= 0.0 ||
		beta <= 0.0
	) {
		return constantFunction( NaN );
	}
	return quantile;

	/**
	* Evaluates the quantile function for a beta prime distribution.
	*
	* @private
	* @param {Probability} p - input value
	* @returns {number} evaluated quantile function
	*
	* @example
	* var y = quantile( 0.3 );
	* // returns <number>
	*/
	function quantile( p ) {
		var x;
		if (
			isnan( p ) ||
			p < 0.0 ||
			p > 1.0
		) {
			return NaN;
		}
		x = betaincinv( p, alpha, beta );
		return x / ( 1.0-x );
	}
}
Returns a function for evaluating the quantile function for a beta prime distribution with first shape parameter `alpha` and second shape parameter `beta`.

@param {PositiveNumber} alpha - first shape parameter
@param {PositiveNumber} beta - second shape parameter
@returns {Function} quantile function

@example
var quantile = factory( 2.5, 0.5 );
var y = quantile( 0.5 );
// returns ~9.468

y = quantile( 0.8 );
// returns ~70.042