[Slightly OT]: More on ints and floats

Terry Reedy tjreedy at udel.edu
Mon Apr 7 21:08:52 EDT 2003


"Tim Daneliuk" <tundra at tundraware.com> wrote in message
news:fjss6b.1021.ln at boundary.tundraware.com...
> OK, I don't want to resurrect another interminable discourse in
ints,
> floats, and how they are/ought/can be handled in the language. But,
I
> have a sort of theoretical mathematical question which the whole
> business brought to mind.

> As I understand it, integers and floats are distinct mathematical
> entities. A colleague of mine claims, that insfar as we use them in
> computing, ints are merely a proper subset of floats.

These are two different metaphysical (and quasi-religious) viewpoints.
The entanglement of this issue with that of Python's representation of
int division contributed somewhat unnecessary 'heat' to the int
division debate.  (And its removal help lead to its resolution.)

In my view, counts (0, 1, 2, ...) are the basic numbers -- whether
considered to be primitive (axiomatic) or derived (from functions,
sets, or logic values taken as protonumbers).  They are the possible
answers to the question "How many (discrete units)?"  Integers are
pairs (differences) of counts, just as rationals are pairs (ratios) of
integers, and complex Xs are pairs of Xs (with yet a third set of
operation definitions).  To me, the fact that the parent set can be
matched with a subset of the daughter set does not make it identical
to or 'merely' that subset.

I am aware that in set theory, isomorphism between sets is usually
considered to mean identity.  That is why there is (considered to be)
only 'one' empty set.  On the other hand, a) number theory does not
have to be governed by the same rules as set theory and b)
'isomorphism' is partly a matter of definition.  I could claim that
the fact, for instance, that count 2 does not have a square root while
real 2.0 does makes them not 'fully' isomorphic.  This gets to the CS
view that types are defined by the operations allowed on the instances
(at least roughly put).

There is also a third (non-Platonic) view: numbers are purely human
invention.  Thus, decisions about identity are arbitrary, and hence
arguments about the 'truth' of such is at least somewhat nonesensical.
Thus, my argument above would only make sense if recast as one about
pragmatics.

Take your pick.

Terry J. Reedy








More information about the Python-list mailing list