FLINT3.7.0-dev

_gr_poly_mod_matrix_rows_evaluate

Synopsis#include <flint/gr_poly.h>
int _gr_poly_mod_matrix_rows_evaluate(gr_ptr res, const gr_mat_t A, gr_srcptr h, slong n, gr_srcptr poly3, slong len3, gr_srcptr poly3inv, slong len3inv, gr_ctx_t ctx)source

The last step of Brent-Kung composition: sets res to ∑icihi mod poly3\sum_i c_i h^i \bmod \mathit{poly3}, where the cic_i are the rows of AA and hh (in Brent-Kung composition, gmg^m) and the rows have n=len3−1n = \mathit{len3} - 1 coefficients. For few rows this is Horner's rule; for many rows it uses rectangular splitting with powers h0,…,hkh^0, \ldots, h^k, k≈rk \approx \sqrt{r}, and unreduced products, so that only about r/k+kr/k + k modular reductions are needed for rr rows.

Cite this page

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