'use strict';

// FUNCTIONS //

var expm1 = Math.expm1 || function(x) {
	return Math.exp(x) - 1;
};
var pow = Math.pow;


// CDF //

/**
* FUNCTION: cdf( x, lambda, k )
*	Evaluates the cumulative distribution function (CDF) for a Weibull distribution with shape parameter `lambda` and scale parameter `k` at a value `x`.
*
* @param {Number} x - input value
* @param {Number} lambda - shape parameter
* @param {Number} k - scale parameter
* @returns {Number} evaluated CDF
*/
function cdf( x, lambda, k ) {
	if ( x < 0 ) {
		return 0;
	}
	return -expm1( - pow( x / lambda, k ) );
} // end FUNCTION cdf()


// EXPORTS //

module.exports = cdf;

@@ -51,52 +51,8 @@
 xpm1
- %7C%7C function(x) %7B%0A%09return Math.exp(x) - 1;%0A%7D
 ;%0Ava

Update number.js