function exponentRandom(mo) { var rnd; do { rnd = Math.random(); } while (rnd == 0); return -mo * Math.log(rnd); }