This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Sgmentation fault from hypergeometric function
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: Duane Nykamp <nykamp at math dot ucla dot edu>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Wed, 19 Dec 2001 20:54:49 +0000 (GMT)
- Subject: Re: Sgmentation fault from hypergeometric function
- References: <3C1FB300.3050309@math.ucla.edu>
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) {