#20084: residue: mathematically wrong output
-----------------------------+------------------------
       Reporter:  behackl    |        Owner:
           Type:  defect     |       Status:  new
       Priority:  critical   |    Milestone:  sage-7.1
      Component:  symbolics  |   Resolution:
       Keywords:             |    Merged in:
        Authors:             |    Reviewers:
Report Upstream:  N/A        |  Work issues:
         Branch:             |       Commit:
   Dependencies:             |     Stopgaps:
-----------------------------+------------------------

Comment (by behackl):

 The most elegant solution would of course be the automatic simplification
 of expressions like `2^(something/log(2)) --> exp(something)`, such that
 {{{
 sage: 2^(2*pi*I/log(2))
 1
 }}}

 However, I'm not sure if that can be achieved so easily.

 A second suggestion would be something like
 {{{diff
 diff --git a/src/sage/symbolic/expression.pyx
 b/src/sage/symbolic/expression.pyx
 index 3a5c864..175bcad 100644
 --- a/src/sage/symbolic/expression.pyx
 +++ b/src/sage/symbolic/expression.pyx
 @@ -4076,7 +4076,7 @@ cdef class Expression(CommutativeRingElement):
              a = 0
          if a == infinity:
              return (-self.subs({x: 1/x}) / x**2).residue(x == 0)
 -        return self.subs({x: x+a}).series(x == 0, 0).coefficient(x, -1)
 +        return self.subs({x: x+a}).canonicalize_radical().series(x == 0,
 0).coefficient(x, -1)

      def taylor(self, *args):
          r"""
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/20084#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to