bugGNU Scientific Library - Bugs: bug #24812, gsl_sf_hyperg_2F1(11, -1 ; 11/2;...

 
 

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

bug #24812: gsl_sf_hyperg_2F1(11, -1 ; 11/2; 0.125) fails

Submitter:  -Deleted Account- <bjg>
Submitted:  Tue 11 Nov 2008 02:43:07 PM UTC
   
 
Category:  Runtime error Severity:  3 - Normal
Operating System:  Status:  Fixed
Assigned to:  None Open/Closed:  Closed
Release:  1.11

Fri 27 Aug 2010 09:09:29 AM UTC, comment #3: 

fixed in revision 4676

-Deleted Account- <bjg>
Fri 27 Aug 2010 08:42:16 AM UTC, comment #2: 

From: Andrew Benson <abenson@caltech.edu>
To: -email is unavailable-
Subject: [Bug-gsl] Bug in gsl_sf_hyperg_2F1
Date: Tue, 24 Aug 2010 21:00:48 -0700

[1  <text/plain; us-ascii (7bit)>]                                             
Under GSL 1.14 (compiled with either gcc version 4.4.4 or gcc version 4.1.2)
the gsl_sf_hyperg_2F1 function crashes with the following arguments:

gsl_sf_hyperg_2F1(-10.34,2.05,3.05,0.1725)

The expected answer (computed using Maple for example) is 0.3104735522

I've attached an example case:

$ g++ test.cpp -o test.x -lgsl -lgslcblas
$ test.x
gsl: hyperg_2F1.c:755: ERROR: error
Default GSL error handler invoked.
Abort

The crash seems to occur only when the first argument is less than or equal to
-10. For example,

gsl_sf_hyperg_2F1(-10.0,2.05,3.05,0.1725)

crashes, but

gsl_sf_hyperg_2F1(-9.99999999999,2.05,3.05,0.1725)

evaluates correctly to 0.321419346301974773.

-Deleted Account- <bjg>
Tue 11 Nov 2008 02:45:01 PM UTC, comment #1: 

line 732:
    if(GSL_MAX_DBL(fabs(a),1.0)*fabs(bp)*fabs(x) < 2.0*fabs(c)) {
line 740:
    if(fabs(bp*bp*x*x) < 0.001*fabs(bp) && fabs(a) < 10.0) {

I think these should have a=>ap for consistency


-Deleted Account- <bjg>
Tue 11 Nov 2008 02:43:07 PM UTC, original submission:  

From: "Didier Pinchon" <pinchon.didier@orange.fr>
To: <bug-gsl@gnu.org>
Subject: [Bug-gsl] Bug in gsl_sf_hyperg_2F1 ??
Date: Sat, 8 Nov 2008 03:00:41 +0100

Hello,

I have tried to compute 2F1(11, -1 ; 11/2; 0.125) and I got an error message (below is my sample program).
However 2F1(-1, 11 ; 11/2; 0.125) provides the right result 0.75

Am I wrong somewhere ?
I did not find any indication in archives.

Thank you for your help.
All the best,
Didier


/* Compilation and execution:
$ gcc -o bug_gsl -I/usr/local/include/gsl bug_gsl.c -L/usr/local/lib -lgsl -lm

$ ./bug_gsl
gsl: hyperg_2F1.c:750: ERROR: error
Default GSL error handler invoked.
Abandon

*/

-Deleted Account- <bjg>

 

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

Attached Files
file #16829:  hyperg2F1.c added by bjg (364B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bjg
  •  

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-27 bjg StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Carbon-Copy- Added -email is unavailable-
    2008-11-11 bjg Attached File- Added hyperg2F1.c, #16829

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code