9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Dan Cross <cross@math.psu.edu>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] More Microsoft bashing
Date: Fri, 16 Dec 2005 00:02:14 -0500	[thread overview]
Message-ID: <20051216050214.GD15067@augusta.math.psu.edu> (raw)
In-Reply-To: <20051216045115.GC15067@augusta.math.psu.edu>

On Thu, Dec 15, 2005 at 11:51:15PM -0500, Dan Cross wrote:
> On Thu, Dec 15, 2005 at 08:04:02PM -0800, Jack Johnson wrote:
> > So, what *is* -5 MOD 3?
> 
> Well, in general, it depends.
> 
> Do you care whether the result a set or an integer?  The definitions due
> to Wirth et al are the former, while the MS definition appears to be the
> latter.

Hmm, I guess on further reflection I ought to explain what I mean by
this before someone jumps all over me.

The definition as per Wirth et al gives you a positive generator for an
equivalence class on Z, whereas the microsoft definition gives you the
definition of the division function extended to all of Z, which yields
an integer; the former definition is probably more comfortable for a
mathematician, and more what one would expect.  The latter is more
comfortable for someone who just wants to write a program.  In neither
case does this have much to do with the actual implementation (that is
to say, it's not like DIV actually gives you back an object
representing the set of all integers congruent to 0 modulo some integer
in Pascal), but only how that language interprets the definitions.

> Regardless, all these definitions are problematic.  No where does it say
> they're defined only on Z*; what if Y is 0?

This is still a problem.  You really want a function f: Z x Z* -> Z,
not f: Z x Z -> Z; that is, for f(x, y) = x div y, y should be non-zero.
Otherwise, it would be an absurdity.

	- Dan C.



  reply	other threads:[~2005-12-16  5:02 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 [this message]
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
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=20051216050214.GD15067@augusta.math.psu.edu \
    --to=cross@math.psu.edu \
    --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).