Function cmb_random_exponential

Function Documentation

static inline double cmb_random_exponential(const double mean)

Exponential distribution on [0, oo) with mean m, where m > 0. Corresponds to a rate r = 1/m (but avoids a division in each call).

Used for modeling time intervals between successive events, such as customer inter-arrival times, service times, times to fail or repair, state transition times in Markov chains.

Uses an implementation of McFarland’s improved ziggurat method.

See also https://en.wikipedia.org/wiki/Exponential_distribution