next up previous contents
Next: where k=1.07374182E+09 and idint Up: Generation of Random Numbers Previous: These two integers are   Contents

Unra generator in CECILE

Unra is a uniform random number generator based on theory and suggestions given in d.e. Knuth (1969), vol 2. The integer iy (seed) should be initialized to an arbitrary integer prior to the first call to urand. The calling program should not alter the value of iy between subsequent calls to unra.Values of unra are returned in the interval (0,1). The recursive algorithm of unra is

ia=8*idint(k*datan(1)/8)+5

ic=2*idint(k*(0.5-\( \sqrt{3} \)/6))+1

iy=2*(ia*iy+ic)/k



Subsections

Amaury LATAILLADE 2002-11-04