#18278: Variable to non-integral power for integer polynomials (using Flint) is
broken
-------------------------------------+-------------------------------------
       Reporter:  bruno              |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.7
      Component:  commutative        |   Resolution:
  algebra                            |    Merged in:
       Keywords:  integer            |    Reviewers:
  polynomials, exponentiation        |  Work issues:
        Authors:  Bruno Grenet       |       Commit:
Report Upstream:  N/A                |  49dc92ba66a2196af71ba62ef475e0403e43ac11
         Branch:                     |     Stopgaps:
  u/bruno/ticket/non_integral_pow    |
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by vdelecroix):

 * status:  needs_review => needs_work


Comment:

 Salut Bruno,

 1. You introduced trailing whitespaces, please remove them.

 2. Why would you want to do that
 {{{
 try:
     nn = PyNumber_AsSsize_t (exp, OverflowError)
 except TypeError:
    raise TypeError("non-integral exponents not supported")
 }}}
   the problem comes from the fact that you can cast rationals to Python
 int
 {{{
 sage: int(2/3)
 0
 }}}
   I would very much prefer
 {{{
 cdef long u = exp
 if exp != u:
     raise TypeError("...")
 }}}

 Vincent

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