This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Random Number Questions


Rodney Sparapani writes:
 > gsl-discuss:
 >  First, there seems to be a problem in the Random Number docs.  For
 > example, in The Gaussian Dist.  I believe that
 > gsl_ran_gaussian_ratio_method should be random and
 > gsl_ran_ugaussian_pdf should be function.  There seem to be many
 > instances where function and random are reversed.

Thanks.  I can see some.

 > In addition, the gaussian functions take the standard deviation
 > rather than the variance.  I find this contrary to common practice.
 > I'd suggest that new functions be added to use the variance (maybe
 > these could be provided by the pre-processor).
 >  Also, it is
 > generally more convenient to work with the logarithm of the pdf.
 > Could functions like the following be entertained?
 >  double gsl_ran_gaussian_log_pdf (const double x, const double
 > variance) {
 >   double p = -0.5 * (log (2 * M_PI * variance) + (x * x) /
 >   variance); return p;
 > }

I think the current arrangement is acceptable for most users,
especially for pdfs which return zero.

If you'd like to write and distribute a file with alternate
definitions I'm sure we could link to it from the gsl page. People
could drop it into their own source if they needed it.

Brian



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]