#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       |  918499cf377a551a5e28ea1d6748ed50860f1afa
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by cheuberg):

 Replying to [comment:6 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.

 very valid points, thank you. I now raise an exception.

 >
 > 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?

 I needed a fix a bug which did bite me somewhere else, see initial
 description. Of course, it would be nice to have that, too; but I'd prefer
 to leave that to a follow-up ticket and to have this functionality here
 soon.

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