This is the mail archive of the
gsl-discuss@sourceware.org
mailing list for the GSL project.
rng question
- From: Jari Häkkinen <jari at chiralcomp dot com>
- To: gsl-discuss at sources dot redhat dot com
- Date: Wed, 07 Dec 2005 11:25:51 +0100
- Subject: rng question
Hi all,
I have question about the random number generator features and
documentation.
According to the documentation gsl_rng_max(rng_ returns the maximum
random number the underlying rng can give, and
gsl_rng_uniform_int(rng,gsl_rng_max(rng)) will return
[0,gsl_rng_max(rng)-1]. This will not give the maximum number from the
underlying generator, so I tried
gsl_rng_uniform_int(rng,gsl_rng_max(rng)+1) but this call does not
return (since the second argument becomes 0).
Shouldn't this case be covered by GSL? Either by returning a error code
or maybe setting the upper bound to gsl_rng_max(rng) when a 0 second
argumnet is given? At least, I think this case should be covered in the
documentation.
Cheers,
Jari