comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Period of RANDOMU generated random numbers??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Period of RANDOMU generated random numbers?? [message #92839] Thu, 10 March 2016 01:07
pasi.hakala is currently offline  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
[Message index]
 
Read Message
Previous Topic: Adding/Subtracting/Multiplying images together
Next Topic: Contouring Irregularly Sampled Data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:19:41 PDT 2025

Total time taken to generate the page: 0.00456 seconds