FLINT3.7.0-dev

_gr_mat_gr_poly_evaluate, gr_mat_gr_poly_evaluate

Synopsis#include <flint/gr_mat.h>
int _gr_mat_gr_poly_evaluate(gr_mat_t res, gr_srcptr poly, slong len, const gr_mat_t mat, gr_ctx_t ctx)source
int gr_mat_gr_poly_evaluate(gr_mat_t res, const gr_poly_t poly, const gr_mat_t mat, gr_ctx_t ctx)source

Set res to f(A) for a scalar polynomial f and a square matrix A, by rectangular splitting [PS1973]: about 2\sqrt{\mathit{len}} matrix products and O(\mathit{len}) scalar multiplications.

References#

  • [PS1973] M. S. Paterson and L. J. Stockmeyer, "On the number of nonscalar multiplications necessary to evaluate polynomials", SIAM J. Comput (1973)
Cite this page

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