bug-gsl
[Top][All Lists]
Advanced

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

[Bug-gsl] error in generalized hypergeometric function


From: A.I. McLeod
Subject: [Bug-gsl] error in generalized hypergeometric function
Date: Sun, 16 Aug 2015 23:14:07 -0400
User-agent: SquirrelMail/1.4.23 [SVN]

The bug I am reporting arose when I tried to the gsl package in R:
gsl: wrapper for the Gnu Scientific Library

The authors of the gsl package have determined that the error is in the Gnu
Scientific Library.

The problem arises with the generalized hypergeometric function and is 
illustrated
in the code below. Please excuse my odd syntax where I used 1+9 etc instead of 
10
etc. Both Mathematica and MatLab get the result correct.

Browse[2]> hyperg_2F1(-0.2,-0.2 + 9,1 + 9,0.8)
[1] 0.7799897
Browse[2]> hyperg_2F1(-0.2,-0.2 + 10,1 + 10,0.8)
[1] NaN


MATHEMATICA GETS IT CORRECT
Hypergeometric2F1[-0.2, -0.2+9, 1+9, 0.8]
0.77999
Hypergeometric2F1[-0.2, -0.2+10, 1+10, 0.8]
0.775746

MATLAB GETS IT CORRECT
>> hypergeom([-0.2,-0.2+9],1+9,0.8)

ans =

    0.7800

>> hypergeom([-0.2,-0.2+10],1+10,0.8)

ans =

    0.7757



reply via email to

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