[Haskell-cafe] 1/0
Richard A. O'Keefe
ok at cs.otago.ac.nz
Mon Jun 16 23:20:43 EDT 2008
Since Haskell-Café often strays into mathematics,
this may not be too far off topic.
On 17 Jun 2008, at 2:29 pm, Evan Laforge wrote:
> Yeah, on reflection, I think my "intuition" derives from me asking a
> math teacher back in high school "isn't n/0 infinity?" after looking
> at a graph, to which he said "no, it's undefined, you can only say it
> approaches infinity in the limit, but it isn't infinity".
Let's put this kindly: it is POSSIBLE that your maths teacher knew
what he was talking about and was just telling what the "Science of
Discworld" authors call "lies-to-children". It is certainly likely
that it didn't occur to him that you might transfer what he said
about the mathematical real numbers to a rather different algebraic
system, IEEE floats.
The usual "real numbers" R form an ordered field.
*In that structure*, n/0 is undefined.
But there is another algebraic structure which includes all
the real numbers plus one more: infinity.
It's call the real projective line.
See http://en.wikipedia.org/wiki/Real_projective_line
In that structure, n/0 is perfectly well defined, and is indeed
infinity. That structure has all the properties you really need
to do calculus, but isn't a field and isn't ordered. However,
whenever an operation on elements of R is defined, the
analogous operation on the corresponding elements of \hat R is
defined and has the corresponding value.
Basically, you can define operations any way you want as long as
you are willing to live with the consequences. For example, it
turns out to be possible to define an alternative arithmetic in
which (-x)*(-y) = -(x*y) for positive x, y. The price is that
it doesn't satisfy all the usual axioms, though it does satisfy
other possibly useful ones that the usual systems don't.
In an analogous way, the IEEE designers decided that it would be
useful to have +/- epsilon instead of 0 and +/- (1/epsilon)
instead of infinity, but then decided that the ordering operations
should identify -epsilon with +epsilon, so the result still isn't
quite a proper total order, even ignoring NaNs. (What happens if
you sort a list of mixed +0.0 and -0.0? What, if anything,
_should_ happen?) They obtained the benefits they wanted, at the
price of making the resulting structure less like R. But then,
floating point numbers never were _very_ much like R to start with.
It's not clear to me that *R offers anything more than a heuristic
analogy to IEEE arithmetic. For one thing, *R is ordered.
More information about the Haskell-Cafe
mailing list