bugGNU Scientific Library - Bugs: bug #29562, missing 1/x term for...

 
 

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

bug #29562: missing 1/x term for gsl_sf_atanint_e with large argument

Submitter:  -Deleted Account- <bjg>
Submitted:  Thu 15 Apr 2010 02:26:24 PM UTC
   
 
Category:  Accuracy problem Severity:  3 - Normal
Operating System:  Status:  Fixed
Assigned to:  bjg Open/Closed:  Closed
Release:  1.14

Thu 15 Apr 2010 02:39:37 PM UTC, comment #1: 

fixed by 26ee63637ddf0d5c0aeaed84bcbdb2c8b785c7de

-Deleted Account- <bjg>
Thu 15 Apr 2010 02:26:24 PM UTC, original submission:  

From: Wolfgang Ehrhardt <Wolfgang.Ehrhardt@munich.netsurf.de>
To: Brian Gough <bjg@network-theory.co.uk>
Subject: Bug in GSL 1.14 gsl_sf_atanint_e
Date: Wed, 14 Apr 2010 18:2:39 +0100

Dear Brian Gough,

During the development of my Pascal special function library I had a look at the
GSL/specfunc/atanint.c code. Since I am no GSL user and you seem (according to the
changelog) to be the main developer for GSL/SpecFunc I sent the following
observation
to you via email:

I think gsl_sf_atanint_e in atanint.c is slightly buggy for arguments with absolute
values >= 1.0/GSL_SQRT_DBL_EPSILON because an 1/x term is missing (in line 102).

The corresponding source code branch should be something like this (not sure about
result->err)

  ...
  else if(ax < 1.0/GSL_SQRT_DBL_EPSILON) {
  ...
  }
  else {
    result->val = sgn * (0.5*M_PI*log(ax) + 1.0/ax);
    result->err = 2.0 fabs(result->val GSL_DBL_EPSILON);
    return GSL_SUCCESS;
  }


And may I suggest that you add a line to specfunc/test_sf.c

  TEST_SF(s,  gsl_sf_atanint_e, (1.0e+9, &r), 32.552029856869591656, TEST_TOL0,
GSL_SUCCESS);

The check value is calculated with Pari/GP 2.3.4 using the definition
atanint(x)=1/2*I*(dilog(-I*x)-dilog(I*x))


Although I am quite sure about the issue, please note, that this is a purely
theoretical observation.

Best regards

Wolfgang Ehrhardt
(Munich, Germany)

-Deleted Account- <bjg>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2010-04-15 bjg StatusConfirmed Fixed
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code