fmpz_mat_randdet
Synopsis
#include <flint/fmpz_mat.h>void fmpz_mat_randdet(fmpz_mat_t mat, flint_rand_t state, const fmpz_t det)sourceSets the square matrix mat to a random sparse matrix with determinant det and as few nonzero entries as possible: det is factored and its prime factors are distributed over n entries in distinct rows and columns. The matrix is zero if det is zero. fmpz_mat_randops turns it into a dense matrix with the same determinant.
Cite this page
The FLINT team, “fmpz_mat_randdet (fmpz_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mat/fmpz_mat_randdet.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mat-fmpz-mat-randdet,
author = {{The FLINT team}},
title = {{fmpz\_mat\_randdet (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_randdet.html},
note = {Generated 2026-10-20}
}