This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: sf_gamma questions
- From: "Dan, Ho-Jin" <hjdan at sys713 dot kaist dot ac dot kr>
- To: jonathan at leto dot net
- Cc: gsl-discuss <gsl-discuss at sources dot redhat dot com>
- Date: Tue, 04 Dec 2001 05:25:11 +0900
- Subject: Re: sf_gamma questions
- References: <20011201214553.A31518@leto.net>
I found that the results from slatec are slightly accurate compare to
that of slatec.
The relative error of the order O(1.e-15) shows that both routines are
very accurate.
[17!] error slatec: 1.875000 [rel:0.000000]
gsl : -0.062500 [rel:-0.000000]
[18!] error slatec: 6.000000 [rel:0.000000]
gsl : -1.000000 [rel:-0.000000]
[19!] error slatec: -80.000000 [rel:-0.000000]
gsl : -16.000000 [rel:-0.000000]
[20!] error slatec: 0.000000 [rel:0.000000]
gsl : 0.000000 [rel:0.000000]
[21!] error slatec: -344064.000000 [rel:-0.000000]
gsl : 0.000000 [rel:0.000000]
[22!] error slatec: 4194304.000000 [rel:0.000000]
gsl : -131072.000000 [rel:-0.000000]
[23!] error slatec: -83886080.000000 [rel:-0.000000]
gsl : 0.000000 [rel:0.000000]
[24!] error slatec: 4697620480.000000 [rel:0.000000]
gsl : -134217728.000000 [rel:-0.000000]
[25!] error slatec: -79456894976.000000 [rel:-0.000000]
gsl : -2147483648.000000 [rel:-0.000000]
Jonathan Leto wrote:
>I was writing some test cases for Math::Gsl, when I saw some
>failing, because gamma(19) was off by 1 and gamma(20) is off by
>16. So I wrote a little test program to compare absolute difference
>between gamma(x) and factorial(x-1) . The output was:
>