[Haskell] instance Bounded Double
Lennart Augustsson
lennart at augustsson.net
Fri Mar 11 05:10:33 EST 2005
Haskell does not guarantee that 1/0 is well defined,
nor that -(1/0) is different from 1/0.
While the former is true for IEEE floating point numbers,
the latter is only true when using affine infinities.
-- Lennart
Frederik Eaton wrote:
> Shouldn't Double, Float, etc. be instances of Bounded?
>
> I've declared e.g.
>
> instance Bounded Double where
> minBound = -(1/0)
> maxBound = 1/0
>
> in a module where I needed it and there doesn't seem to be any issue
> with the definition...
>
> Frederik
>
More information about the Haskell
mailing list