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

Commit 3088973

Browse files
committed
Special code only works for field... of course!
1 parent 139ac60 commit 3088973

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sage/rings/polynomial/polynomial_element.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1849,7 +1849,7 @@ cdef class Polynomial(CommutativeAlgebraElement):
18491849
return self.parent()(v, check=False)
18501850
if right > 20: # no gain below
18511851
p = self.parent().characteristic()
1852-
if p > 2 and p <= right or p == 2 and right > 40: # characteristic 2 is special
1852+
if (p > 2 and p <= right or p == 2 and right > 40) and self.base_ring().is_field(): # characteristic 2 is special
18531853
q, r = right.quo_rem(p)
18541854
x = self.parent().gen()
18551855
if self.parent().base_ring().is_finite():

0 commit comments

Comments
 (0)