[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] bug in hypergeometric U
From: |
Brian Gough |
Subject: |
Re: [Bug-gsl] bug in hypergeometric U |
Date: |
Fri, 18 Apr 2003 13:09:30 +0100 |
Krzysztof Pachucki writes:
> Dear Brian,
> the example follows, gsl 1.3:
>
> main()
> {
> double t,gsl_sf_hyperg_U_int();
> t =gsl_sf_hyperg_U_int(1,4,0.5);
> printf("16.8f \n",t);
> }
>
> gcc bug.c -lgsl -lgslcblas
> It is the case when U functiopn is a finite series expansion.
>
Thanks for the bug report. A fix is now available in CVS and
attached below.
best regards,
--
Brian Gough
----------------------------------------------------------------------
Network Theory Ltd Phone: +44 (0)117 3179309
15 Royal Park Fax: +44 (0)117 9048108
Bristol BS8 3AL WWW: http://www.network-theory.co.uk/
United Kingdom Email: address@hidden
----------------------------------------------------------------------
Index: specfunc/gamma.c
===================================================================
RCS file: /cvs/gsl/gsl/specfunc/gamma.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -r1.68 -r1.69
1351c1351,1355
< if(x < 0.5) {
---
> if (x <= 0.0 && x == floor(x)) { /* negative integer */
> result->val = 0.0;
> result->err = 0.0;
> return GSL_SUCCESS;
> } else if(x < 0.5) {