[Numpy-discussion] NaN (Not a Number) occurs in calculation of complex number for Bessel functions
Happyman
bahtiyor_zohidov at mail.ru
Fri Dec 21 06:29:12 EST 2012
DEAR PYTHON USERS
DO MATHEMATICAL FUNCTIONS HAVE LIMITATION IN PYTHON in comparison with other programming languages ????
I have two mathematical functions:
from scipy.special import sph_jn, sph_jnyn
1) sph_jn (n, z) ---> n is float, z is complex number for example: a,b=sph_jn ( 2.0 , 5+0.4j ) gives the following result:
>>> a
array( [ - 0.20416243 + 0.03963597j, - 0.10714653 - 0.06227716j, 0.13731305 - 0.07165432j ] )
>>>b
array( [ 0.10714653 + 0.06227716j, -0.15959617 + 0.06098154j, -0.18559289 - 0.01300886j ] )
2) sph_jnyn(n , x) --> n-float, x - float ,for example: c,d,e,f=sph_jnyn(2.0 , 3.0)
>>> c
array( [ 0.04704 , 0.3456775, 0.2986375 ] )
>>> d
array( [-0.3456775 , -0.18341166, 0.04704 ] )
>>> e
array( [ 0.3299975 , 0.06295916, -0.26703834 ] )
>>> f
array( [ -0.06295916, 0.28802472, 0.3299975 ] )
PROBLEM IS HERE!!!
BUT , IF I GIVE ( it is necessary value for my program ): a , b = sph_jn ( 536 , 2513.2741228718346 + 201.0619298974676j )
I would like to see even very very deep comments as specific as possible!!!!!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20121221/74cf9caf/attachment.html>
More information about the NumPy-Discussion
mailing list