function cdf( x, lambda ) {
	if (
		isnan( lambda ) ||
		lambda < 0.0 ||
		lambda === PINF
	) {
		return NaN;
	}
	if ( x < 0.0 ) {
		return 0.0;
	}
	return 1.0 - exp( -lambda * x );
}
Evaluates the cumulative distribution function (CDF) for an exponential distribution with rate parameter `lambda` at a value `x`.

@param {number} x - input value
@param {PositiveNumber} lambda - rate parameter
@returns {Probability} evaluated CDF

@example
var y = cdf( 2.0, 0.1 );
// returns ~0.181

@example
var y = cdf( 1.0, 2.0 );
// returns ~0.865

@example
var y = cdf( -1.0, 4.0 );
// returns 0.0

@example
var y = cdf( NaN, 1.0 );
// returns NaN

@example
var y = cdf( 0.0, NaN );
// returns NaN

@example
// Negative rate parameter:
var y = cdf( 2.0, -1.0 );
// returns NaN