nmod_poly_mat_sqr, nmod_poly_mat_sqr_classical, nmod_poly_mat_sqr_KS, nmod_poly_mat_sqr_interpolate
#include <flint/nmod_poly_mat.h>void nmod_poly_mat_sqr(nmod_poly_mat_t B, const nmod_poly_mat_t A)sourcevoid nmod_poly_mat_sqr_classical(nmod_poly_mat_t B, const nmod_poly_mat_t A)sourcevoid nmod_poly_mat_sqr_KS(nmod_poly_mat_t B, const nmod_poly_mat_t A)sourcevoid nmod_poly_mat_sqr_interpolate(nmod_poly_mat_t B, const nmod_poly_mat_t A)sourceSets 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.
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).
@misc{flint-doc-nmod-poly-mat-nmod-poly-mat-sqr,
author = {{The FLINT team}},
title = {{nmod\_poly\_mat\_sqr, nmod\_poly\_mat\_sqr\_classical, nmod\_poly\_mat\_sqr\_KS, nmod\_poly\_mat\_sqr\_interpolate (nmod\_poly\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod_poly_mat/nmod_poly_mat_sqr.html},
note = {Generated 2026-10-20}
}