[Haskell-cafe] Re: 0/0 > 1 == False
Achim Schneider
barsoap at web.de
Thu Jan 10 15:41:53 EST 2008
David Roundy <droundy at darcs.net> wrote:
> On Thu, Jan 10, 2008 at 09:24:34PM +0100, Achim Schneider wrote:
> > John Meacham <john at repetae.net> wrote:
> > > On Thu, Jan 10, 2008 at 11:17:18AM +0200, Yitzchak Gale wrote:
> > > > The special case of 1/0 is less clear, though. One might
> > > > decide that it should be an error rather than NaN, as some
> > > > languages have.
> > >
> > > It is neither,
> > >
> > > 1/0 = Infinity
> > > -1/0 = -Infinity
> >
> > Just out of curiosity:
> >
> > 1/-0 = -Infinity?
> > -1/-0 = Infinity?
>
> Yes. (You could have tried this for yourself, you know... but I
> suppose haskell-cafe isn't a bad interactive Haskell interpreter,
> perhaps more user friendly than ghci.)
>
Prelude> 1 `div` 0
*** Exception: divide by zero
That's it. One just shouldn't just extrapolate and think you didn't mean
GHC but IEEE...
--
(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