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

Home » Public Forums » archive » RANDOMU bug?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
RANDOMU bug? [message #3378] Fri, 13 January 1995 18:47
meinel is currently offline  meinel
Messages: 14
Registered: February 1994
Junior Member
I am using IDL 3.6 on a Macintosh, and RANDOMU exhibits some strange
behavior. Try this...

IDL> randu = randomu(seed)
IDL> print, randu, seed

Repeat these two commands several times. An example of the results I got:

0.741767 1592932020
0.874194 1877316638
0.573226 1230993142
0.206885 444282396
0.118087 253588953

Seems OK so far. Now try it as a procedure...

pro test
; Test random numbers
randu = random(seed)
print, randu, seed
end

Compile and run test.pro several times.

0.0553956 118961080
0.0555286 119246799
0.0556225 119448483
0.0556773 119566132

Definitely _not_ random. So what is going on? Inquiring minds want to
know.

Ed
meinel@aero.org
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Color Postscript output
Next Topic: Re: RANDOMU bug?

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

Current Time: Wed Oct 08 17:09:48 PDT 2025

Total time taken to generate the page: 0.00481 seconds