function factory( mu, sigma ) {
	var denom;
	if (
		isnan( mu ) ||
		isnan( sigma ) ||
		sigma < 0.0
	) {
		return constantFunction( NaN );
	}
	if ( sigma === 0.0 ) {
		return degenerate( mu );
	}
	denom = sigma * sqrt( 2.0 );
	return cdf;

	/**
	* Evaluates the cumulative distribution function (CDF) for a Normal distribution.
	*
	* @private
	* @param {number} x - input value
	* @returns {Probability} evaluated CDF
	*
	* @example
	* var y = cdf( 2.0 );
	* // returns <number>
	*/
	function cdf( x ) {
		var xc;
		if ( isnan( x ) ) {
			return NaN;
		}
		xc = x - mu;
		return 0.5 * erfc( -xc / denom );
	}
}
Returns a function for evaluating the cumulative distribution function (CDF) for a Normal distribution.

@param {number} mu - mean
@param {NonNegativeNumber} sigma - standard deviation
@returns {Function} function to evaluate the cumulative distribution function

@example
var cdf = factory( 10.0, 2.0 );
var y = cdf( 10.0 );
// returns 0.5

y = cdf( 12.0 );
// returns ~0.841