gr_poly_preinv_set, _gr_poly_preinv_set, gr_poly_preinv_set_newton, _gr_poly_preinv_set_newton, _gr_poly_preinv_set_plain, gr_poly_preinv_set_sparse, _gr_poly_preinv_set_sparse, gr_poly_preinv_set_transformed, _gr_poly_preinv_set_transformed
#include <flint/gr_poly.h>int gr_poly_preinv_set(gr_poly_preinv_t P, const gr_poly_t f, gr_ctx_t ctx)sourceint _gr_poly_preinv_set(gr_poly_preinv_t P, gr_srcptr f, slong lenf, gr_ctx_t ctx)sourceint gr_poly_preinv_set_newton(gr_poly_preinv_t P, const gr_poly_t f, gr_ctx_t ctx)sourceint _gr_poly_preinv_set_newton(gr_poly_preinv_t P, gr_srcptr f, slong lenf, gr_ctx_t ctx)sourceint _gr_poly_preinv_set_plain(gr_poly_preinv_t P, gr_srcptr f, slong lenf, gr_ctx_t ctx)sourceint gr_poly_preinv_set_sparse(gr_poly_preinv_t P, const gr_poly_t f, gr_ctx_t ctx)sourceint _gr_poly_preinv_set_sparse(gr_poly_preinv_t P, gr_srcptr f, slong lenf, gr_ctx_t ctx)sourceint gr_poly_preinv_set_transformed(gr_poly_preinv_t P, const gr_poly_t f, gr_ctx_t ctx)sourceint _gr_poly_preinv_set_transformed(gr_poly_preinv_t P, gr_srcptr f, slong lenf, gr_ctx_t ctx)sourceSet P to the nonzero modulus f, storing a copy of it, with a representation chosen automatically, the Newton representation, the Newton representation without an inverse (ordinary division), the sparse representation or the transformed representation (GR_UNABLE if unavailable). Return GR_DOMAIN if f = 0 and GR_UNABLE if its leading coefficient cannot be inverted.
The automatic choice is the ring method GR_METHOD_POLY_PREINV_SET, which can take the degree, the sparsity and the coefficient size into account. The default gr_generic_poly_preinv_set chooses ordinary division for moduli of length at most 8, the sparse representation for at most 8 nonzero terms below the leading term, and the Newton representation otherwise. Rings with cheap elements use larger cutoffs for ordinary division (32 for nmod, with a sparse cutoff of 5 terms). nmod, fmpz_mod, mpn_mod and the contexts of gr_ctx_init_gr_poly_quotient override the method.
The FLINT team, “gr_poly_preinv_set, _gr_poly_preinv_set, gr_poly_preinv_set_newton, _gr_poly_preinv_set_newton, _gr_poly_preinv_set_plain, gr_poly_preinv_set_sparse, _gr_poly_preinv_set_sparse, gr_poly_preinv_set_transformed, _gr_poly_preinv_set_transformed (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/gr_poly_preinv_set.html (generated 2026-10-20).
@misc{flint-doc-gr-poly-gr-poly-preinv-set,
author = {{The FLINT team}},
title = {{gr\_poly\_preinv\_set, \_gr\_poly\_preinv\_set, gr\_poly\_preinv\_set\_newton, \_gr\_poly\_preinv\_set\_newton, \_gr\_poly\_preinv\_set\_plain, gr\_poly\_preinv\_set\_sparse, \_gr\_poly\_preinv\_set\_sparse, gr\_poly\_preinv\_set\_transformed, \_gr\_poly\_preinv\_set\_transformed (gr\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_poly/gr_poly_preinv_set.html},
note = {Generated 2026-10-20}
}