This is the mail archive of the
gsl-discuss@sourceware.org
mailing list for the GSL project.
Re: rng question
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: Jari Häkkinen <jari at chiralcomp dot com>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Wed, 7 Dec 2005 20:07:24 +0000
- Subject: Re: rng question
- References: <4396B8AF.7040300@chiralcomp.com>
Jari Häkkinen writes:
> 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).
Doesn't it give an exception? (due to division by zero in the expression scale = range / n;)
What platform are you using?
--
Brian Gough
Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/