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] |
Hi! I have now patched the incomplete gamma function gamma_inc.c, using the modified version of Lentz' algorithm as given in Numerical Recipes. I have tested the results against Mathematica, using only such a,x pairs that the continued fraction expression was used. a and x were chosen randomly. Range of a max abs difference CPU time 20- 100 1.6e-14 ~45s 20- 10000 1.1e-11 ~90s 20- 1000000 5 e-04 ~270s For each of the three ranges, I generated 1 million a,x pairs; all computations were done on a PIII@866MHz. Difference is against numerical evaluation with Mathematica 4.0. For the range of up to 1e6, most errors were much smaller than the max error, typically less than 1e-10. A diff-file for patching gamma_inc.c against the version in gsl-1.0 is included. Hans
Attachment:
gamma_inc.c.diff
Description: Binary data
--------------------------------------------------------------------- Dr. Hans Ekkehard Plesser Tel. : +47 6494 8832 Physics Section / ITF Fax : +47 6494 8810 Agricultural University of Norway e-mail: hans.plesser@itf.nlh.no N-1432 Ås, Norway WWW : arken.nlh.no/~itfhep ---------------------------------------------------------------------
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |