[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Bug-gsl] gsl_sf_hyperg_1F1

**From**: |
Lorenzo Moneta |

**Subject**: |
Re: [Bug-gsl] gsl_sf_hyperg_1F1 |

**Date**: |
Thu, 21 Jan 2010 16:12:45 +0100 |

Hello,
I have found a similar problem, probably related to the inaccuracy in the
series calculation of
the hypergeometric function for
gsl_sf_hyperg_1F1( a < 0, b > 0, x << 0).
For example :
gsl_sf_hyperg_1F1(-1.5, 1.5, - 99.9) returns the correct value of
4.55768964383819423e+02
while gsl_sf_hyperg_1F1(-1.5, 1.5, -100.) returns -1.13760e+20 when the correct
value is 456.44 (from Mathematica)
I think the Kummer formula ( 1F1(a,b,x) = exp(-x) * 1F1(b-a,b,-x) could be
used for larger value of |x| ( at least works for |x| = 700), while
the current cut-off is for |x| < 100.
Best Regards
Lorenzo
On Dec 11, 2009, at 9:41 PM, Brian Gough wrote:
>* At Mon, 30 Nov 2009 15:26:11 +0100,*
>* Weibin Li wrote:*
>*> The output of above code shows an extremely large error. by increasing*
>*> Ri, the relative error decreases. Is there any idea to fix this?*
>* *
>* I've looked at the problem. Unfortunately I think it is just very*
>* difficult to compute an accurate value in this region. The large*
>* error reflects that. I have logged it at as bug at*
>* https://savannah.gnu.org/bugs/index.php?28267*
>* *
>* I could not find of any algorithm that gives an accurate value in this*
>* region of parameters (a<<0, |a|>b>0, x>>0) , due to cancellation*
>* errors in both the ordinary 1F1 series and Kummer transformed series.*
>* If you know of one I would be glad to hear it.*
>* *
>* -- *
>* Brian Gough*
>* *
>* GNU Scientific Library -*
>* http://www.gnu.org/software/gsl/*
>* *
>* *
>* _______________________________________________*
>* Bug-gsl mailing list*
>* address@hidden*
>* http://lists.gnu.org/mailman/listinfo/bug-gsl*

**Re: [Bug-gsl] gsl_sf_hyperg_1F1**,
*Lorenzo Moneta* **<=**