Period of RANDOMU generated random numbers?? [message #92839] |
Thu, 10 March 2016 01:07 |
pasi.hakala
Messages: 1 Registered: March 2016
|
Junior Member |
|
|
Dear All,
I have recently encounter some weird behaviour with RANDOMU (IDL 7.1,
OSX 10.6 and 10.10). It seems like the random numbers generated by it
have a reoccurence period of 2148*1000000 i.e. 2.148e9! OR, can someone
otherwise explain this? Consider a simple piece of code (started freshly
immediatedly after entering IDL, so no messing with the seed) that creates random numbers from the exponential distribution in batches of 1000000:
nobs=10000l
nper=1000000l
pymax_sim=fltarr(nobs)
;
for i=0l,nobs-1 do begin
tmp=-alog(randomu(seed,nper))
pymax=max(tmp)
pymax_sim(i)=pymax
endfor
end
If I then have a look at the values of "pymax_sim" they appear to repeat
with the period of 2148*1000000! Any ideas? I have used IDL since 1988
and obviously have never encountered this before (well, luckiy I've never
had a need for such long random number sequences before).
Cheers, Pasi Hakala, Research Scientist, Tuorla Observatory, Finland
|
|
|