[Scipy-tickets] [SciPy] #1783: special.kn doesn't return inf

SciPy Trac scipy-tickets@scipy....
Fri Nov 30 23:08:10 CST 2012


#1783: special.kn doesn't return inf
---------------------------+------------------------------------------------
 Reporter:  josefpktd      |       Owner:  pv         
     Type:  defect         |      Status:  new        
 Priority:  normal         |   Milestone:  Unscheduled
Component:  scipy.special  |     Version:  0.11.0     
 Keywords:                 |  
---------------------------+------------------------------------------------
 While trying to see whether any of the ``k`` Bessel function works for
 large arguments, I found this.

 ``kn`` doesn't return inf, instead returns the largest float (?)

 {{{
 >>> special.kn(50, 1e-1)
 1.7976931348623157e+308
 >>> special.kn(2000, 1e-1)
 1.7976931348623157e+308
 }}}

 {{{
 >>> special.kv(50, 1e-1)
 3.4241477644707505e+127
 >>> special.kv(2000, 1e-1)
 inf
 }}}

 I got strange results, because I was taking logs of it:

 {{{
 >>> np.log(special.kv(1000, 1e-1))
 inf
 >>> np.log(special.kn(1000, 1e-1))
 709.78271289338397
 }}}

 {{{
 >>> scipy.__version__
 '0.9.0'
 }}}

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


More information about the Scipy-tickets mailing list