Remainder - The Case of General Integers

The Case of General Integers

If a and d are integers, with d non-zero, then a remainder is an integer r such that a = qd + r for some integer q, and with |r| < |d|.

When defined this way, there are two possible remainders. For example, the division of −42 by −5 can be expressed as either

−42 = 9×(−5) + 3

as is usual for mathematicians, or

−42 = 8×(−5) + (−2).

So the remainder is then either 3 or −2.

This ambiguity in the value of the remainder can be quite serious computationally; for mission critical computing systems, the wrong choice can lead to dangerous consequences. In the case above, the negative remainder is obtained from the positive one just by subtracting 5, which is d. This holds in general. When dividing by d, if the positive remainder is r1, and the negative one is r2, then

r1 = r2 + d.

Read more about this topic:  Remainder

Famous quotes containing the words case and/or general:

    If you have any information or evidence regarding the O.J. Simpson case, press 2 now. If you are an expert in fields relating to the O.J. Simpson case and would like to offer your services, press 3 now. If you would like the address where you can send a letter of support to O.J. Simpson, press 1 now. If you are seeking legal representation from the law offices of Robert L. Shapiro, press 4 now.
    Advertisement. Aired August 8, 1994 by Tom Snyder on TV station CNBC. Chicago Sun Times, p. 11 (July 24, 1994)

    That sort of half sigh, which, accompanied by two or three slight nods of the head, is pity’s small change in general society.
    Charles Dickens (1812–1870)