Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
16516: Better primitive part
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrenet committed May 19, 2017
1 parent 2a96eb2 commit df27d49
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/sage/rings/integer_ring.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1318,9 +1318,11 @@ cdef class IntegerRing_class(PrincipalIdealDomain):
# should be corrected. See
# <https://groups.google.com/forum/#!topic/sage-devel/DP_R3rl0vH0>
if p.parent().is_sparse():
p = p.parent()(p/(p.content().gen()))
cont = p.content().gen()
else:
p = p.parent()(p/p.content())
cont = p.content()
if not cont.is_unit():
p = p.map_coefficients(lambda c:c//cont)

cdef list roots = []

Expand Down

0 comments on commit df27d49

Please sign in to comment.