This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Sgmentation fault from hypergeometric function


Duane Nykamp writes:
 > I'm using a precompiled version 1.0 of the gsl library on Redhat Linux. 
 >     Calling gsl_sf_hyperg_1F1 with the first two arguments being 1.0 and 
 > 0.5 leads to a segmentation fault.  Changing the first parameter to 
 > 1.01, for example, removes the problem.

Hi,
Thanks for the bug report.  The patch below should fix the problem.

regards
Brian Gough


Index: specfunc/hyperg_1F1.c
===================================================================
RCS file: /cvs/gsl/gsl/specfunc/hyperg_1F1.c,v
retrieving revision 1.69
diff -c -r1.69 hyperg_1F1.c
*** hyperg_1F1.c        2001/12/05 19:34:41     1.69
--- hyperg_1F1.c        2001/12/19 20:53:32
***************
*** 672,678 ****
      result->err = 0.0;
      return GSL_SUCCESS;
    }
!   else if(a == 1.0) {
      return hyperg_1F1_1(b, x, result);
    }
    else if(a == -1.0) {
--- 672,678 ----
      result->err = 0.0;
      return GSL_SUCCESS;
    }
!   else if(a == 1.0 && b >= 1.0) {
      return hyperg_1F1_1(b, x, result);
    }
    else if(a == -1.0) {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]