#19171: Add a method `divides` to Polynomial
-------------------------------------+-------------------------------------
       Reporter:  bruno              |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-7.3
      Component:  commutative        |   Resolution:
  algebra                            |
       Keywords:  polynomial,        |    Merged in:
  division                           |
        Authors:  Bruno Grenet       |    Reviewers:  Vincent Delecroix
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/bruno/t19171_divides_poly        |  ac43c02c86eb8884bc3d7fa4013f78aef1e34803
   Dependencies:  #16649             |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by bruno):

 I am not sure I fully understand your latest comments:

 > Since one is always a unit the {{{if self.is_one(): return True}}} would
 better be inside the block {{{except NotImplementedError:}}}.

 Do you mean adding a {{{try: ... except NotImplementedError:}}}
 construction? Because if I add this test say right below the test {{{if
 self.is_unit(): return True}}}, an exception will be raised in the cases
 where {{{is_unit}}} is not implemented but {{{is_one}}} is.



 > And why not using {{{quo_rem}}} instead of catching a potential
 {{{ArithmeticError}}}?

 Using {{{p % self}}} is really the same as {{{ p.quo_rem(self)[1] }}} so I
 do not see the difference.

--
Ticket URL: <https://trac.sagemath.org/ticket/19171#comment:15>
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