new randist/binomial.c
Brian Gough
bjg@network-theory.co.uk
Sun May 11 18:06:00 GMT 2003
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
More information about the Gsl-discuss
mailing list