This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author 12345NotFromHere54321
Recipients 12345NotFromHere54321
Date 2020-02-23.20:55:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582491330.33.0.385073270653.issue39733@roundup.psfhosted.org>
In-reply-to
Content
I want to evaluate Kummer's hypergeometric function. 

Code:
import scipy.special as sc
import numpy as np
 
#Parameters etc:
p=2 
s = -4.559190954155 -51.659216953928*1j

Evaluation:
s = -4.559190954155 -51.659216953928*1j
sc.hyp1f1(1/p, 1/p + 1, -s) 

Output:
(0.999999999999721-2.57668886227691e-13j)
This is close to 1 and agrees with Mathematica (see below)

Because the parameters 1/p and 1/p+1 are real, we know that if we replace s by its conjugate, the output should be the conjugate of the first output. This turns out not to be the case:

Evaluation:
s = -4.559190954155 -51.659216953928*1j
s = np.conj(s)
sc.hyp1f1(1/p, 1/p + 1, -s) 

Output:
(0.8337882727951572+0.1815268182862942j)

This is very far from 1. There seems to be a bug.


Mathematica:
s =  (-4.559190954155+51.659216953928I)
sconj=Conjugate[s]
Hypergeometric1F1[1/2,3/2,-s]
Hypergeometric1F1[1/2,3/2,-sconj]


Out[9]= 1.+1.99922*^-11 \[ImaginaryI]

Out[10]= 1.-1.99922*^-11 \[ImaginaryI]
History
Date User Action Args
2020-02-23 20:55:3012345NotFromHere54321setrecipients: + 12345NotFromHere54321
2020-02-23 20:55:3012345NotFromHere54321setmessageid: <1582491330.33.0.385073270653.issue39733@roundup.psfhosted.org>
2020-02-23 20:55:3012345NotFromHere54321linkissue39733 messages
2020-02-23 20:55:3012345NotFromHere54321create