This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
bug
- To: gsl-discuss at sources dot redhat dot com
- Subject: bug
- From: Fernando <fpilotto at conex dot com dot br>
- Date: Tue, 03 Jul 2001 11:35:11 -0300
Hi,
I have found a bug in the hypergeometric function routine, F(a,b,x).
When a is negative ( a<-2), the function has a discontinuity.
I have include a program which just plots the function.
In the program is commented at which values of x the discontinuity
begins.
thank you,
Fernando Pilotto
/* command used: */
/* gcc plot_gsl_hyperg.c -lgsl -lgslcblas -lm; ./a.out > out */
#include "stdio.h"
#include "math.h"
#include "gsl/gsl_sf_hyperg.h"
main ()
{
double r,f;
for ( r=0.0; r<8.0; r += 0.01)
{
/* f = gsl_sf_hyperg_1F1(-4.5,1.0,r); */ /* discontinuity around r=9 */
/* f = gsl_sf_hyperg_1F1(-2.5,1.0,r); */ /* discontinuity: r=5 to r=6 */
f = gsl_sf_hyperg_1F1(-2.05,1.0,r); /* discontinuity at r=5 */
printf("%f %f\n", r, f);
}
return 1;
}