#13271: wrong sign with function Ei and limit
---------------------------------+------------------------------------------
       Reporter:  dkrenn         |         Owner:  burcin  
           Type:  defect         |        Status:  new     
       Priority:  major          |     Milestone:  sage-5.3
      Component:  symbolics      |    Resolution:          
       Keywords:  Ei limit sign  |   Work issues:          
Report Upstream:  N/A            |     Reviewers:          
        Authors:                 |     Merged in:          
   Dependencies:                 |      Stopgaps:          
---------------------------------+------------------------------------------

Comment (by kcrisman):

 Huh.

 Apply
 {{{
 #!diff
 diff --git a/sage/interfaces/maxima_lib.py b/sage/interfaces/maxima_lib.py
 --- a/sage/interfaces/maxima_lib.py
 +++ b/sage/interfaces/maxima_lib.py
 @@ -1165,7 +1165,6 @@
  max_psi=EclObject("$PSI")
  max_array=EclObject("ARRAY")
  mdiff=EclObject("%DERIVATIVE")
 -max_gamma_incomplete=sage_op_dict[sage.functions.other.gamma_inc]
  max_lambert_w=sage_op_dict[sage.functions.log.lambert_w]

  def mrat_to_sage(expr):
 @@ -1358,7 +1357,6 @@
      sage.functions.log.polylog : lambda N,X : [[mqapply],[[max_li,
 max_array],N],X],
      sage.functions.other.psi1 : lambda X : [[mqapply],[[max_psi,
 max_array],0],X],
      sage.functions.other.psi2 : lambda N,X : [[mqapply],[[max_psi,
 max_array],N],X],
 -    sage.functions.exp_integral.Ei : lambda X : [[max_gamma_incomplete],
 0, X],
      sage.functions.log.lambert_w : lambda N,X : [[max_lambert_w], X] if
 N==EclObject(0) else [[mqapply],[[max_lambert_w, max_array],N],X]
  }
 }}}
 to get
 {{{
 sage: var('Z')
 Z
 sage: (Ei(-Z)).limit(Z=oo)
 0
 sage: (Ei(-Z)).limit(Z=1000)
 Ei(-1000)
 sage: (Ei(-Z)).limit(Z=1000).n()
 -5.07089306023517e-438
 }}}
 Tests look good.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13271#comment:5>
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