[Scipy-tickets] [SciPy] #1757: new upstream of complex erf code (special.wofz) - performance, accuracy improvements

SciPy Trac scipy-tickets@scipy....
Sat Nov 3 22:39:15 CDT 2012

#1757: new upstream of complex erf code (special.wofz) - performance, accuracy
 Reporter:  stevenj        |       Owner:  pv         
     Type:  defect         |      Status:  new        
 Priority:  normal         |   Milestone:  Unscheduled
Component:  scipy.special  |     Version:  devel      
 Keywords:                 |  

Comment(by stevenj):

 An updated package is now available upstream at http://ab-
 initio.mit.edu/Faddeeva which provides complex-argument implementations of
 all the error functions (erf, erfc, erfcx, erfi) along with the Dawson
 function (essentially a scaled erfi) and the Faddeeva function w(z).

 All of them are based on the Faddeeva function, but I switch to various
 Taylor expansions when needed to avoid cancellation problems such as those
 mentioned above. (Computing the Dawson function near the real axis proved
 especially tricky.)

 I've also verified that they handle NaN and Inf arguments correctly.

 Performance and accuracy seems to be better than most available complex-
 argument versions of these functions, and seems competitive with available
 code for real arguments.  (It seems to be mostly faster than the dawsn
 function SciPy is using now.  The only thing that consistently beats it by
 a large margin is the GNU libc implementation of erf and erfc for real
 arguments; this isn't surprising, since computing erf via erfcx as I do,
 rather than writing specialized code for the unscaled error functions,
 incurs significant overhead.)  Please let me know if you find any
 problems, or if you do any additional benchmarking.

 I would tend to recommend that SciPy provide all of the erf, erfc, erfcx,
 erfi, and Dawson (special.dawsn) functions for both real and complex
 arguments, in addition to wofz for complex arguments.

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

More information about the Scipy-tickets mailing list