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

	/**
	* Evaluates the probability density function (PDF) for a gamma distribution.
	*
	* @private
	* @param {number} x - input value
	* @returns {number} evaluated PDF
	*
	* @example
	* var y = pdf( -1.2 );
	* // returns <number>
	*/
	function pdf( x ) {
		if ( isnan( x ) ) {
			return NaN;
		}
		if ( x < 0.0 || x === PINF ) {
			return 0.0;
		}
		return gammaDeriv( alpha, x * beta ) * beta;
	}
}
Returns a function for evaluating the probability density function (PDF) for a gamma distribution with shape parameter `alpha` and rate parameter `beta`.

@param {NonNegativeNumber} alpha - shape parameter
@param {PositiveNumber} beta - rate parameter
@returns {Function} PDF

@example
var pdf = factory( 3.0, 1.5 );

var y = pdf( 1.0 );
// returns ~0.377

y = pdf( 4.0 );
// returns ~0.067