#20086: rational powers in ZZ[X] and QQ[X]
-------------------------------------+-------------------------------------
       Reporter:  cheuberg           |        Owner:
           Type:  defect             |       Status:  needs_info
       Priority:  major              |    Milestone:  sage-7.2
      Component:  basic arithmetic   |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Clemens            |    Reviewers:  Benjamin Hackl,
  Heuberger, Vincent Delecroix,      |  Vincent Delecroix
  Benjamin Hackl                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:  public/20086       |  6f91df97a81fa094c04583314ad38cd5fd199cdb
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by behackl):

 Replying to [comment:58 nbruin]:
 > Taking an n-th root of an element in a ring R by computing a
 factorization is an insane way to go about it. A much better generic
 strategy is to hope that the univariate polynomial ring over R has a root
 finding algorithm and see if the polynomial `x^n-a` has a root. You will
 see that:
 > - it actually has a decent performance over QQ (although there the
 algorithm should really be special-cases)
 > - it will work over most fields, including the ones that are not
 constructed as fraction fields of rings with a factorization algorithm.
 > - you don't have to mess around with the unit part that a factorization
 algorithm probably won't recognize.

 While I like the general idea of this approach, I'm for discussing it on a
 follow-up ticket; see it as a "performance enhancement" of this
 implementation. Also, I'm not sure how exactly the root-finding algorithm
 for these univariate polynomial rings can be properly motivated, for me
 neither `roots()` nor `any_root()` did the job:

 {{{
 sage: R.<x> = QQ[]
 sage: P.<X> = R[]
 sage: a = X^2 - (x^2 + 2*x + 1)
 sage: a.any_root(R)
 Traceback (most recent call last):
 ...
 TypeError: Unable to coerce Principal ideal (1) of Univariate Polynomial
 Ring in x over Rational Field (<class
 'sage.rings.polynomial.ideal.Ideal_1poly_field'>) to Rational
 }}}

 Do you strongly object against setting this back to `positive_review`?

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