bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] problem in calling function gsl_sf_hyperg_2F1


From: liweiming
Subject: [Bug-gsl] problem in calling function gsl_sf_hyperg_2F1
Date: Tue, 31 Mar 2015 13:54:32 +0800 (CST)

I have a problem calling function gsl_sf_hyperg_2F1 in gsl.  My orginal code is 
:

#include <gsl/gsl_sf_hyperg.h>
#include <cmath>
#include <iostream>

int main(int argc, char * argv[])
{
    double result;
    double a, b, c, x;
    a = 3.23191;
    b = -4.0229;
    c = 8.02291;
    x = 0.5;
    result = gsl_sf_hyperg_2F1(a, b, c, x);
    std::cout << "result = " << result << std::endl;
    return 0;
}

My gcc version is 4.8.2. I could compile and link with no problem.
I complied using :  g++ -o test test.cpp -lgsl -lgslcblas

But on running, it returned the following message:
$ ./test
gsl: hyperg_2F1.c:65: ERROR: error
Default GSL error handler invoked.
Aborted (core dumped)


But by definition the series should be convergent at x=0.5. 
I could get the result using maple, which returned the following :

hypergeom([3.32191, -4.0229], [8.0229], .5);
                          0.4186139005

Is it because I made a mistake when calling this function ?

Thank you very much !


reply via email to

[Prev in Thread] Current Thread [Next in Thread]