Unexpected result from G-function routine

12 views
Skip to first unread message

Rudi Gaelzer

unread,
Sep 13, 2017, 9:59:46 AM9/13/17
to mpmath
Using mpmath version 0.19-8 distributed by Fedora 26.

I seem to have found an unexpected result from the meijerg routine.
Given the sample code:

#! /usr/bin/env python
from mpmath import *
mp
.dps = 25; mp.pretty = True
zero
= mpf("0.0") ; one= mpf("1.0")
half
= mpf("0.5")

lam
= float(input('lambda= '))
n
= int(input('n= '))
z
= float(input('z= '))

print 'G1(+n)= ', meijerg([[half, zero],[]],[[ n, lam],[one, -n]], z)
print 'G1(-n)= ', meijerg([[half, zero],[]],[[-n, lam],[one,  n]], z)
print ''
print 'G2(+n)= ',  -meijerg([[half],[zero]],[[ n, lam, one],[-n]], z)
print 'G2(-n)= ',  -meijerg([[half],[zero]],[[-n, lam, one],[ n]], z)


Test for real lam and z, but integer n.
As expected, G1(+n) = G2(+n), but G1(-n) /= G1(+n), G2(-n) /= G2(+n), when all results should be the same...
Verifying with Wolfram Alpha, one obtains G1(+n) = G1(-n) = G2(+n) = G2(-n), as it should...

Reply all
Reply to author
Forward
0 new messages