[SciPy-User] hyp1f1(0.5, 1.5, -2000) fails

Moore, Eric (NIH/NIDDK) [F] eric.moore2@nih....
Mon Sep 24 07:15:25 CDT 2012


> -----Original Message-----
> From: Ondrej Certik [mailto:ondrej@certik.cz]
> Sent: Sunday, September 23, 2012 7:32 PM
> To: SciPy Users List
> Subject: [SciPy-User] hyp1f1(0.5, 1.5, -2000) fails
> 
> Hi,
> 
> I noticed, that hyp1f1(0.5, 1.5, -2000) fails:
> 
> In [5]: scipy.special.hyp1f1(0.5, 1.5, 0)
> Out[5]: 1.0
> 
> In [6]: scipy.special.hyp1f1(0.5, 1.5, -20)
> Out[6]: 0.19816636482997368
> 
> In [7]: scipy.special.hyp1f1(0.5, 1.5, -200)
> Out[7]: 0.062665706865775023
> 
> In [8]: scipy.special.hyp1f1(0.5, 1.5, -2000)
> Warning: invalid value encountered in hyp1f1
> Out[8]: nan
> 
> 
> The values [5], [6] and [7] are correct. The value [8] should be:
> 
> 0.019816636488030055...
> 
> Ondrej
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

Its blowing up around -709: 

In [60]: s.hyp1f1(0.5, 1.5, -709.7827128933)
Out[60]: 0.03326459435722777

In [61]: s.hyp1f1(0.5, 1.5, -709.7827128934)
Out[61]: inf

Eric


More information about the SciPy-User mailing list