TOPICS
Search

Least Absolute Remainder


For integers a and nonzero b, a least absolute remainder of a modulo b is an integer r for which

 a=bq+r

for some integer q, with |r| as small as possible. Equivalently, q is an integer nearest to a/b, so

 |r|<=(|b|)/2.

If a/b is a half-integer, there are two least absolute remainders with opposite signs. For example, 47=5·10-3, so -3 is a least absolute remainder of 47 modulo 10, whereas the ordinary nonnegative remainder is 7. Repeated least absolute remainders give a variant of the Euclidean algorithm.


See also

Euclidean Algorithm, Nearest Integer Function, Remainder

Explore with Wolfram|Alpha

Cite this as:

Weisstein, Eric W. "Least Absolute Remainder." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/LeastAbsoluteRemainder.html

Subject classifications