FLINT3.7.0-dev

_gr_poly_compose_mod_brent_kung_precomp_preinv, gr_poly_compose_mod_brent_kung_precomp_preinv

Synopsis#include <flint/gr_poly.h>
int _gr_poly_compose_mod_brent_kung_precomp_preinv(gr_ptr res, gr_srcptr f, slong lenf, const gr_mat_t A, gr_srcptr h, slong lenh, gr_srcptr hinv, slong lenhinv, gr_ctx_t ctx)source
int gr_poly_compose_mod_brent_kung_precomp_preinv(gr_poly_t res, const gr_poly_t f, const gr_mat_t A, const gr_poly_t h, const gr_poly_t hinv, gr_ctx_t ctx)source

Set res to f(g) \bmod h given the matrix A of powers of g from gr_poly_precompute_matrix, so that several compositions with the same g and h share the baby steps. h must be nonzero, f must have smaller degree than h, and hinv must be the inverse of the reversal of h. The underscore version does not allow the output to be aliased with an input.

Cite this page

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