#13193: erf evaluation is wrong along imaginary axis
-------------------------+--------------------------------------------------
   Reporter:  kcrisman   |             Owner:  jason, jkantor
       Type:  defect     |            Status:  new           
   Priority:  critical   |         Milestone:  sage-5.2      
  Component:  numerical  |          Keywords:                
Work issues:             |   Report Upstream:  N/A           
  Reviewers:             |           Authors:                
  Merged in:             |      Dependencies:                
   Stopgaps:             |  
-------------------------+--------------------------------------------------
 This was first noted at [http://ask.sagemath.org/question/1571/plot-
 solution-for-y-2xy-1 this ask.sagemath.org question].  Here are ''some''
 of the symptoms.

 * Being off by a real part of 1 along the imaginary axis
 {{{
 sage: for z in [3,33,333,3333]:
 ....:     mpmath.erf(i*z); erf(n(z)*i)
 ....:
 mpc(real='0.0', imag='1629.9946226015657')
 1.00000000000000 + 1629.86732385786*I
 mpc(real='0.0', imag='1.5128697751040891e+471')
 1.00000000000000 + 1.51286977510409e471*I
 mpc(real='0.0', imag='5.1260939089106243e+48155')
 1.00000000000000 + 5.12609390891062e48155*I
 mpc(real='0.0', imag='2.6385510598470926e+4824525')
 1.00000000000000 + 2.63855105984709e4824525*I
 }}}

 * Starting to be wrong in the imaginary component as well as the number
 gets closer to 0
 {{{
 sage: pari(3*i).erfc()
 -1.76710569338983 E-16 - 1629.86732385786*I
 sage: mpmath.erfc(3*i)
 mpc(real='1.0', imag='-1629.9946226015657')
 sage: 1-pari(3*i).erfc()
 1.00000000000000 + 1629.86732385786*I
 sage: mpmath.erf(3*i)
 mpc(real='0.0', imag='1629.9946226015657')
 sage: erf(i*1.42)
 1.00000000000000 + 4.03986343036907*I
 sage: import mpmath
 sage: mpmath.erf(i*1.42)
 mpc(real='0.0', imag='3.8217653554366318')
 }}}

 Ideally this would be fixed by #1173 or #13050, but if there is something
 else we can do (and soon) that would be fine too.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13193>
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