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

SciPy Trac scipy-tickets@scipy....
Wed Oct 31 20:19:53 CDT 2012


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

Comment(by stevenj):

 Note that in my implementation above I

 Replying to [comment:6 pv]:
 > Implementing `erf` and `erfc` via the Faddeeva function suffers from
 loss of precision and over- and underflows in some parameter regimes.

 Have you tried my implementation of erf above?  Unlike your
 implementation, I use a different formula for positive and negative Re(z),
 specifically to avoid the regime where the Faddeeva function becomes
 exponentially large, to avoid overflow problems.

 > The remaining issue is loss of precision for erf/erfc near the real axis
 before the asymptotic expansion kicks in, but I think this can be resolved
 by rewriting terms
 > in the expansion.

 I've tried points like 1+1e-16i and similar with my version above and
 don't see any problem.  (Note that recent updates to my Faddeeva_w code
 contain some accuracy improvements near the real axis, so be sure you are
 using the latest version.)

 Can you please try my implementation of erf above?  And if you still see a
 loss of accuracy, can you give a specific z where you see the problem?

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


More information about the Scipy-tickets mailing list