[issue39733] Bug in hypergeometric function

2020-02-23 Thread SilentGhost


SilentGhost  added the comment:

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

--
nosy: +SilentGhost
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39733] Bug in hypergeometric function

2020-02-23 Thread 12345NotFromHere54321


New submission from 12345NotFromHere54321 :

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.721-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]

--
messages: 362539
nosy: 12345NotFromHere54321
priority: normal
severity: normal
status: open
title: Bug in hypergeometric function
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com