From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15317 invoked by alias); 7 Dec 2005 10:25:59 -0000 Received: (qmail 15309 invoked by uid 22791); 7 Dec 2005 10:25:59 -0000 X-Spam-Check-By: sourceware.org Received: from perth.hipertp.net (HELO isi.ch) (212.126.160.188) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 07 Dec 2005 10:25:57 +0000 Received: from [10.255.4.93] (unverified [212.126.160.3]) by isi.ch (SurgeMail 3.5b3) with ESMTP id 132806 for ; Wed, 07 Dec 2005 11:13:49 +0100 Message-ID: <4396B8AF.7040300@chiralcomp.com> Date: Wed, 07 Dec 2005 10:25:00 -0000 From: =?ISO-8859-1?Q?Jari_H=E4kkinen?= User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) MIME-Version: 1.0 To: gsl-discuss@sources.redhat.com Subject: rng question Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Server: High Performance Mail Server - http://surgemail.com r=-645419404 Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2005-q4/txt/msg00015.txt.bz2 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