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.
#include <iostream>
#include <iomanip>
#include <fstream>
#include <math.h>
using namespace std;

#include <gsl/gsl_sf_hyperg.h>


int
main (void)
{
  double x = 0.1725;
  double a = -10.34;
  double b = 2.05;
  double c = 3.05;

  double y = gsl_sf_hyperg_2F1(a,b,c,x);

  cout << "= " 
       << setprecision(18) << setw(20) << y << endl;

  return 0;
}
_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to