This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL 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: a (non-critical) flaw in taus RNG


Atakan Gurkan writes:
 > In his paper "Tables of Maximally-Equidistributed Combined LFSR Generators", 
 > Mathematics of Computation, 68, 225 (1999), 261--269:
 > http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme2.ps
 > Pierre L'Ecuyer says:
 > 	In other words, the k_j most significant bits of z_j must be non-
 > 	zero, for each j. (Note: this restriction also applies to the 
 > 	computer code given in [4], but was mistakenly not mentioned in
 > 	that paper.)

Thanks for that information.  I will note it in the manual.  Since the
taus generator is in the stable version of the library I won't change
it but will provide an alternate version with an improved seeding
procedure (taus2).

 > [4] is the source of the algorithm used in taus.c in GSL, for certain initial
 > seeds the quoted condition will not be satisfied, due to the method of choosing
 > s_n from s_{n+1} in taus.c
 > Solutions that come to my mind are:
 > -- checking if s1, s2, s3 are below 2, 8, 16 respectively and add a fixed
 > number, this will probably have a speed impact.

The paper mentions s1 > 1, s2 > 7, s3 > 15, s4 > 127 as opposed to 2,
8, 16 -- which is correct?  I will make repeated calls to the seeding
generator until the constraint is satisfied.  For the seeding the cost
is not a significant issue.

 > On another note, this second paper includes tables for RNG with longer 
 > periods and RNGs for 64bit architecture. I would be writing routines
 > implementing them and wouldn't mind making them a part of GSL. However, I
 > would need someone to take a look at the code to make sure it complies with 
 > GSL coding style etc. How does this work? Do I write them and make them 
 > available under GPL and somebody else integrates them to GSL or can I make
 > this integration myself?

Thanks.  If you post a link to the code on this list then Carlo and I
can take a look at it.

If you begin by writing and distributing the generators independently
(using the GSL API) they can be dropped into GSL when they are stable
and fully tested.

Brian 


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