Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!vrdxhq!bms-at!stuart From: stuart@bms-at.UUCP (Stuart D. Gathman) Newsgroups: comp.lang.c Subject: Re: Comments on ANSI public Oct 86 Public review draft. Message-ID: <365@bms-at.UUCP> Date: Wed, 18-Mar-87 20:58:02 EST Article-I.D.: bms-at.365 Posted: Wed Mar 18 20:58:02 1987 Date-Received: Fri, 20-Mar-87 03:37:34 EST References: <4804@brl-adm.ARPA> Organization: Business Management Systems, Inc., Fairfax, VA Lines: 14 In article <4804@brl-adm.ARPA>,Schauble@mit-multics.arpa(Paul Schauble) writes: > It seems to me much more in accord with reality to say that == is not > defined for float and double. At least, like it or not, the definition > is machine dependant and compiler dependant. It may seem ureasonable > that (x*y == x*y) should fail, but it can and does on many machines. A straight == comparison for float is useless on almost *any* machine. A better approach would be to define == to be a higher level contruct, i.e. equal within a certain "fuzz" factor. Unfortunately, there are several definitions of floating fuzz. This is where operator redefinition would be handy; everyone could pick his own floating equality operator. -- Stuart D. Gathman <..!seismo!dgis!bms-at!stuart>