Function cmb_random_exponential
Defined in File cmb_random.h
Function Documentation
-
static inline double cmb_random_exponential(const double mean)
Exponential distribution on
[0, oo)with meanm, wherem > 0. Corresponds to a rater = 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