FirstIndexNext

[bug-gsl] Bug in gsl_sf_hyperg_2F1 ?? (2008-11-08)

From: "Didier Pinchon" <pinchon.didier@.........>
Subject: Bug in gsl_sf_hyperg_2F1 ??
Date: Sat, 8 Nov 2008 03:00:41 +0100
To: <bug-gsl@gnu.org>

Hello,

I have tried to compute 2F1(11, -1 ; 11/2; 0.125) and I got an error message (below is my sample program).
However 2F1(-1, 11 ; 11/2; 0.125) provides the right result 0.75

Am I wrong somewhere ?
I did not find any indication in archives.

Thank you for your help.
All the best,
Didier
-----------------------------------------------------------------------------
/* bug_gsl.c */
/* 2F1(11,-1 ; 11/2 ; 1/8) = 0.75 */
/* Didier Pinchon, 8 Nov 2008 */
#include <stdio.h>
#include <stdlib.h>
#include "gsl_math.h"
#include "gsl_sf_hyperg.h"

int main()
{
double a,b,c,r, res;
a = 10.0;
b = -1.0;
c = 5.5;
r = 0.125;

res = gsl_sf_hyperg_2F1(a,b,c,r);

printf("res = %20.14e\n", res);
return EXIT_SUCCESS;
}

/* Compilation and execution:
$ gcc -o bug_gsl -I/usr/local/include/gsl bug_gsl.c -L/usr/local/lib -lgsl -lm

$ ./bug_gsl
gsl: hyperg_2F1.c:750: ERROR: error
Default GSL error handler invoked.
Abandon

*/