[Numpy-discussion] NaN (Not a Number) occurs in calculation of complex number for Bessel functions

Pauli Virtanen pav at iki.fi
Fri Dec 21 07:46:26 EST 2012


Happyman <bahtiyor_zohidov <at> mail.ru> writes:
[clip]
> IF I GIVE ( it is necessary value for my program ): 
> a , b = sph_jn ( 536 , 2513.2741228718346 + 201.0619298974676j )

The implementation of the spherical Bessel functions is through
this Fortran code:

https://github.com/scipy/scipy/blob/master/scipy/special/specfun/specfun.f#L1091

It does not have asymptotic expansions for dealing with parts of
the complex plane where the computation via the recurrence does not
work.

-- 
Pauli Virtanen





More information about the NumPy-Discussion mailing list