This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: bug in taus2 random generator
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: Jerome Houdayer <houdayer at spht dot saclay dot cea dot fr>
- Cc: gsl-discuss at sources dot redhat dot com, bug-gsl at gnu dot org
- Date: Mon, 25 Nov 2002 19:32:04 +0000 (GMT)
- Subject: Re: bug in taus2 random generator
- References: <Pine.GSO.4.43.0211251846510.11175-100000@wasa>
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