Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Weird behavior with nan's and min/max
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-17 (23:56)
From: Yaron M. Minsky <yminsky@c...>
Subject: Re: [Caml-list] Weird behavior with nan's and min/max
On Fri, 2003-10-17 at 10:55, skaller wrote:
> On Thu, 2003-10-16 at 23:16, Xavier Leroy wrote:
> > 1- Fix polymorphic equality so that it behaves like IEEE equality on floats,
> > 2- As J M Skaller proposed, change the behavior of polymorphic
> > equality 
> Doesn't the polymorphic comparison have to be a total order?

This kind of wigs me out too.  For example, do the set and map data
structures depend on this total order property?  What happens when I
stick in a data structure which contains some floats somewhere in it,
and some of those floats are nan's?  Does the data structure continue to
work at all?  It totally wigs me out.

I wish there was some sensible way around it.  Probably the thing I
would like best is for calculations that produce nans to throw
exceptions.  But from what I've heard so far, this doesn't appear to be
possible.  Oh well.


|--------/            Yaron M. Minsky              \--------|
|--------\ /--------|

Open PGP --- KeyID B1FFD916 (new key as of Dec 4th)
Fingerprint: 5BF6 83E1 0CE3 1043 95D8 F8D5 9F12 B3A9 B1FF D916

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: