_fmpz_mod_mat_charpoly, fmpz_mod_mat_charpoly
Synopsis
#include <flint/fmpz_mod_mat.h>void _fmpz_mod_mat_charpoly(fmpz * p, const fmpz_mod_mat_t M, const fmpz_mod_ctx_t ctx)sourcevoid fmpz_mod_mat_charpoly(fmpz_mod_poly_t p, const fmpz_mod_mat_t M, const fmpz_mod_ctx_t ctx)sourceSet to the characteristic polynomial of the square matrix ; the underscore version writes its coefficients for an matrix. fmpz_mod_mat_charpoly throws an exception if is not square. These work for every modulus: the generic fmpz_mod ring uses Danilevsky's algorithm for and falls back to the division-free Berkowitz algorithm when it fails, and uses Berkowitz for smaller .
Guides#
Cite this page
The FLINT team, “_fmpz_mod_mat_charpoly, fmpz_mod_mat_charpoly (fmpz_mod_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mod_mat/_fmpz_mod_mat_charpoly.html (generated 2026-11-02).
@misc{flint-doc-fmpz-mod-mat-fmpz-mod-mat-charpoly,
author = {{The FLINT team}},
title = {{\_fmpz\_mod\_mat\_charpoly, fmpz\_mod\_mat\_charpoly (fmpz\_mod\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mod_mat/_fmpz_mod_mat_charpoly.html},
note = {Generated 2026-11-02}
}