floor, ceiling, and friends



Stavros wrote:

> It seems to me that nummod is more fundamental than the current mod,
> which should be renamed polymod or some such, leaving the name mod for
> nummod.  How much chaos would this cause?

I would be in favor of such a scheme, if only I could figure out what mod
is supposed to do ... After reading the descriptions of mod and modulus,
I'm pretty confused, and trying a few examples doesn't help me any.

mod(p,q) seems to be something different from remainder(p,q) --
Can someone explain what mod does? 

best,
Robert Dodier