This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] PATCH -- Fix segfault in RANDOM_SEED.


Steve Kargl wrote:
I really don't understand your random_generate() function, so
I'm of limited help here. I wrote an equipartition test for
PRNG and tested your MT. If I seed the array with


seed(1:624) = (/ (i,i=1,624) /) or 10 * (/ (i,i=1,624) /)

I have to burn 100000 random number before I start to get
"good" random numbers with respect to a chi square test.


Sorry for chiming in late on the discussion, I was out of town, and I'll be brief as I have little time right now.


I'm wondering if this can't be helped by XOR'ing the seed the users passes against some value, so that you still get a deterministic set of random numbers without having to throw away the first, even if you choose to seed the RNG as simply as Steve tried above. I guess Steve's problem is tied to having very few bits set in his seed, this could be cured this way.

Seems like an easier fix than writing a whole new RNG.

- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]