gr_generic_pow_ui_sliding, gr_generic_pow_fmpz_sliding
Synopsis
#include <flint/gr_generic.h>Compute x^e for e \ge 0 by the sliding window method with a window size k between 1 and 11 bits chosen from the bit length of e, using fewer multiplications than binary exponentiation for large exponents at the cost of a table of 2^{k-1} odd powers. gr_generic_pow_fmpz_sliding returns GR_DOMAIN for negative e. The output may alias the input.
Cite this page
The FLINT team, “gr_generic_pow_ui_sliding, gr_generic_pow_fmpz_sliding (gr_generic.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_generic/gr_generic_pow_ui_sliding.html (generated 2026-10-20).
@misc{flint-doc-gr-generic-gr-generic-pow-ui-sliding,
author = {{The FLINT team}},
title = {{gr\_generic\_pow\_ui\_sliding, gr\_generic\_pow\_fmpz\_sliding (gr\_generic.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_generic/gr_generic_pow_ui_sliding.html},
note = {Generated 2026-10-20}
}