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

Home » Public Forums » archive » Re: random number trap
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: random number trap [message #4971] Mon, 04 September 1995 00:00 Go to previous message
sterner is currently offline  sterner
Messages: 106
Registered: February 1991
Senior Member
In article <DE33pI.G1D@hpl.hp.com>, peter@hpl.hp.com (Peter Webb) writes:
> So if you repeatedly call a procedure that
> calls randomu, the return will be the same if the calls occur within a
> second of each other, but will be different if they are in different
> seconds.
>
Maybe this has been answered already since I haven't been following
this newsgroup for a few days.

The way I solve this is to include a common unique to the routine
needing random numbers and store the random number seed in that
common. This is only needed if the routine is called multiple
times with more than one call per second. If you generate all the
needed random numbers in the same call this problem does not occur
(as you stated above).

Ray Sterner sterner@tesla.jhuapl.edu
The Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
WWW Home page: ftp://fermi.jhuapl.edu/www/s1r/people/res/res.html
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: MESSAGE question
Next Topic: DROPLIST bug ?

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

Current Time: Sat Oct 11 10:26:09 PDT 2025

Total time taken to generate the page: 1.84190 seconds