src/mongo/shell/utils.js
// Generate a random value from the exponential distribution with the specified mean.
Generate a random value from the exponential distribution with the specified mean.
Generate a random value from the exponential distribution with the specified mean .
function genExp(mean) {
        if (!initialized) {
            throw new Error(errorMsg);
        }
        var r = rand();
        if (r == 0) {
            r = rand();
            if (r == 0) {
                r = 0.000001;
            }
        }
        return -Math.log(r) * mean;
    }
function genExp ( mean ) { if ( ! initialized ) { throw new Error ( errorMsg ) ; } var r = rand ( ) ; if ( r == 0 ) { r = rand ( ) ; if ( r == 0 ) { r = 0.000001 ; } } return - Math . log ( r ) * mean ; }
Generate a random value from the exponential distribution with the specified mean.
Generate a random value from the exponential distribution with the specified mean .