function factory( k ) {
	var gamma;
	if ( k === 0.0 ) {
		return degenerate( 0.0 );
	}
	gamma = gammaFactory( k/2.0, 0.5 );
	return cdf;

	/**
	* Evaluates the cumulative distribution function (CDF) for a chi distribution with degrees of freedom `k`.
	*
	* @private
	* @param {number} x - input value
	* @returns {Probability} evaluated CDF
	*/
	function cdf( x ) {
		if ( isnan( x ) ) {
			return NaN;
		}
		if ( x < 0.0 ) {
			return 0.0;
		}
		return gamma( x*x );
	}
}
Returns a function for evaluating the cumulative distribution function (CDF) for a chi distribution with degrees of freedom `k`.

@param {NonNegativeNumber} k - degrees of freedom
@returns {Function} CDF

@example
var cdf = factory( 3.0 );

var y = cdf( 6.0 );
// returns ~1.0

y = cdf( 1.5 );
// returns ~0.478