A Comment on the Random Number Generator

We provide a random number generator (RNG) with this package, which produces single precision real numbers x with x $ \in$ ]0, 1[. It resides in src/f90/mod/ran_tools_dist.f90.

It is based on methods by Marsaglia (cf. http://www.cs.hku.hk/) and combines two pseudo-random numbers from simple 32 bit RNGs into one by addition modulo 230. The two simple RNGs are a 2*16 bit multiply-with-carry RNG and a Marsaglia shift register. Please note that we have not extensively tested this generator -- it did not represent the main drive of this project.

From theoretical expectations this RNG should provide at least as good performance as the $1000 guaranteed Numerical Recipes ``ran2'', but we are not willing to enter any bets. Its calling interface is identical to ``ran2'' and it should therefore be trivial to replace it with the RNG of your choice.

Eric Hivon 2003-02-07