From: Victor Nazarov <vir@comtv.ru>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] More Microsoft bashing
Date: Sat, 17 Dec 2005 01:28:21 +0300 [thread overview]
Message-ID: <43A33F85.4060602@comtv.ru> (raw)
In-Reply-To: <200512161047.aa99386@salmon.maths.tcd.ie>
John Stalker wrote:
>>|
>>| So, what *is* -5 MOD 3?
>>|
>>
>>-2
>>
>>
>
>I hope not. If you are really serious about using modular arithmetic
>then you probably want to use something like PARI GP where -5 mod 3
>is -5 mod 3, belonging to the data type of integers mod 3. -2 mod 3
>and 1 mod 3 are alternate representations of the same value. If you
>aren't serious about modular arithmetic and want the result to be an
>integer then I think you are shooting yourself in the foot if you
>implement it as anything other than -5 mod 3 == 1. I want to be able
>to test whether n is odd with `if ( n % 2 == 1 ) ...' Of course, I'm
>a mathematician rather than a CS person, but I think the other
>convention has nothing to recommend it.
>
>
>
Agreed on this. At least most (all I know) cryptography protocols
require -5 mod 3 to be 1 for their implementations. At least lots of
algorithms require ... == -5 mod 3 == -2 mod 3 == 1 mod 3 == 4 mod 3 == ....
--
Victor Nazarov
http://vir.comtv.ru/
next prev parent reply other threads:[~2005-12-16 22:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-16 4:04 Jack Johnson
2005-12-16 4:51 ` Dan Cross
2005-12-16 5:02 ` Dan Cross
2005-12-16 5:33 ` erik quanstrom
2005-12-16 5:38 ` Bruce Ellis
2005-12-16 10:46 ` Charles Forsyth
2005-12-16 13:13 ` Dan Cross
2005-12-16 4:53 ` erik quanstrom
2005-12-16 5:08 ` Dan Cross
2005-12-16 5:19 ` Brian L. Stuart
2005-12-16 5:27 ` Bruce Ellis
2005-12-16 14:19 ` Brantley Coile
2005-12-16 15:13 ` Bruce Ellis
2005-12-16 15:29 ` Russ Cox
2005-12-16 16:00 ` Bruce Ellis
2005-12-17 0:26 ` Jack Johnson
2005-12-17 3:59 ` Bruce Ellis
2005-12-16 15:33 ` Brantley Coile
2005-12-16 10:47 ` John Stalker
2005-12-16 14:25 ` Brantley Coile
2005-12-16 14:51 ` Gorka guardiola
2005-12-16 22:28 ` Victor Nazarov [this message]
2005-12-17 11:09 ` David Leimbach
2005-12-17 11:24 ` David Leimbach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43A33F85.4060602@comtv.ru \
--to=vir@comtv.ru \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).