(Numeric) should -7 % 5 = -2 ?
Julian Tibble
chasm at rift.sytes.net
Wed Jul 2 19:02:08 EDT 2003
In article <020720031459050258%pecora at anvil.nrl.navy.mil>,
Louis M. Pecora wrote:
> In article <mailman.1057088943.30504.python-list at python.org>, Bob
> Gailer <bgailer at alum.rpi.edu> wrote:
>
>> "When an integer a is divided by another m, one has
>> a = km + r
>> where the remainder is some positive integer less than m.
>
> Maybe I'm misunderstanding this, but what about -7 divided by 5? We
> get k=-1 and r=-2.
-7 = (-2) * 5 + 3
So actually, k = -2 and r = 3
> m can be negative. Maybe your quote was for the positive integers only.
True, that definition does not make sense when m is negative. When I came
across the subject in introductory group theory they said "positive divisor".
Julian
More information about the Python-list
mailing list