This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
bug in taus2 random generator
- From: Jerome Houdayer <houdayer at spht dot saclay dot cea dot fr>
- To: gsl-discuss at sources dot redhat dot com
- Date: Mon, 25 Nov 2002 19:02:13 +0100 (MET)
- Subject: bug in taus2 random generator
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
Best regards,
J. Houdayer