help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: [Help-gsl] random number distributions


From: John Gehman
Subject: Fwd: [Help-gsl] random number distributions
Date: Thu, 18 May 2006 22:13:45 +1000

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 <address@hidden>
Date: 18 May 2006 9:44:28 PM
To: address@hidden
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
address@hidden <mailto:address@hidden>

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
//

Attachment: eric.germaneau.vcf
Description: Text Data

_______________________________________________
Help-gsl mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-gsl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]