flint_mpn_pow
Synopsis
#include <flint/mpn_extras.h>Low zero limbs of are stripped and restored as an offset in the output; trailing zero bits are shifted out only when the base is short (at most 8 limbs) and restored with one shift of the result. While the power fits in one or two limbs, fixed-size arithmetic is used. Afterwards the running power alternates between res and a scratch buffer without copying: the parity of the remaining out-of-place operations is chosen so that the final product lands in res, and multiplications by a single-limb base are done in place with mpn_mul_1.
Cite this page
The FLINT team, “flint_mpn_pow (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/flint_mpn_pow.html (generated 2026-11-02).
@misc{flint-doc-mpn-extras-flint-mpn-pow,
author = {{The FLINT team}},
title = {{flint\_mpn\_pow (mpn\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_extras/flint_mpn_pow.html},
note = {Generated 2026-11-02}
}