FLINT3.7.0-dev

_nmod_add, _nmod_sub

Synopsis#include <flint/nmod.h>
ulong _nmod_add(ulong a, ulong b, nmod_t mod)source
ulong _nmod_sub(ulong a, ulong b, nmod_t mod)source

Branch-free versions of nmod_add and nmod_sub. Require n \le 2^{\mathtt{FLINT\_BITS} - 1}; for larger n the result is wrong.

Guides#

Cite this page

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