This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: new randist/binomial.c
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: James Theiler <jt at lanl dot gov>
- Cc: gsl-discuss <gsl-discuss at sources dot redhat dot com>
- Date: Sun, 11 May 2003 19:06:35 +0100
- Subject: Re: new randist/binomial.c
- References: <Pine.LNX.4.33.0305090123390.6504-201000@yks.lanl.gov>
James Theiler writes:
> Hello,
> Awhile back I wrote about how much slower the GSL binomial random
> variates were than competing algorithms -- thanks again to John
> Pearson for first pointing this out to me.
> I have attached new code for binomial variates which incorporates a
> state of the art algorithm
Thanks. I'm looking at integrating it.
> 3. I have added a new function gsl_ran_binomial_cdf(), which is the
> cumulative distribution function (akin to the pdf). I think we should
> begin filling out the cdf's for all our nonuniform variates.
There are some cdfs in cvs on savannah.gnu.org (none for the
discrete distributions though).
> 4. Just a quick note, I got a substantial performance gain using
> gsl_sf_pow_int() in place of pow(), even for very large powers. GSL
> developers might keep that in mind when performing x^n type
> computations. By the way, I noticed GSL also has a gsl_pow_int()
> with essentially the same implementation in the sys/pow_int.c file;
> which is preferred?
gsl_pow_int is preferred. It's part of gsl_pow_int.h (which is
#included by gsl_math.h).
Brian