TOPICS
Search

Minimal Residue


The minimal residue of a (mod m) is the value b or b-m, whichever is smaller in absolute value, where a=b (mod m). If m=2b (so that b=|b-m|), then the minimal residue is taken as -b. The table below illustrates the common (positive) and minimal residues for 0, 1, 2, and 3 (mod 4).

ncommon residue n (mod 4)minimal residue n (mod 4)
000
111
22-2
33-1

The minimal residue is implemented in the Wolfram Language as Mod[a, m, -m/2].


See also

Common Residue, Congruence, Modulus, Residue

Explore with Wolfram|Alpha

Cite this as:

Weisstein, Eric W. "Minimal Residue." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/MinimalResidue.html

Subject classifications