2 Dec 19:21
Re: Bounded and floating types
Isaac Dupree <isaacdupree <at> charter.net>
2007-12-02 18:21:10 GMT
2007-12-02 18:21:10 GMT
Conal Elliott wrote:
> Currently Float & Double do not have standard Bounded instances. Is there
> any reason not to use the following?
>
> instance Bounded Float where { minBound = -1/0; maxBound = 1/0 }
> instance Bounded Double where { minBound = -1/0; maxBound = 1/0 }
by the way, that minBound definition is (negate(1/0)), not ((negate 1) /
0) ... although that probably doesn't make a difference
Isaac
RSS Feed