fmpz_mod_poly_find_distinct_nonzero_roots
Synopsis
#include <flint/fmpz_mod_poly.h>int fmpz_mod_poly_find_distinct_nonzero_roots(fmpz * roots, const fmpz_mod_poly_t P, const fmpz_mod_ctx_t ctx)sourceIf the nonzero polynomial has distinct nonzero roots in , writes them to roots[0], ..., roots[deg(P) - 1] and returns 1; otherwise returns 0. The modulus must be prime.
The function first splits by , which decides whether has the required form, and then splits the factors with _fmpz_mod_poly_split_rabin. See Finding roots that are expected to be distinct for the word-size version and Roots of polynomials over finite fields.
Cite this page
The FLINT team, “fmpz_mod_poly_find_distinct_nonzero_roots (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_find_distinct_nonzero_roots.html (generated 2026-11-02).
@misc{flint-doc-fmpz-mod-poly-fmpz-mod-poly-find-distinct-nonzero-roots,
author = {{The FLINT team}},
title = {{fmpz\_mod\_poly\_find\_distinct\_nonzero\_roots (fmpz\_mod\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mod_poly/fmpz_mod_poly_find_distinct_nonzero_roots.html},
note = {Generated 2026-11-02}
}