[Scipy-tickets] [SciPy] #1640: sph_jn returns false results for some orders/values

SciPy Trac scipy-tickets@scipy....
Thu Apr 5 10:04:59 CDT 2012

#1640: sph_jn returns false results for some orders/values
 Reporter:  Anakinele      |       Owner:  pv         
     Type:  defect         |      Status:  new        
 Priority:  high           |   Milestone:  Unscheduled
Component:  scipy.special  |     Version:  0.9.0      
 Keywords:  sph_jn         |  
 The sph_jn function tends to +/- Inf for values above a threshold.

 For example with order n=2 (copy-past from IPython):

 In [1]: sph_jn(2,3350.506)
 (array([  2.98461400e-04,  -6.76491641e-07,  -2.98462005e-04]),
  array([  6.76491641e-07,   2.98461803e-04,  -4.09252598e-07]))

 In [2]: sph_jn(2,3350.507)
 (array([             inf,  -3.78029638e-07,             -inf]),
  array([  3.78029638e-07,              inf,              inf]))

 Here, there are anomalous 'jump' between 3350.506 and 3350.507 for some
 orders and some derivatives.

 As a point of comparison, Mathematica
 (http://www.wolframalpha.com/input/?i=SpericalBesselJ[2%2C3350.507]) says:
 SpericalBesselJ[2,3350.507] ~= -0.000298462...

Ticket URL: <http://projects.scipy.org/scipy/ticket/1640>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list