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

	/**
	* Evaluates the probability density function (PDF) for a Gumbel distribution.
	*
	* @private
	* @param {number} x - input value
	* @returns {number} evaluated PDF
	*
	* @example
	* var y = pdf( 2.3 );
	* // returns <number>
	*/
	function pdf( x ) {
		var z;
		if ( isnan( x ) ) {
			return NaN;
		}
		if ( x === NINF ) {
			return 0.0;
		}
		z = ( x - mu ) / beta;
		return ( 1.0 / beta ) * exp( -z - exp( -z ) );
	}
}
Returns a function for evaluating the probability density function (PDF) for a Gumbel distribution with location parameter `mu` and scale parameter `beta`.

@param {number} mu - location parameter
@param {PositiveNumber} beta - scale parameter
@returns {Function} PDF

@example
var pdf = factory( 4.0, 2.0 );

var y = pdf( 10.0 );
// returns ~0.0237

y = pdf( 3.0 );
// returns ~0.159