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

Commit

Permalink
Correcting mistakes + docstring formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrenet committed Feb 4, 2015
1 parent 053a30c commit c7b5f68
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/sage/rings/polynomial/polynomial_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -6719,10 +6719,10 @@ cdef class Polynomial(CommutativeAlgebraElement):
A cyclotomic polynomial is a monic, irreducible polynomial such that
all roots are roots of unity.
TODO:
.. TODO::
Calling ``poliscyclo()`` from libpari would be much faster. See
ticket #17730.
Calling ``poliscyclo()`` from libpari would be much faster. See
ticket #17730.
ALGORITHM:
Expand All @@ -6745,7 +6745,7 @@ cdef class Polynomial(CommutativeAlgebraElement):
False
sage: (x^2 + x + 1).is_cyclotomic(certificate=True)
3
sage: (x^2 - x + 1).is_cyclotomic(certificate=True)
sage: (x^2 + 2*x + 1).is_cyclotomic(certificate=True)
0
Test first 100 cyclotomic polynomials::
Expand Down Expand Up @@ -6779,9 +6779,6 @@ cdef class Polynomial(CommutativeAlgebraElement):
for cyclotomic polynomials, Symbolic and Algebraic Computation (1989)
pp. 244 -- 251, :doi:`10.1007/3-540-51084-2_22`
"""
if certificate:
return self.__gp__().poliscyclo()

if self.base_ring().characteristic() != 0:
raise NotImplementedError("not implemented in non-zero characteristic")
if self.base_ring() != ZZ:
Expand All @@ -6791,6 +6788,9 @@ cdef class Polynomial(CommutativeAlgebraElement):
return False
return f.is_cyclotomic()

if certificate:
return self._gp_().poliscyclo()

if not self.is_monic():
return False

Expand Down

0 comments on commit c7b5f68

Please sign in to comment.