[Scipy-tickets] [SciPy] #851: scipy.special.kn issues for large n

SciPy scipy-tickets@scipy....
Sun Jan 18 12:21:10 CST 2009


#851: scipy.special.kn issues for large n
---------------------------+------------------------------------------------
 Reporter:  pv             |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  normal         |   Milestone:  0.8.0   
Component:  scipy.special  |     Version:  devel   
 Severity:  normal         |    Keywords:          
---------------------------+------------------------------------------------
 As commented by Greg Werner in #683:

 kn appears to overflow to inf unnecessarily early:
 {{{
 >>> import scipy.special as sc
 >>> sc.kn(31, 1)
 2.8244984708141136e+41
 >>> sc.kn(32, 1)
 1.7976931348623157e+308
 >>> sc.kv(32, 1)
 1.7516596664574289e+43
 }}}

 Also, there's some small inaccuracy present
 {{{
 >>> (sc.kn(0,5) - sc.kv(0,5)) / sc.kv(0,5)
 -1.6026143217382651e-13
 >>> sc.kv(0,5) / 0.0036910983340425942747
 1.0
 }}}
 `special.kv` appears to be mostly OK, though.

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


More information about the Scipy-tickets mailing list