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


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



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