[OT] Number theory [Was: A use for integer quotients]

Ken Seehof kens at sightreader.com
Fri Jul 27 00:38:58 EDT 2001


Robin wrote:
> ullrich at math.okstate.edu (David C. Ullrich) wrote in
> news:3b602afa.930850 at nntp.sprynet.com:
>
> > On Thu, 26 Jul 2001 00:01:15 +1000, "michael" <serrano at ozemail.com.au>
> > wrote:
> >
> >>> But strictly
> >>> speaking the Integer 2 and the Real Number 2 are different entities.
> >>
> >>So strictly speaking, Z (the set of integers) is not a subset of R (the
> >>set of reals)?
> >
> > Strictly speaking yes, but nobody _ever_ speaks this strictly
> > (except in contexts like the present).
> >
>
> What I was getting at was that the integer 2 (as an element of the ring of
> integers) is different to the real number 2 (as an element of a field).
As
> a real number, 2 has a multiplicative inverse, whereas as an integer it
> does not. (and as an element of Z_5 it does etc etc)
>
> As sets (and from the p.o.v. of analysis), Z is a subset of R, but as
> algebraic entities there is a distinction.
>
> Robin

Yay!  Somebody talking sense!

There are good theoretical arguments to thinking of Z as a subset
of R as well as Z being a different kind of animal from R.

In software, when doing anything with the concepts of modulus and
quotient, one is almost always exclusively in the world of integers,
where words like "floor" make no sense.  Usually we are talking
about pixels or positions in a grid, or relative position in a repeating
sequence, or some other discrete phenomenum.  In these cases
Z doesn't really -seem- like a subset of R.

Okay, if you say 5.0 // 2.0 == 2.0, it makes some kind of sense to
call that "floor division", but I don't think // will be used with floats
very often (just nice to support floats for polymorphic consistency).
But // is really there because of integers.

            "//" = "quotient"

- Ken






More information about the Python-list mailing list