- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does anybody have an idea as to the best method of picking a random seed so I get different random numbers each time --
TYPE (VSL_STREAM_STATE) :: stream
n=1000000
nn=10
brng=VSL_BRNG_MCG31
method=VSL_RNG_METHOD_GAUSSIAN_ICDF
seed=777
a=0.0
sigma=1.0
! ***** Initialize *****
errcode=vslnewstream( stream, brng, seed )
call CheckVslError(errcode)
! ***** Call RNG *****
errcode=vdrnggaussian( method, stream, n, r, a, sigma)
call CheckVslError(errcode)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: This is not random from the program -- it has strong patterns - visible by eye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi John,
Could you please clarify the problem a little bit – am I right that you don’t like a statistics of random numbers produced by MCG31M1 basic random number generator?
Actually this generator is one of the generators of the linear-congruential family that have quite simple algorithm of the state adjustment.
I can recommend to use modern generators form the Mersenne Twister family: MT19937/MT2203 or from the counter-based family: PHILOX4X32X10 / ARS5.
Best regards,
Pavel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok, we will ask RNG owners to look at this case and they will help to recognize the problem.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page