#20086: ZZ[X], QQ[X]: allow arbitrary powers of constant polynomials
-------------------------------------+-------------------------------------
Reporter: cheuberg | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-7.1
Component: basic arithmetic | Resolution:
Keywords: | Merged in:
Authors: Clemens Heuberger | Reviewers: Benjamin Hackl
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/cheuberg/polynomials/power | 14f7efaaf5be81405d1954473b4dc3f47100e486
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by behackl):
Hi Vincent!
Just to clarify the previous need for checking whether the exponent is a
polynomial: in our previous approach, we were hoping for the coefficient
ring to carry out the exponentiation, i.e. if we had
{{{
sage: P.<z> = QQ[]
sage: P(1/4)^(1/2)
1/2
}}}
then we would compute this by letting `QQ` do the exponentiation. However,
in the doctest over at `rings/integer.pyx` we have something like
{{{
sage: P.<t> = QQ[]
sage: 2^t
}}}
With the old implementation, this lead to an infinite loop (because
coercion would put the base always back to P again...), and thus I added
the check for the polynomial in the exponent.
In any case, I'm all for improving the code and first trying to deal with
integers, and then with rationals afterwards. Nevertheless, I'd still just
handle constant polynomials in the base on this ticket---but then, this
could be extended easily.
Benjamin
--
Ticket URL: <http://trac.sagemath.org/ticket/20086#comment:21>
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.