NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links

A Comment on the Random Number Generator

We provide a new random number generator (RNG) with this package, available both in Fortran90 and C++. It resides in src/f90/mod/rngmod.f90 and src/cxx/cxxsupport/planck_rng.h and supersedes the previous RNG (which is still available at src/f90/mod/ran_tools_dist.f90).

It produces double precision real numbers x with $x\in]0,1[$ and is based on a xorshift method described by Marsaglia in Journal of Statistical Software 2003, vol 8 (cf. It accepts up to four different seeds simultaneously, allowing each sequence to have a theoretical period of $2^{128}-1 \approx 3.4 10^{38}$. A Gaussian deviate RNG is also provided. See the respective routines documentation for details on their usage. Please note that we have not extensively tested this generator -- it did not represent the main drive of this project.

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:

CL 03-2650