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: bug in taus2 random generator


Jerome Houdayer writes:
 > Hi,
 >  As I was trying to understand what the taus random generator does,
 > I found what I think is a bug in gsl version 1.2 .
 >  In file rng/taus.c, function taus2_set, line 144:
 >   if (state->s3 < 8) state->s3 += 16UL
 >  should read
 >   if (state->s3 < 16) state->s3 += 16UL;
 >  The point is the following: if 'state->s3' is once smaller than 16
 > (and not 8) it will become 0 and stays 0 forever as the random
 > generator is used (line 96).  Moreover this would make the line
 > consistent with line 140 and 142 and with lines 111 - 122 of file
 > taus113.c

Thanks for the bug report. 
Now fixed in CVS.
best regards,

-- 
Brian Gough


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