bug-gsl
[Top][All Lists]
Advanced

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

[Bug-gsl] hyperg_2F1.c


From: Lee Warren
Subject: [Bug-gsl] hyperg_2F1.c
Date: Tue, 10 Feb 2004 16:01:14 -0500 (EST)

Here is some additional information:

I am using GSL v1.4 downloaded on 2/10/04
compiled with g++ (GCC) 3.3.1 on a dual
xeon box running under RH 7.3, with the
2.4.18-18.7smp kernel.


BUG DESCRIPTION:


There is an issue with computing hypergeometric functions
of the form

gsl_sf_hyperg_2F1( a, b, c, x )

where a and b are negative integers, c is negative,
and x>=1.0

For example,

gsl_sf_hyperg_2F1(-1,-1,-1/2,1.5) throws an domain
error when in fact the series converges to -2.0.

If I comment out lines 635-637 (to remove the
error check for x), gsl_sf_hyperg_2F1 appears to
compute the result correctly.

It seems that the requirement x<1.0 is too strict
for some argument sets.

This may affect the other 2F1 hypergeometric
functions as well.




SAMPLE CODE:

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

using namespace std;


int main( void )
{

  double result = gsl_sf_hyperg_2F1( -1, -1, -0.5, 1.5 );

  cout << result << endl;

}




Lee Warren






reply via email to

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