_nmod_poly_pow, nmod_poly_pow, _nmod_poly_pow_binexp, nmod_poly_pow_binexp
#include <flint/nmod_poly.h>void nmod_poly_pow(nmod_poly_t res, const nmod_poly_t poly, ulong e)sourcevoid nmod_poly_pow_binexp(nmod_poly_t res, const nmod_poly_t poly, ulong e)sourceSet res to \mathit{poly}^e by binary exponentiation; the two pairs of functions are the same. The underscore versions require \mathit{len} \ge 1 and e \ge 1, write (\mathit{len} - 1) e + 1 coefficients and do not allow aliasing. nmod_poly_pow returns 1 for 0^0, but nmod_poly_pow_binexp returns 0.
A factor x^k of poly is removed first and contributes x^{ke}. The squarings and multiplications by poly are products truncated to the length of the result, so the cost is dominated by the last squaring, about M((\mathit{len} - 1) e).
The FLINT team, “_nmod_poly_pow, nmod_poly_pow, _nmod_poly_pow_binexp, nmod_poly_pow_binexp (nmod_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_poly/_nmod_poly_pow.html (generated 2026-10-20).
@misc{flint-doc-nmod-poly-nmod-poly-pow,
author = {{The FLINT team}},
title = {{\_nmod\_poly\_pow, nmod\_poly\_pow, \_nmod\_poly\_pow\_binexp, nmod\_poly\_pow\_binexp (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_pow.html},
note = {Generated 2026-10-20}
}