P is for Practical  
PerlMonks 
Re: Re: 0 illegal modulus?by nella (Novice) 
on Jun 13, 2001 at 03:58 UTC ( #87968=note: print w/ replies, xml )  Need Help?? 
Let me explain further: You have the integers:
If you consider these numbers mod 4, for example, the integers become:
So you can think of mod as a function (mapping) that takes all multiples of 4 to 0; 4*x mod 4 = 0 for all integers x. Now, the period of repitition in line (*) is obviously 4. (Since the multiples of 4 are all 4 integers apart, and only these are mapped to 0, the period must be 4.) It is similarly true in general that the period of repition is equal to the modulus. (Side note: this is true in the other degenerate case, mod 1. x mod 1 = 0 for every integer x.) What does a period of 0 mean, then, but that there is no repitition. A modulus of 0 does make sense; just as before, it means map multiples of the modulus to 0. The only multiple of 0 is 0, and so only 0 is mapped to 0. As there is no repitition, x mod 0 must be x. I hope this is clearer.
In Section
Meditations

