This is the mail archive of the mailing list for the GCC 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 for PR 15619

On Sat, May 29, 2004 at 01:20:49PM +0100, Paul Brook wrote:
> On Saturday 29 May 2004 13:15, Paul Brook wrote:
> > > Sigh.  I really didn't want to become an expert on PRNG.  I only
> > > want to use them. :-)  So, here's my current solution.
> >
> > In leu of  approach, However:
> What I meant to say before I hit send was
> Unless someone who does have a good knowledge of PRNG has other ideas 
> (preferably also patches), this seems a good approach.

KISS passes all of the DIEHARD tests for randomness.  Also,
at the URL I put in random.c, Marsaglia suggests that MT may
use a questionable method:

   in response to various queries: the Mersenne
   Twister looks good, but it seems to be essentially
   a lagged Fibonacci RNG using the exclusive-or
   (xor) operation, and experience has shown that
   lagged Fibonacci generators using xor provide
   unsatisfactory 'randomness' unless the lags are
   very long, and even for those with very long lags,
   (and even for those using + or - rather than xor),
   many people (I among them) are inclined to be
   cautious about sequences based on such a simple
   operation as: each new integer is the xor, (or sum,
   or difference), of two earlier ones.  To be sure,
   the resulting integers can be "twisted", but not,
   I think, as simply or as safely as combining, say
   by addition, with members of a sequence from a
   (shorter period) generator that has itself passed
   extensive tests of randomness.


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