On Wed, Sep 21, 2011 at 12:47 AM, Richard O'Keefe <o...@cs.otago.ac.nz> wrote: > In any mathematical partial order, we expect > x `le` x > to be a law. But in IEEE arithmetic, if x is a NaN, x `le` x is > false. I don't see how to reconcile these. > > I agree that a standard partial order class would be nice.
logfloat package's PartialOrd solution is to have le :: PartialOrd a => a -> a -> Maybe Bool In IEEE arithmetic, if x is a NaN and y is anything else, x `le` y == y `le` x == Nothing. Cheers, -- Felipe. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe