FLINT3.7.0-dev

fmpz_mat_snf_diagonal

Synopsis#include <flint/fmpz_mat.h>
void fmpz_mat_snf_diagonal(fmpz_mat_t S, const fmpz_mat_t A)source

Sets S to the Smith normal form of the diagonal matrix A, by replacing pairs of diagonal entries by their gcd and lcm. A need not be square; that it is diagonal is not checked, and only its diagonal is used. S may be A.

Cite this page

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