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

Ondrej Certik ondrej@certik...
Sun Sep 23 18:31:34 CDT 2012


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


More information about the SciPy-User mailing list