mpn_mod_mat_det
Synopsis
#include <flint/mpn_mod.h>Sets res to the determinant of the square matrix A, using cofactor expansion up to 4 \times 4, the division-free Berkowitz algorithm for 5 \times 5, and LU decomposition otherwise. If the LU decomposition meets a non-invertible pivot (for a composite modulus), the determinant is computed with the Berkowitz algorithm instead, so the function works for every modulus. Returns GR_DOMAIN if A is not square.
Guides#
Cite this page
The FLINT team, “mpn_mod_mat_det (mpn_mod.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_mod/mpn_mod_mat_det.html (generated 2026-10-20).
@misc{flint-doc-mpn-mod-mpn-mod-mat-det,
author = {{The FLINT team}},
title = {{mpn\_mod\_mat\_det (mpn\_mod.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_mod/mpn_mod_mat_det.html},
note = {Generated 2026-10-20}
}