Kagamin wrote: > Jérôme M. Berger Wrote: > >>> -3 mod 3 = 0 >>> -2 mod 3 = -2 >>> -1 mod 3 = -1 >>> 0 mod 3 = 0 >> Note that from a strictly mathematical point of view, this result >> is valid: for all x and all n, x-(x%n) is a multiple of n. > > It's rather (x/n)+(x%n)==x
That is (part of) the definition of the *remainder* operation. The
definition of *modulus* is looser.
Jerome
--
mailto:[email protected]
http://jeberger.free.fr
Jabber: [email protected]
signature.asc
Description: OpenPGP digital signature
