function factory( alpha, beta ) {
	var logpdf;
	if (
		isnan( alpha ) ||
		isnan( beta ) ||
		alpha <= 0.0 ||
		beta <= 0.0
	) {
		return constantFunction( NaN );
	}
	logpdf = logpdfFactory( alpha, beta );
	return pdf;

	/**
	* Evaluates the probability density function (PDF) for a beta prime distribution.
	*
	* @private
	* @param {number} x - input value
	* @returns {number} evaluated PDF
	*
	* @example
	* var y = pdf( 0.3 );
	* // returns <number>
	*/
	function pdf( x ) {
		if ( isnan( x ) ) {
			return NaN;
		}
		return exp( logpdf( x ) );
	}
}
Returns a function for evaluating the probability density function (PDF) 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} PDF

@example
var pdf = factory( 0.5, 0.5 );

var y = pdf( 0.8 );
// returns ~0.198

y = pdf( 0.3 );
// returns ~0.447