Skip to content

Commit 6a174e4

Browse files
committed
Fix is_power(::PolyRingElem, ::Int)
1 parent 6efe513 commit 6a174e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generic/Misc/Poly.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function is_power(a::PolyRingElem, n::Int)
1313
fl || return false, a
1414
f = factor(a)
1515
all(i -> i % n == 0, values(f.fac)) || return false, a
16-
return true, x*prod(p^div(k, n) for (p, k) = f.fac)
16+
return true, f.unit * prod(p^div(k, n) for (p, k) = f.fac)
1717
end
1818

1919
################################################################################

0 commit comments

Comments
 (0)