[Slightly OT]: More on ints and floats
Michael Hudson
mwh at python.net
Wed Apr 9 12:14:41 CEST 2003
James Gregory <james at anchor.net.au> writes:
> On Tue, 2003-04-08 at 18:27, Michael Hudson wrote:
> > Tim Daneliuk <tundra at tundraware.com> writes:
> >
> > > I am unclear, though, on whether a mathematician understands 1.0 to
> > > mean 1.0000000... (a single number) or the _neighborhood_ around 1
> > > with one digit precision.
> >
> > I'm a mathematician, albeit not a numerical analyst, and I don't think
> > considering a float as the interval of real numbers to which it is the
> > closest floating point approximation is a particularly helpful point
> > of view.
>
> To my mind, 1.0 is a member of R, 1 is a member of Z. But I do crazy
> things like think of "1/2" as the number that yields 1 when multiplied
> by 2. Not 0.5. Nor the quantity of apple you get when sharing an apple
> with one other person.
>
> But it's context dependent, and that's one of the properties that having
> all "numbers" as objects affords you. It means that my software can tell
> if a particular number is a member of GF(5) (The Galois Field of 5
> elements), and then it can infer that "1/2" actually means 3 (3 * 2 = 6,
> 6 % 5 = 1, as per the above definition).
>
> What does 1/2 mean to you in Z?
Nothing.
> Does it mean the same thing in R?
Well, no :-)
Cheers,
M.
--
The above comment may be extremely inflamatory. For your
protection, it has been rot13'd twice.
-- the signature of "JWhitlock" on slashdot
More information about the Python-list
mailing list