Re: Negative Modulus

From: Douglas A. Gwyn (dagwyn_at_comcast.net)
Date: 03/14/04


Date: Sun, 14 Mar 2004 15:45:17 -0500

Mok-Kong Shen wrote:
> Both answers are correct. ...

Actually the real issue is which of the infinite possibilities should be
chosen for "the" answer. For positive modulus m the convention is to
choose the answer in the range [0,m-1]. Since negative moduli are much
less commonly used, any such convention for them is not as well
established. There are probably some technical advantages in one choice
rather than the other; I'm pretty sure Knuth discusses this in Vol. 1 of
TAOCP, but my copy isn't at hand at the moment.



Relevant Pages

  • Re: abundance of irrationals!)
    ... Convention 1: A finite set is one which can be put into ... Infinite is defined as "not finite". ... > near zero, or at zero? ... but the values epsilon and x0 are variables. ...
    (sci.math)
  • Re: Negative Modulus
    ... Douglas A. Gwyn wrote: ... > Actually the real issue is which of the infinite possibilities should be ... It's interesting that Fortran has also a related function ... I 'vaguely' remember that Pascal's convention is not identical ...
    (sci.crypt)
  • Re: Cantor and the binary tree
    ... > And just this distinction is wrong for ordered sets where every element ... > has an initial segment. ... By convention the ... > Sets like N are potentially infinite but never actually infinite. ...
    (sci.math)