This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
bug in specfunc/gamma_inc.c
- From: Jason Hooper Stover <jason at sakla dot net>
- To: gsl-discuss at sources dot redhat dot com
- Date: Wed, 8 Oct 2003 20:40:59 -0400
- Subject: bug in specfunc/gamma_inc.c
I think there is a bug in gamma_inc.c:gamma_inc_Q_CF().
gsl_sf_gamma_inc_Q (185.0, 200.0) gives the value 0.13594954199834325,
whereas a gp script gives 0.13594954213327904. The disparity
between gsl and gp grows as the second argument increases. (I guess
gp could be wrong, but since it has almost-arbitrary precision, I figured
it's correct.)
The function gamma_inc_Q_CF(a,x) was the subject of a previous bug report.
This function replaced an older function that was said to be unstable
for some regions in the plane.
The problem arises within the region 0.3*a<x<2.3*a, a>10.
This is the region for which N.M. Temme proposed another algorithm in
"On the computation of the incomplete gamma functions for large values
of the parameters", Algorithms for Approximation, J.C. Mason and M.G.
Cox, eds. The Institute for Mathematics and Its Applications Conference
Series no. 10. 1987.
This algorithm might give a better approximation in this region than the
function gamma_inc_Q_CF().
-Jason