Function cmb_random_normal

Function Documentation

static inline double cmb_random_normal(const double mu, const double sigma)

Normal distribution on (-oo, oo) with mean mu and standard deviation sigma where sigma > 0.

Often used to model measurement errors or process variation. It tends to appear whenever the variation is caused by a sum (or average) of many small effects, according to the Central Limit Theorem.

Uses an implementation of McFarland’s improved ziggurat method.

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