nmod_pow_ui, nmod_pow_fmpz
Synopsis
#include <flint/nmod.h>nmod_pow_ui uses binary exponentiation with n_mulmod_preinv on the normalised modulus. For odd and it uses Montgomery multiplication instead. nmod_pow_fmpz calls n_powmod2_fmpz_preinv, after inverting with n_gcdinv if the exponent is negative, as n_powmod2_preinv does.
Guides#
Cite this page
The FLINT team, “nmod_pow_ui, nmod_pow_fmpz (nmod.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod/nmod_pow_ui.html (generated 2026-11-02).
@misc{flint-doc-nmod-nmod-pow-ui,
author = {{The FLINT team}},
title = {{nmod\_pow\_ui, nmod\_pow\_fmpz (nmod.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod/nmod_pow_ui.html},
note = {Generated 2026-11-02}
}