FLINT3.7.0-dev

_gr_mat_charpoly_berkowitz, gr_mat_charpoly_berkowitz

Synopsis#include <flint/gr_mat.h>
int _gr_mat_charpoly_berkowitz(gr_ptr res, const gr_mat_t mat, gr_ctx_t ctx)source
int gr_mat_charpoly_berkowitz(gr_poly_t res, const gr_mat_t mat, gr_ctx_t ctx)source

The characteristic polynomial by Berkowitz's division-free algorithm [Ber1984], with O(n^4) ring operations (as O(n) matrix-vector products for each of n leading principal submatrices). Since it needs no divisions and no zero tests, it succeeds whenever the ring arithmetic does.

References#

  • [Ber1984] S. J. Berkowitz, "On computing the determinant in small parallel time using a small number of processors", Information Processing Letters 18 (1984), 147-150
Cite this page

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