bugGNU Scientific Library - Bugs: bug #43259, accuracy problems in specfunc

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #43259: accuracy problems in specfunc

Submitted by:  Patrick Alken <psa>
Submitted on:  Fri 19 Sep 2014 04:20:37 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Operating System: Status: None
Assigned to: NoneOpen/Closed: Open
Release: 

Fri 19 Sep 2014 04:20:37 PM UTC, original submission:

From zoudm =at= pku =dot= edu =dot= cn

Hello,

I’m testing about floating point accuracy, and I have found that 9 functions in specfunc have potential bugs of inaccuracy.

I’m using gsl-1.1.6 in Ubuntu 64bit.

Below is the inputs. To make the inputs precise, I encode them in hexadecimal.

double i2d(unsigned long int x) {
double d = (double)(&x);
return d;
}

gsl_sf_hyperg_0F1(i2d(0x13675FCCC1DE0AE1), i2d(0xDD0DD58CDBC5592)) with estimate of the absolute error(result->err, the same below) is 6.501089E+185, but actual absolute error is 1.149822E+198.

gsl_sf_hyperg_0F1(i2d(0x19A2961396A4C4D0), i2d(0x19A2961396A4C4D0)) with estimate of the absolute error is 5.877511E+155, but actual absolute error is 1.140714E+168.

gsl_sf_hyperg_0F1(i2d(0x1BDB9BF0824AECEA), i2d(0x22F7C93FACA8FCBB)) with estimate of the absolute error is 9.611187E+144, but actual absolute error is 2.234939E+157.

gsl_sf_clausen(i2d(0xC2D4C8E2EBF0F5E0)) with estimate of the absolute error is 1.808299E-16, but actual absolute error is 1.153174E-02.

gsl_sf_clausen(i2d(0x42AC3A936C2D0F3E)) with estimate of the absolute error is 2.047340E-16, but actual absolute error is 7.243544E-04.

gsl_sf_exprel_2(i2d(0xBF9C62E5D62AD9D9)) with estimate of the absolute error is 4.400140E-16, but actual absolute error is 9.869315E-04.

gsl_sf_psi_1(i2d(0xDFBE8E425E52DE59)) with estimate of the absolute error is 1.448389E-13, but actual absolute error is 1.125952E+01.

gsl_sf_psi_1(i2d(0xC74262F4CCE814C6)) with estimate of the absolute error is 7.427255E-14, but actual absolute error is 4.347871E+00.

gsl_sf_zeta(i2d(0xBFD85EC3692520C1)) with estimate of the absolute error is 3.307754E-15, but actual absolute error is 1.283687E-03.

gsl_sf_eta(i2d(0xBFD12087E34CCC81)) with estimate of the absolute error is 1.042941E-14, but actual absolute error is 1.141164E-03.

gsl_sf_gamma_inc_Q(i2d(0x3D6015265DC415D9), i2d(0x336A62C7B4081920)) with estimate of the absolute error is 8.881784E-16, but actual absolute error is 6.319112E-11.

gsl_sf_pochrel(i2d(0xD272424D4D731852), i2d(0x1EC8DCEFA40C71DF)) with estimate of the absolute error is 9.072393E-14, but actual absolute error is 1.113754E+02.

gsl_sf_pochrel(i2d(0xCD88BA943FE1B3E9), i2d(0x3E47245280744497)) with estimate of the absolute error is 1.051328E-13, but actual absolute error is 2.373726E+23.

gsl_sf_pochrel(i2d(0xCC1F1549401470B0), i2d(0x9547D22A7AE65BEC)) with estimate of the absolute error is 5.949131E-14, but actual absolute error is 1.690742E+02.

gsl_sf_ellint_P(i2d(0x275AC794A3F9C13C), i2d(0x235BA8619CF10FD8), i2d(0x741226BBB54FE9F9)) with estimate of the absolute error is 1.842198E-134, but actual absolute error is 4.148260E-119.

We can see that in most cases the actual errors are many orders of magnitudes larger than the estimated ones, indicating potentially serious problems in practice.

Thanks,
Daming

Patrick Alken <psa>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psa (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1