Re: modulo operation



In article <1132280438.460095.255080@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Pubkeybreaker <Robert_silverman@xxxxxxxxxxxx> wrote:
>"There are, however, IIRC, 'mod' operators, in various computer
>languages, for which 'a mod b'and 'a mod -b' differ. "
>
>Excuse me for thinking that the newsgroup is sci.MATH and
>not comp.*

The problem, however, was that the original poster asked a question
about the mod ->operator<-, and your response was about the relation
"congruent modulo C"; the latter is not an operator. There are many
extant definitions of a "mod" operator in mathematics, e.g.,
refering to the unique element of a distinguished set of
representatives for the congruence relation which is congruent to the
original element.

But more generally, "mod" as an operator is used to denote "the
remainder when dividing by", so "a mod b" means "the remainder of a
when divided by b". Even that definition, however, is not universal,
as noted by Virgil. Some people define "integer division" so that the
result of dividing a by b is equal to -1 times the result of dividing
a by -b (instead of defining it as the unique integer q such that
a=bq + r with 0<= r < |b|), in which case the meaning of "remainder"
would change if the divisor is negative (but not if the dividend is
negative).

(By the way, if you click on "More options" at the top of the post and
then click on the reply button there, it will provide the usual
quotation with attributions).

--
======================================================================
"It's not denial. I'm just very selective about
what I accept as reality."
--- Calvin ("Calvin and Hobbes")
======================================================================

Arturo Magidin
magidin@xxxxxxxxxxxxxxxxx

.


Quantcast