FLINT3.7.0-dev

_gr_poly_precompute_matrix, gr_poly_precompute_matrix

Synopsis#include <flint/gr_poly.h>
int _gr_poly_precompute_matrix(gr_mat_t A, gr_srcptr f, gr_srcptr g, slong leng, gr_srcptr ginv, slong lenginv, gr_ctx_t ctx)source
int gr_poly_precompute_matrix(gr_mat_t A, const gr_poly_t f, const gr_poly_t g, const gr_poly_t ginv, gr_ctx_t ctx)source

Set row i of A to f^i \bmod g for 0 \le i < m, m = \lfloor \sqrt{\deg g} \rfloor + 1, the baby steps of Brent-Kung modular composition with argument f and modulus g. A must have exactly m rows and \deg g columns (GR_DOMAIN otherwise, for the non-underscore version), g must be nonzero and ginv must be the inverse of the reversal of g.

Cite this page

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