nmod_berlekamp_massey_reduce
#include <flint/nmod_poly.h>int nmod_berlekamp_massey_reduce(nmod_berlekamp_massey_t B)sourceBrings V and R up to date with all points added and returns 1 if V changed, 0 otherwise.
The new points are absorbed into R and the remainder sequence is continued with Euclidean steps, or with nmod_poly_hgcd when at least 10 more degrees have to be removed, until \deg R < m/2; the algorithm and its correctness are described in Berlekamp–Massey as a partial Euclidean algorithm. For example, after adding 1, 1, 2, 3 the function returns 1 with V = x^2 - x - 1 (up to a constant factor) and \deg R < \deg V; adding 5, 8 and reducing again returns 0.
The FLINT team, “nmod_berlekamp_massey_reduce (nmod_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_poly/nmod_berlekamp_massey_reduce.html (generated 2026-10-20).
@misc{flint-doc-nmod-poly-nmod-berlekamp-massey-reduce,
author = {{The FLINT team}},
title = {{nmod\_berlekamp\_massey\_reduce (nmod\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod_poly/nmod_berlekamp_massey_reduce.html},
note = {Generated 2026-10-20}
}