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 rr to aa modulo m≠0m \ne 0 in a range selected by sign: for sign <0< 0 the remainder of truncating division (∣r∣<∣m∣|r| < |m|, sign of aa), for 0 that of floor division (∣r∣<∣m∣|r| < |m|, sign of mm), and for sign >0> 0 the symmetric remainder −∣m∣<2r≤∣m∣-|m| < 2r \le |m|. The scratch variable tt 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-11-02).