#12807: Taking the real part of a sum of exponentials with imaginary exponents
gives wrong result
-----------------------------+------------------------
       Reporter:  inaki      |        Owner:  burcin
           Type:  defect     |       Status:  new
       Priority:  major      |    Milestone:  sage-6.4
      Component:  symbolics  |   Resolution:
       Keywords:             |    Merged in:
        Authors:             |    Reviewers:
Report Upstream:  N/A        |  Work issues:
         Branch:             |       Commit:
   Dependencies:             |     Stopgaps:
-----------------------------+------------------------

Comment (by kcrisman):

 This gets really weird, actually.
 {{{
 sage: a.real()
 -1/2
 sage: b.real()
 1/2
 sage: (a-b).real() # good
 -1
 sage: (a-2*b).real() # good
 -3/2
 sage: (a-3*b).real()  # ho-hum
 -2
 sage: (2*a-b).real() # yikes
 1/2
 sage: (3*a-b).real()  # what?
 3/4
 sage: (4*a-b).real()  # consistent...
 1
 sage: (5*a-b).real()  # ?!?!?
 5/4
 sage: (-a-b).real()  # seeing but not believing
 -1/4
 sage: (-2*a-b).real()
 -1/2
 sage: (-3*a-b).real()
 -3/4
 sage: (2*a).real()  # okay
 -1
 sage: (2*a+b).real()  #  okay
 -1/2
 sage: (3*a+b).real()
 -1
 sage: (4*a+b).real()
 -3/2
 }}}
 This is consistent with Pynac somehow thinking that `a.real()==1/4` when
 preceded by a positive constant and `-1/4` when given a negative constant.
 But only when part of a sum including `-b`, with `+b` it's fine.

 I tried to figure out what it was but so far no luck.

--
Ticket URL: <http://trac.sagemath.org/ticket/12807#comment:6>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to