rnglib, a Python code which implements random number generators (RNG) which can generate one or more streams of random numbers.

RNGLIB is a portable set of software tools for uniform random variate generation. It provides for multiple generators running simultaneously, and each generator has its sequence of numbers partitioned into many long disjoint substreams. Simple procedure calls allow the user to make any generator jump ahead to the beginning of its next substream.


The computer code and data files described and made available on this web page are distributed under the MIT license


rnglib is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.

Related Data and Programs:

normal, a Python code which contains random number generators (RNG's) for normally distributed values.

pdflib, a Python code which evaluates Probability Density Functions (PDF's) and produces random samples from them, including beta, binomial, chi, exponential, gamma, inverse chi, inverse gamma, multinomial, normal, scaled inverse chi, and uniform.

randlc, a Python code which implements a random number generator (RNG) used by the NAS Benchmark programs.

sobol, a Python code which computes elements of a Sobol quasirandom sequence.

uniform, a Python code which implements random number generators (RNG's) for a variety of arithmetic types.

van_der_corput, a Python code which computes elements of a 1D van der Corput Quasi Monte Carlo (QMC) sequence using a simple interface.


  1. Pierre LEcuyer, Serge Cote,
    Implementing a Random Number Package with Splitting Facilities,
    ACM Transactions on Mathematical Software,
    Volume 17, Number 1, March 1991, pages 98-111.

Source Code:

Last revised on 27 May 2013.