FLINT3.7.0-dev

nmod_mpoly_pow_ui, nmod_mpoly_pow_fmpz

Synopsis#include <flint/nmod_mpoly.h>
int nmod_mpoly_pow_ui(nmod_mpoly_t A, const nmod_mpoly_t B, ulong k, const nmod_mpoly_ctx_t ctx)source
int nmod_mpoly_pow_fmpz(nmod_mpoly_t A, const nmod_mpoly_t B, const fmpz_t k, const nmod_mpoly_ctx_t ctx)source

Set A to BkB^k, with B0=1B^0 = 1 (zero if n=1n = 1). nmod_mpoly_pow_fmpz throws if k<0k < 0, and returns 0 (failure) if kk does not fit an slong and B has more than one term; otherwise both return 1. For a prime modulus p≤99999p \le 99999, nmod_mpoly_pow_ui writes k=∑jkjpjk = \sum_j k_j p^j and uses Bpj=B(x0pj,…)B^{p^j} = B(x_0^{p^j}, \ldots), so that only the powers BkjB^{k_j} with kj<pk_j < p are computed by repeated multiplication.

Guides#

Cite this page

The FLINT team, “nmod_mpoly_pow_ui, nmod_mpoly_pow_fmpz (nmod_mpoly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_mpoly/nmod_mpoly_pow_ui.html (generated 2026-11-02).