FLINT3.7.0-dev

fmpz_mat_scalar_divexact_fmpz, fmpz_mat_scalar_divexact_si, fmpz_mat_scalar_divexact_ui

Synopsis#include <flint/fmpz_mat.h>
void fmpz_mat_scalar_divexact_fmpz(fmpz_mat_t B, const fmpz_mat_t A, const fmpz_t c)source
void fmpz_mat_scalar_divexact_si(fmpz_mat_t B, const fmpz_mat_t A, slong c)source
void fmpz_mat_scalar_divexact_ui(fmpz_mat_t B, const fmpz_mat_t A, ulong c)source

Sets B = A / c, assuming that c \ne 0 divides every entry of A; the result is undefined otherwise. Aliasing is allowed.

fmpz_mat_scalar_divexact_fmpz precomputes the division by c once for all entries (see _fmpz_vec_scalar_divexact_fmpz_strided), which makes it much faster than entrywise division when c is large.

Cite this page

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