Skip to content

Commit 01378dc

Browse files
committed
Doctest roth_ruckenstein_root_finder
1 parent 458ffc2 commit 01378dc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/sage/coding/guruswami_sudan/gs_decoder.py

+9
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ def roth_ruckenstein_root_finder(p, maxd=None, precision=None):
8888
"""
8989
Wrapper for Roth-Ruckenstein algorithm to compute the roots of a polynomial
9090
with coefficients in ``F[x]``.
91+
92+
TESTS::
93+
94+
sage: from sage.coding.guruswami_sudan.gs_decoder import roth_ruckenstein_root_finder
95+
sage: R.<x> = GF(13)[]
96+
sage: S.<y> = R[]
97+
sage: p = (y - x^2 - x - 1) * (y + x + 1)
98+
sage: roth_ruckenstein_root_finder(p, maxd = 2)
99+
[12*x + 12, x^2 + x + 1]
91100
"""
92101
gens = p.parent().gens()
93102
if len(gens) == 2:

0 commit comments

Comments
 (0)