SimulationCraft
SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm).
|
Random number generation. More...
Classes | |
struct | basic_rng_t |
Random number generator wrapper around an rng engine. More... | |
struct | rng_t |
struct | xorshift1024_t |
XORSHIFT-1024 Random Number Generator. More... | |
struct | xorshift128_t |
RNG Engines. More... | |
struct | xoshiro256plus_t |
xoshiro256+ Random Number Generator More... | |
Functions | |
double | stdnormal_cdf (double u) |
The standard normal CDF, for one random variable. More... | |
double | stdnormal_inv (double p) |
The inverse standard normal distribution. More... | |
Random number generation.
double rng::stdnormal_cdf | ( | double | u | ) |
The standard normal CDF, for one random variable.
Author: W. J. Cody URL: http://www.netlib.org/specfun/erf Source: http://home.online.no/~pjacklam/notes/invnorm/
This is the erfc() routine only, adapted by the transform stdnormal_cdf(u)=(erfc(-u/sqrt(2))/2;
double rng::stdnormal_inv | ( | double | p | ) |
The inverse standard normal distribution.
This is used to get the normal distribution inverse for our user-specifiable confidence levels. For example for the default 95% confidence level, this function will return the well known number of 1.96, so we know that 95% of the distribution is between -1.96 and +1.96 std deviations from the mean.
Author: Peter John Acklam pjack URL: lam@ onlin e.nohttp://home.online.no/~pjacklam Source: http://home.online.no/~pjacklam/notes/invnorm/
This function is based on the MATLAB code from the address above, translated to C, and adapted for our purposes.