From: "Jari Häkkinen" <jari@chiralcomp.com>
To: gsl-discuss@sources.redhat.com
Subject: rng question
Date: Wed, 07 Dec 2005 10:25:00 -0000 [thread overview]
Message-ID: <4396B8AF.7040300@chiralcomp.com> (raw)
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
next reply other threads:[~2005-12-07 10:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-07 10:25 Jari Häkkinen [this message]
2005-12-07 20:07 ` Brian Gough
2005-12-09 13:49 ` Jari Häkkinen
2005-12-17 16:50 ` Brian Gough
2005-12-17 23:58 ` Jari Häkkinen
2008-08-03 23:32 RNG question Robert G. Brown
2008-08-05 9:05 ` Fabian Bastin
2008-08-08 11:12 ` Brian Gough
2008-08-08 12:33 ` Robert G. Brown
2008-08-11 20:47 ` Brian Gough
2008-08-18 21:12 ` Robert G. Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4396B8AF.7040300@chiralcomp.com \
--to=jari@chiralcomp.com \
--cc=gsl-discuss@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).