#1173: implement numerical evaluation of erf at complex arguments
----------------------------------------------------------------------+-----
   Reporter:  was                                                     |         
 Owner:  was         
       Type:  enhancement                                             |         
Status:  needs_work  
   Priority:  major                                                   |      
Milestone:  sage-4.7.2  
  Component:  calculus                                                |       
Keywords:              
Work_issues:  add erf(sqrt(2)) and erf(45000).n(), formatting, speed  |       
Upstream:  N/A         
   Reviewer:  Burcin Erocal                                           |         
Author:  D. S. McNeil
     Merged:                                                          |   
Dependencies:  #11513      
----------------------------------------------------------------------+-----

Comment(by dsm):

 Okay, this looks a bit better.  With trac_1173-move_call.patch,
 trac_11885_v2.patch, trac_11513-is_numerically_zero.patch, and
 trac_1173_complex_erf_v3.patch:

 {{{
 alpha3:

 0.100000000000000 float               121 µs per loop
 0.100000000000000 RDF                 51.6 µs per loop
 0.100000000000000 RR                  61.2 µs per loop
 0.100000000000000 RealField(100)      64.5 µs per loop
 0.100000000000000 RealField(1000)     304 µs per loop

 new:
 0.100000000000000 float               49.3 µs per loop
 0.100000000000000 RDF                 773 ns per loop
 0.100000000000000 RR                  7.07 µs per loop
 0.100000000000000 RealField(100)      10.6 µs per loop
 0.100000000000000 RealField(1000)     248 µs per loop
 0.100000000000000 complex             131 µs per loop
 0.100000000000000 CDF                 185 µs per loop
 0.100000000000000 CC                  254 µs per loop
 0.100000000000000 ComplexField(100)   262 µs per loop
 0.100000000000000 ComplexField(1000)  470 µs per loop
 0.100000000000000*I complex             247 µs per loop
 0.100000000000000*I CDF                 389 µs per loop
 0.100000000000000*I CC                  405 µs per loop
 0.100000000000000*I ComplexField(100)   470 µs per loop
 0.100000000000000*I ComplexField(1000)  565 µs per loop

 }}}

 Now not only is there no regression, we've improved.  The speedups
 relative to alpha3 for reals are due to using the existing mpfr .erf()s
 instead of pari; float was special-cased through RDF.  As I mentioned, I
 don't have the new pari, and that's probably faster than mpmath.  But at
 least it's not killing me anymore.

 There's a doctest failure in gamma_inc due to trac_1173-move_call.patch, I
 think-- formerly,

 {{{
 sage: parent(gamma_inc(RDF(1),3))
 Complex Field with 53 bits of precision
 }}}
 but now
 {{{
 sage: parent(gamma_inc(RDF(1),3))
 Real Double Field
 }}}

 but gamma_inc doesn't preserve types the way I'd have expected.  Anyway, I
 think this is a step in the right direction.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1173#comment:28>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to