sf_gamma questions

Brian Gough bjg@network-theory.co.uk
Wed Dec 19 13:20:00 GMT 2001


Jonathan Leto writes:
 > --- gamma.c.orig	Mon Dec  3 23:21:36 2001
 > +++ gamma.c	Mon Dec  3 23:53:27 2001
 > @@ -1247,7 +1247,14 @@
 >  int
 >  gsl_sf_gamma_e(const double x, gsl_sf_result * result)
 >  {
 > +  /* if x is an integer as far as we can tell, return factorial(x-1) 
 > +     this gives us much better precision when x>19 or so */
 > +  if(y < GSL_DBL_EPSILON ){
 > +	gsl_sf_fact_e((int) x - 1,result);

Thanks. I've added something along these lines but in the function
gamma_xgthalf, which is used in several places and so gives some other
opportunities to gain from a bit of extra accuracy.

Brian



More information about the Gsl-discuss mailing list