FLINT3.7.0-dev

_fmpz_smod

Synopsis#include <flint/fmpz.h>
void _fmpz_smod(fmpz_t r, const fmpz_t a, const fmpz_t m, int sign, fmpz_t t)source

Sets r to a modulo m \ne 0 in a range selected by sign: for sign < 0 the remainder of truncating division (|r| < |m|, sign of a), for 0 that of floor division (|r| < |m|, sign of m), and for sign > 0 the symmetric remainder -|m| < 2r \le |m|. The scratch variable t must not alias any other argument.

Cite this page

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