It's not really a problem to set two different ones, but if you like
check out R.W. Hamming "Numerical Methods for Scientists and
Engineers", -- you can generate a gaussian random number by summing 12
uniform random numbers and subtract 6.0. There's a subtle caveat which
explains that this isn't perfect, but in most cases is actually closer
to what you want than a perfectly gaussian random number (i.e. do you
ever really want random number which has probability of 137*sigma, even
if strictly speaking it's bound to happen sooner or later in a true
gaussian distribution?)
Begin forwarded message:
From: Eric Germaneau <[EMAIL PROTECTED]>
Date: 18 May 2006 9:44:28 PM
To: [email protected]
Subject: [Help-gsl] random number distributions
Hello,
I wish to use _in same program_ a random number generator which
provides uniformly distributed random numbers _and_ a function which
returns a Gaussian random variate.
Theses functions requires two calls to a random number generator.
So, I'm wondering whether I have to set one or two random number
generator ?
Thanks in advance,
Regards,
Eric.
--
***********************************************************************
**************************
" Reason" in things existed before things themselves existed
and all the changes in things were governed by it.
Zhu Xi.
Eric Germaneau <http://lcr.epfl.ch/page37437.html>
<http://lcr.epfl.ch/page37437.html>
Assistant Doctorant
Ecole polytechnique fédérale de Lausanne (EPFL)
FSB - IPMC
Laboratoire de Cristallographie(LCr) <http://lcr.epfl.ch>
BSP 518
CH-1015 Lausanne
Switzerland
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Tel.: +41 (0)21 / 693 06 36
Fax.: +41 (0)21 / 693 05 04
//
P Please consider the environment before printing this email -
Considérez svp l'environnement avant d'imprimer ce courriel
//
begin:vcard
fn:Eric Germaneau
n:Germaneau;Eric
org:EPFL;Laboratoire de cristallographie
adr;quoted-printable:;;Ecole Polytechnique Fed=C3=A9rale de Lausanne;Lausanne;;CH-1015;Lausanne
email;internet:[EMAIL PROTECTED]
title:Mr
tel;work:0041216930636
note;quoted-printable:skype: aihaike=0D=0A=
msn: [EMAIL PROTECTED]
ICQ: 348917152=0D=0A=
yahoo: aihaike=0D=0A=
AIM: aihaike
url:http://lcr.epfl.ch
version:2.1
end:vcard
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl