[Haskell-cafe] Proper Handling of Exceptional IEEE Floating Point Numbers

wren ng thornton wren at freegeek.org
Fri Apr 23 21:39:09 EDT 2010


Casey McCann wrote:
> The only correct solution would be to strip floating point types of
> their instances for Ord, Eq, and--therefore, by extension--Num. For
> some reason, no one else seems to like that idea. I can't imagine
> why...

I'm not terribly opposed to it. But then, I've also defined classes for 
partial orderings[1] and for types containing transfinite values[2] in 
order to try to render floats usable. Also, don't forget some of the 
other bugs[3] in Hugs.


[1] 
http://hackage.haskell.org/packages/archive/logfloat/0.12.1/doc/html/Data-Number-PartialOrd.html

[2] 
http://hackage.haskell.org/packages/archive/logfloat/0.12.1/doc/html/Data-Number-Transfinite.html

[3] 
http://hackage.haskell.org/packages/archive/logfloat/0.12.1/doc/html/Hugs-RealFloat.html


-- 
Live well,
~wren


More information about the Haskell-Cafe mailing list