rng question

Brian Gough bjg@network-theory.co.uk
Wed Dec 7 20:07:00 GMT 2005


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/



More information about the Gsl-discuss mailing list