#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:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/cheuberg/polynomials/power       |  25fdd0c0ceb085d68b2ddf851983a386771d164f
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by nbruin):

 The fact that for a in QQ, the value of `a^(1/2)` has its parent depending
 on the actual value of a is a compromise for novice use (in calculus etc.)
 Normally, one would raise an error if `a^(1/2)` does not lie in QQ.
 Certainly, promoting to SR is a very bad choice for anything else than
 novice use.

 I see you take the effort of trying to put the result back in the original
 parent. Don't you think it's better to force that? i.e., raise an error if
 it doesn't work, rather than give a result back in SR?

 The problem is that if someone is computing with polynomials, it's almost
 certainly not desired to end up in SR (where things like `QQ['x']['x']`
 get squashed), and if an error isn't raised, it's very hard to detect that
 it happened.

 Also, if you're implementing the (partial) map `a:->a^(n/m)` , why not
 extend it properly? When
 `(QQ['x'](4))^(1/2)` works, why should `QQ['x'](x^2)^(1/2)` fail?

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

Reply via email to