_gr_poly_powmod_ui_binexp, gr_poly_powmod_ui_binexp, _gr_poly_powmod_ui_binexp_preinv, gr_poly_powmod_ui_binexp_preinv, _gr_poly_powmod_fmpz_binexp, gr_poly_powmod_fmpz_binexp, _gr_poly_powmod_fmpz_binexp_preinv, gr_poly_powmod_fmpz_binexp_preinv, _gr_poly_powmod_fmpz_sliding_preinv, gr_poly_powmod_fmpz_sliding_preinv, _gr_poly_powmod_x_fmpz_preinv, gr_poly_powmod_x_fmpz_preinv
#include <flint/gr_poly.h>int _gr_poly_powmod_ui_binexp(gr_ptr res, gr_srcptr poly, slong len, ulong e, gr_srcptr f, slong lenf, gr_ctx_t ctx)sourceint gr_poly_powmod_ui_binexp(gr_poly_t res, const gr_poly_t poly, ulong e, const gr_poly_t f, gr_ctx_t ctx)sourceint _gr_poly_powmod_ui_binexp_preinv(gr_ptr res, gr_srcptr poly, slong len, ulong e, gr_srcptr f, slong lenf, gr_srcptr finv, slong lenfinv, gr_ctx_t ctx)sourceint gr_poly_powmod_ui_binexp_preinv(gr_poly_t res, const gr_poly_t poly, ulong e, const gr_poly_t f, const gr_poly_t finv, gr_ctx_t ctx)sourceint _gr_poly_powmod_fmpz_binexp(gr_ptr res, gr_srcptr poly, slong len, const fmpz_t e, gr_srcptr f, slong lenf, gr_ctx_t ctx)sourceint gr_poly_powmod_fmpz_binexp(gr_poly_t res, const gr_poly_t poly, const fmpz_t e, const gr_poly_t f, gr_ctx_t ctx)sourceint _gr_poly_powmod_fmpz_binexp_preinv(gr_ptr res, gr_srcptr poly, slong len, const fmpz_t e, gr_srcptr f, slong lenf, gr_srcptr finv, slong lenfinv, gr_ctx_t ctx)sourceint gr_poly_powmod_fmpz_binexp_preinv(gr_poly_t res, const gr_poly_t poly, const fmpz_t e, const gr_poly_t f, const gr_poly_t finv, gr_ctx_t ctx)sourceint _gr_poly_powmod_fmpz_sliding_preinv(gr_ptr res, gr_srcptr poly, slong len, const fmpz_t e, ulong k, gr_srcptr f, slong lenf, gr_srcptr finv, slong lenfinv, gr_ctx_t ctx)sourceint gr_poly_powmod_fmpz_sliding_preinv(gr_poly_t res, const gr_poly_t poly, const fmpz_t e, ulong k, const gr_poly_t f, const gr_poly_t finv, gr_ctx_t ctx)sourceint _gr_poly_powmod_x_fmpz_preinv(gr_ptr res, const fmpz_t e, gr_srcptr f, slong lenf, gr_srcptr finv, slong lenfinv, gr_ctx_t ctx)sourceint gr_poly_powmod_x_fmpz_preinv(gr_poly_t res, const fmpz_t e, const gr_poly_t f, const gr_poly_t finv, gr_ctx_t ctx)sourceSet res to poly raised to the power modulo , by binary exponentiation, by sliding window exponentiation with window size k ( chooses it from the size of ), or, for the x versions, with shifts instead of multiplications by the base.
The underscore versions with a base require a reduced base (), and , write coefficients (zero-padded, not normalised), and allow res to be poly; the x version requires . The preinv versions accept , in which case ordinary division is used. The intermediate powers are kept at their actual length, so that powers of a polynomial of small degree, such as , cost nothing until the degree reaches ; the iterated Frobenius is thus free while .
The FLINT team, “_gr_poly_powmod_ui_binexp, gr_poly_powmod_ui_binexp, _gr_poly_powmod_ui_binexp_preinv, gr_poly_powmod_ui_binexp_preinv, _gr_poly_powmod_fmpz_binexp, gr_poly_powmod_fmpz_binexp, _gr_poly_powmod_fmpz_binexp_preinv, gr_poly_powmod_fmpz_binexp_preinv, _gr_poly_powmod_fmpz_sliding_preinv, gr_poly_powmod_fmpz_sliding_preinv, _gr_poly_powmod_x_fmpz_preinv, gr_poly_powmod_x_fmpz_preinv (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_powmod_ui_binexp.html (generated 2026-11-02).
@misc{flint-doc-gr-poly-gr-poly-powmod-ui-binexp,
author = {{The FLINT team}},
title = {{\_gr\_poly\_powmod\_ui\_binexp, gr\_poly\_powmod\_ui\_binexp, \_gr\_poly\_powmod\_ui\_binexp\_preinv, gr\_poly\_powmod\_ui\_binexp\_preinv, \_gr\_poly\_powmod\_fmpz\_binexp, gr\_poly\_powmod\_fmpz\_binexp, \_gr\_poly\_powmod\_fmpz\_binexp\_preinv, gr\_poly\_powmod\_fmpz\_binexp\_preinv, \_gr\_poly\_powmod\_fmpz\_sliding\_preinv, gr\_poly\_powmod\_fmpz\_sliding\_preinv, \_gr\_poly\_powmod\_x\_fmpz\_preinv, gr\_poly\_powmod\_x\_fmpz\_preinv (gr\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_poly/_gr_poly_powmod_ui_binexp.html},
note = {Generated 2026-11-02}
}