FLINT3.7.0-dev

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)source

Searches primes pp above 2592^{59} for one modulo which the square matrix AA is nonsingular, sets Ainv to A−1 mod pA^{-1} \bmod p and returns pp. Returns 0 if AA 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)∣|\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-11-02).