[SciPy-User] special.kv goes from 0 to nan for large numbers

Pauli Virtanen pav@iki...
Mon Jan 23 18:59:51 CST 2012

Johann Cohen-Tanugi <johann.cohentanugi <at> gmail.com> writes:
> In [4]: sp.kv(1./3.,1.08e+09)
> Out[4]: nan
> I guess this has to dow with a cephes and big numbers.... Is it fixed on 
> github already, or is it a known bug? Or is it a feature and not a bug? 

No, it's not a known bug, please file a ticket.

The code for KV actually comes from Boost, so it's better quality than Cephes, 
but apparently it wasn't perfect. There's no asymptotic expansion for KV, and it 
seems the continued fraction or something else fails to converge in this limit.

Pauli Virtanen

More information about the SciPy-User mailing list