Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function getUniformRandomNumber() {
return Math.random();
// Rate is the rate parameter of the exponential
// distribution. Typically denoted by lambda.
function getExponentialRandomNumber(rate) {
return Math.log(1 - Math.random()) / (−rate);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.