FLINT3.7.0-dev

_fmpz_mod_poly_minpoly, fmpz_mod_poly_minpoly

Synopsis#include <flint/fmpz_mod_poly.h>
slong _fmpz_mod_poly_minpoly(fmpz * poly, const fmpz * seq, slong len, const fmpz_mod_ctx_t ctx)source
void fmpz_mod_poly_minpoly(fmpz_mod_poly_t poly, const fmpz * seq, slong len, const fmpz_mod_ctx_t ctx)source

Set poly to a minimal generating polynomial of (seq, len), choosing the Berlekamp–Massey algorithm for \mathit{len} < \max(200, 530 - 22s), s being the number of limbs of the modulus, and the half-GCD algorithm otherwise. The underscore version needs space for \mathit{len} + 1 coefficients, returns the length of poly and does not allow aliasing.

Cite this page

The FLINT team, “_fmpz_mod_poly_minpoly, fmpz_mod_poly_minpoly (fmpz_mod_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mod_poly/_fmpz_mod_poly_minpoly.html (generated 2026-10-20).