ziggurat, a C code which generates random variates from the uniform, normal or exponential distributions, by Marsaglia and Tsang.
The uniform numbers are generated directly. The ziggurat method is used to compute the normal and exponential values.
In the inline version, the underlying generators are implemented "inline", invoking a function call only in exceptional cases. This results in very fast execution.
In this implementation, the advantages of inline code are not used. All the routines and inline functions are isolated in a separate file, so that a user invokes them through the familiar library interface.
The computer code and data files described and made available on this web page are distributed under the MIT license
ziggurat is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.
normal, a C code which computes elements of a sequence of pseudorandom normally distributed values.
rbox, a C code which generates a set of points in a region, selected at random according to a given distribution.
RNGLIB, a C code which implements a random number generator (RNG) with splitting facilities, allowing multiple independent streams to be computed, by L'Ecuyer and Cote.
UNIFORM, a C code which computes elements of uniform pseudorandom sequence.
VAN_DER_CORPUT, a C code which computes elements of a 1D van der Corput Quasi Monte Carlo (QMC) sequence using a simple interface.
ziggurat_inline, a C code which generates variates from the uniform, normal or exponential distributions, using an inline random number generator for very fast execution, by Marsaglia and Tsang.
ziggurat_openmp, a C code which demonstrates how the ziggurat() library can be used to generate random numbers in an OpenMP parallel program.
George Marsaglia, Wai Wan Tsang.