#15709: silent conversion of mod to int
----------------------------+------------------------
       Reporter:  ppurka    |        Owner:
           Type:  defect    |       Status:  new
       Priority:  major     |    Milestone:  sage-6.1
      Component:  coercion  |   Resolution:
       Keywords:            |    Merged in:
        Authors:            |    Reviewers:
Report Upstream:  N/A       |  Work issues:
         Branch:            |       Commit:
   Dependencies:            |     Stopgaps:
----------------------------+------------------------

Comment (by nbruin):

 Replying to [comment:3 ppurka]:
 > So, I suppose this should be fixed for complex numbers and some
 cyclotomic fields. Where the `__pow__` method raises `ValueError` if the
 exponent does not belong to `(ZZ, int, float, RR, RDF, CC, CDF)` - can
 there be any other field in that tuple?

 Is the code that specific? For a general ring, we'd probably want that the
 exponent is coercible into ZZ. For rings where fractional exponents are
 meaningful it would be QQ (but multivaluedness of the result is always an
 issue of course). For some analytic objects we can support even more
 general exponents. So in SR the issue probably remains, because one can
 wrap an element of ZZ/2ZZ in a symbolic expression.

 What happens now is probably that the code asks whether the exponent can
 be *turned into* an integer (i.e., asks for a conversion). Of course there
 is a conversion from ZZ/2ZZ to ZZ.

--
Ticket URL: <http://trac.sagemath.org/ticket/15709#comment:4>
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/groups/opt_out.

Reply via email to