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: sf_gamma questions


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


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