FLINT3.7.0-dev

flint_mpn_pow_bound_limbs

Synopsis#include <flint/mpn_extras.h>
mp_size_t flint_mpn_pow_bound_limbs(mp_srcptr x, mp_size_t xn, ulong e)source

Returns an upper bound for the number of limbs of x^e, including one limb of slack for the intermediate products of flint_mpn_pow. Requires x_{xn-1} \ne 0. For small results the bound e \cdot \mathrm{bits}(x) is used; otherwise e \log_2 x is evaluated in double precision from the top two limbs and rounded up, which is essentially tight also for small bases with large exponents.

Cite this page

The FLINT team, “flint_mpn_pow_bound_limbs (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_bound_limbs.html (generated 2026-10-20).