From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA31411; Sun, 27 Jun 2004 01:08:55 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA31663; Sun, 27 Jun 2004 01:08:54 +0200 (MET DST) Received: from c2bapps17.btconnect.com (dswu194.btconnect.com [193.113.154.33]) by concorde.inria.fr (8.12.10/8.12.10) with SMTP id i5QN8rSH029344; Sun, 27 Jun 2004 01:08:53 +0200 Received: from Dagmar.btconnect.com (actually host 48.213.134.81.in-addr.arpa) by dswu194 with SMTP-CUST (XT-PP) with ESMTP; Sun, 27 Jun 2004 00:08:50 +0100 Message-Id: <6.0.3.0.2.20040626235840.01f28ed8@pop3.btconnect.com> X-Sender: daveberry@pop3.btconnect.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.3.0 Date: Sun, 27 Jun 2004 00:08:52 +0100 To: Brian Hurt , Xavier Leroy From: Dave Berry Subject: Re: [Caml-list] Why must types be always defined at the top level? Cc: John Hughes , "'caml-list'" In-Reply-To: References: <20040624194553.A27745@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Miltered: at concorde with ID 40DE0205.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 floats:01 reinvent:01 kahan:01 floats:01 abide:01 fwiw:01 ocaml:01 ocaml:01 equality:01 equality:01 arithmetic:01 sml:01 sml:01 float:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk At 00:23 25/06/2004, Brian Hurt wrote: >On Thu, 24 Jun 2004, Xavier Leroy wrote: > > As to whether equality should be defined on floats, there are pros and > > cons. My standpoint is that it's eventually better to stick to > > established standards (that is, IEEE float arithmetic) rather than try > > to reinvent a wheel likely to be even squarer than these standards. > > Prof. Kahan found it worthwhile to fully define equality over floats; > > I'll abide by his wisdom. > >There are legitimate reasons to want floating point equality. It's >generally not what you want, but I had an example of needing it in Ocaml >just the other day. FWIW, the SML Basis does define an equality operation on IEEE floats. But IEEE equality is not structural equality and so IEEE floats are not equality types. IMO this is a good thing because anyone using equality on IEEE floats must understand the difference between IEEE equality and structural equality. It is also a good thing that SML floats are not equality types because it encourages people to think twice before using equality on floats. Sometimes you do want equality; often you don't. I am not trying to criticise Ocaml here, just to clarify the position in SML. Dave. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners