11#define RNG(L,H) (((L)>(H)) ? RNG_BASE((H),(L)) : RNG_BASE((L),(H)))
17#define RNG_BASE(L,H) ((int)L + (int)((double)(H-L+1) * randfp()))
21#define RNGF() (randfp())
27#define RNG_1SIGMA() NormalInverse(0.158655255 + RNGF()*(1.-0.158655255*2.))
33#define RNG_2SIGMA() NormalInverse(0.022750132 + RNGF()*(1.-0.022750132*2.))
39#define RNG_3SIGMA() NormalInverse(0.0013498985 + RNGF()*(1.-0.0013498985*2.))
double Normal(double x)
Calculates the Normal distribution.
double randfp(void)
Gets a random float between 0 and 1 (inclusive).
double NormalInverse(double p)
Calculates the inverse of the normal.
void rng_init(void)
Initializes the random subsystem.
unsigned int randint(void)
Gets a random integer.