#20086: ZZ[X], QQ[X]: allow arbitrary powers of constant polynomials
-------------------------------------+-------------------------------------
Reporter: cheuberg | Owner:
Type: defect | Status: needs_review
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:
-------------------------------------+-------------------------------------
Changes (by cheuberg):
* status: needs_info => needs_review
Comment:
Replying to [comment:16 vdelecroix]:
> Why doing something that complicated for dealing with strange exponents?
Why not simply
> {{{
> if input is not an integer:
> convert to an integer
> do the exponentiation
> }}}
I do not understand this comment. Which input? Base or Exponent? Where
should this code be?
>
> Why are you special casing degree 0 polynomial? If I understand
correctly these examples won't behave similarly
> {{{
> sage: R.<x> = QQ[]
> sage: ((x+1)^2)^(1/2)
> -> TypeError
> sage: ((R(2))^2)^(1/2)
> -> 2
> }}}
> Which is weird.
I need a quick fix for `R(1)^(1/2)`. If somebody has time to implement
`((x+1)^2)^(1/2)` very soon, I'd be happy. I do not have time soon.
However, I want to have the code associated with a recently submitted
paper in 7.1.
Basically, this fix here simply branches to existing code. Computing
`((x+1)^2)^(1/2)` needs new mathematical code (involving square free
decomposition).
Therefore, I propose to include this now on the basis that while this is
not a perfect and definitive solution, it is better than the previous
behaviour.
--
Ticket URL: <http://trac.sagemath.org/ticket/20086#comment:17>
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.