fmpz_mat_find_good_prime_and_invert
Synopsis
#include <flint/fmpz_mat.h>ulong fmpz_mat_find_good_prime_and_invert(nmod_mat_t Ainv, const fmpz_mat_t A, const fmpz_t det_bound)sourceSearches primes p above 2^{59} for one modulo which the square matrix A is nonsingular, sets Ainv to A^{-1} \bmod p and returns p. Returns 0 if A is proven singular, by an exact kernel vector or by the product of the primes tested exceeding det_bound, an upper bound for |\det(A)|.
Cite this page
The FLINT team, “fmpz_mat_find_good_prime_and_invert (fmpz_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mat/fmpz_mat_find_good_prime_and_invert.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mat-fmpz-mat-find-good-prime-and-invert,
author = {{The FLINT team}},
title = {{fmpz\_mat\_find\_good\_prime\_and\_invert (fmpz\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mat/fmpz_mat_find_good_prime_and_invert.html},
note = {Generated 2026-10-20}
}