2024년 6월 12일 수요일

numerical calculation of confluent hypergeometric function

It is known that numerical computation of confluent hypergeometric function with large argument is challenging. 

I found a strange behavior of scipy special function hyp1f1. 

For example, scipy.sepcial.hyp1f1(-40.5,0.5,64.0) gives 

-1.1979592767053608e+16 in Linux 

and 65755449963894.45  in Windows. 


Compared the result with the independent fortran code 

written by Shanjie Zhang, Jianming Jin, 

it is consistent with  -1.1979592767053608e+16. 

(The fortran code gives the same result in both OS.) 


How can I understand this? Scipy version difference?  

댓글 없음:

댓글 쓰기