[Haskell-cafe] Re: 0/0 > 1 == False
Achim Schneider
barsoap at web.de
Fri Jan 11 13:12:47 EST 2008
David Roundy <droundy at darcs.net> wrote:
> Prelude> let x=1e-300/1e300
> Prelude> x
> 0.0
> Prelude> x/x
> NaN
>
> The "true" answer here is that x/x == 1.0 (not 0 or +Infinity), but
> there's no way for the computer to know this, so it's NaN.
>
Weeeeeeeelllllllll...... math philosophy, Ok.
You can't divide something in a way that uses no slices. You just don't
cut, if you cut zero times. Which is what you do when you divide by
one, mind you, not when you divide by zero. Division by [1..0] equals
multiplication by [1..]. You can't get to the end of either spectrum,
just axiomatically dodge around the singularities to axiomatically
connect the loose ends.
There is no true answer here, the question is wrong.
And you're using floats where only rationals can tackle the problem.
I was wrong in claiming that
> > But then there's +0/0 and -0/0, which would be +Infinity and
> > -Infinity, and +0 > 0 > -0. AFAIK there are no floats with three
> > zero values, though.
, both are NaN.
--
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited.
More information about the Haskell-Cafe
mailing list