classification
Title: Type: Bug in hypergeometric function behavior resolved Python 3.7
process
Status: Resolution: closed third party 12345NotFromHere54321, SilentGhost normal

Created on 2020-02-23 20:55 by 12345NotFromHere54321, last changed 2020-02-23 21:03 by SilentGhost. This issue is now closed.

Messages (2)
msg362539 - (view) Author: 12345NotFromHere54321 (12345NotFromHere54321) Date: 2020-02-23 20:55
```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]```
msg362540 - (view) Author: SilentGhost (SilentGhost) * Date: 2020-02-23 21:03
`Hi, this is a wrong bug tracker. You can report numpy issues at https://github.com/numpy/numpy/issues and scipy one's at https://github.com/scipy/scipy/issues`
History
Date User Action Args
2020-02-23 21:03:30SilentGhostsetstatus: open -> closed

nosy: + SilentGhost
messages: + msg362540

resolution: third party
stage: resolved
2020-02-23 20:55:3012345NotFromHere54321create