FLINT3.7.0-dev

nmod_poly_mat_sqr, nmod_poly_mat_sqr_classical, nmod_poly_mat_sqr_KS, nmod_poly_mat_sqr_interpolate

Synopsis#include <flint/nmod_poly_mat.h>
void nmod_poly_mat_sqr(nmod_poly_mat_t B, const nmod_poly_mat_t A)source
void nmod_poly_mat_sqr_classical(nmod_poly_mat_t B, const nmod_poly_mat_t A)source
void nmod_poly_mat_sqr_KS(nmod_poly_mat_t B, const nmod_poly_mat_t A)source
void nmod_poly_mat_sqr_interpolate(nmod_poly_mat_t B, const nmod_poly_mat_t A)source

Sets B = A^2 for a square matrix A; B may be A. The classical version uses five polynomial products for 2 \times 2 matrices; the others are the squaring versions of the multiplication methods. nmod_poly_mat_sqr uses the classical algorithm for dimension less than 10. Above, it uses evaluation and interpolation for a prime modulus of more than \beta/4 bits that is at least 2\ell - 1, where \ell is the largest length of an entry, and dimension above 80 + \sqrt{\ell}; otherwise Kronecker substitution, or the classical algorithm for entries of length above 128.

Cite this page

The FLINT team, “nmod_poly_mat_sqr, nmod_poly_mat_sqr_classical, nmod_poly_mat_sqr_KS, nmod_poly_mat_sqr_interpolate (nmod_poly_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_poly_mat/nmod_poly_mat_sqr.html (generated 2026-10-20).