_nmod_poly_powers_mod_preinv_naive, nmod_poly_powers_mod_naive
Synopsis
#include <flint/nmod_poly.h>void _nmod_poly_powers_mod_preinv_naive(nn_ptr * res, nn_srcptr f, slong flen, slong n, nn_srcptr g, slong glen, nn_srcptr ginv, slong ginvlen, const nmod_t mod)sourcevoid nmod_poly_powers_mod_naive(nmod_poly_struct * res, const nmod_poly_t f, slong n, const nmod_poly_t g)sourceSet res[i] to f^i \bmod g for 0 \le i < n, computing f^i as f^{\lfloor i/2 \rfloor} f^{\lceil i/2 \rceil}. The non-underscore version takes an array of n initialised polynomials, reduces f first, and throws FLINT_ERROR for g = 0; for f = 0 or constant g it sets res[0] to 1 and the others to 0. The underscore version requires 1 \le \mathit{flen} < \mathit{glen}, ginv as for _nmod_poly_mulmod_preinv, and n arrays of \mathit{glen} - 1 coefficients, all of which are written.
Cite this page
The FLINT team, “_nmod_poly_powers_mod_preinv_naive, nmod_poly_powers_mod_naive (nmod_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_poly/_nmod_poly_powers_mod_preinv_naive.html (generated 2026-10-20).
@misc{flint-doc-nmod-poly-nmod-poly-powers-mod-preinv-naive,
author = {{The FLINT team}},
title = {{\_nmod\_poly\_powers\_mod\_preinv\_naive, nmod\_poly\_powers\_mod\_naive (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_poly_powers_mod_preinv_naive.html},
note = {Generated 2026-10-20}
}