FLINT3.7.0-dev

_gr_poly_preinv_powmod_fmpz_binexp, gr_poly_preinv_powmod_fmpz_binexp, _gr_poly_preinv_powmod_fmpz_sliding, gr_poly_preinv_powmod_fmpz_sliding, _gr_poly_preinv_powmod_x_fmpz, gr_poly_preinv_powmod_x_fmpz

Synopsis#include <flint/gr_poly.h>
int _gr_poly_preinv_powmod_fmpz_binexp(gr_ptr res, gr_srcptr poly, slong len, const fmpz_t e, const gr_poly_preinv_t P, gr_ctx_t ctx)source
int gr_poly_preinv_powmod_fmpz_binexp(gr_poly_t res, const gr_poly_t poly, const fmpz_t e, const gr_poly_preinv_t P, gr_ctx_t ctx)source
int _gr_poly_preinv_powmod_fmpz_sliding(gr_ptr res, gr_srcptr poly, slong len, const fmpz_t e, ulong k, const gr_poly_preinv_t P, gr_ctx_t ctx)source
int gr_poly_preinv_powmod_fmpz_sliding(gr_poly_t res, const gr_poly_t poly, const fmpz_t e, ulong k, const gr_poly_preinv_t P, gr_ctx_t ctx)source
int _gr_poly_preinv_powmod_x_fmpz(gr_ptr res, const fmpz_t e, const gr_poly_preinv_t P, gr_ctx_t ctx)source
int gr_poly_preinv_powmod_x_fmpz(gr_poly_t res, const fmpz_t e, const gr_poly_preinv_t P, gr_ctx_t ctx)source

Modular exponentiation with the precomputed modulus: binary exponentiation, sliding window exponentiation with window size k (0 for an automatic choice), and powers of x. The algorithms and the conventions of the underscore versions are those of the corresponding gr_poly_powmod functions below.

Cite this page

The FLINT team, “_gr_poly_preinv_powmod_fmpz_binexp, gr_poly_preinv_powmod_fmpz_binexp, _gr_poly_preinv_powmod_fmpz_sliding, gr_poly_preinv_powmod_fmpz_sliding, _gr_poly_preinv_powmod_x_fmpz, gr_poly_preinv_powmod_x_fmpz (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_preinv_powmod_fmpz_binexp.html (generated 2026-10-20).