[Scipy-tickets] [SciPy] #679: struve function has discontinuity

SciPy scipy-tickets@scipy....
Sat Nov 29 19:08:28 CST 2008


#679: struve function has discontinuity
-----------------------------+----------------------------------------------
 Reporter:  dvase            |        Owner:  somebody
     Type:  defect           |       Status:  new     
 Priority:  normal           |    Milestone:          
Component:  scipy.special    |      Version:          
 Severity:  normal           |   Resolution:          
 Keywords:  struve function  |  
-----------------------------+----------------------------------------------
Comment (by pv):

 It's likely a bug in STVHV from specfun.f:
 {{{
   12660         SUBROUTINE STVHV(V,X,HV)
   ...
   12687         IF (X.LE.20.0D0) THEN
   ...
   12703         ELSE
   ...
   12758         ENDIF
 }}}
 The two branches apparently give different results for v < 0.

 The corresponding Cephes routine appears to function correctly (spc.struve
 calls it for x < -8):
 {{{
 import numpy as np
 import matplotlib.pyplot as plt
 import scipy.special as spc
 x = np.linspace(-20,20,2000)
 y = spc.struve(x, 20) - spc.struve(x, 20+1e-9)
 plt.plot(x, y)
 }}}

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


More information about the Scipy-tickets mailing list