[SciPy-user] modified bessel fn of second kind K(n,z)

r help r_hlp at yahoo.com
Fri Apr 22 19:28:39 CDT 2005


hi

i am trying to use the modified bessel function of the
second kind, K_n(z) 

K is called the mod. bes. fn of second kind on
mathworld; 
K is called the mod. bes. fn of third kind in scipy.

the integer order function special.kn(-20,3) gives the
same result on both mathematica and scipy:

In [3]: special.kn(-20,3)
Out[3]: 16254643952204.371

however the real valued special.kv(-20,3) gives
different answers each time i call it:

In [2]: special.kv(-20,3)
Out[2]: -1.9924087524414062

In [4]: special.kv(-20,3)
Out[4]: 166558.53135225689

In [5]: special.kv(-20,3)
Out[5]: 166541.5313522513

In [6]: special.kv(-20,3)
Out[6]: 166541.53135221289

In [7]: special.kv(-20,3)
Out[7]: 166592.53135221568

In [8]: special.kv(-20,3)
Out[8]: 166541.5313522506

In [9]: special.kv(-20,3)
Out[9]: 166592.53135226108

In [10]: special.kv(-20,3)
Out[10]: 166541.53135219333

In [11]: special.kv(-20,3)
Out[11]: 166592.53135221079

In [19]: print scipy.scipy_version.scipy_version
0.3.2



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the SciPy-user mailing list