Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!styx!ames!ucbcad!ucbvax!sdcsvax!sdchem!tps From: tps@sdchem.UUCP (Tom Stockfisch) Newsgroups: comp.lang.c Subject: float equality (was Comments on ANSI...) Message-ID: <652@sdchema.sdchem.UUCP> Date: Fri, 20-Mar-87 04:03:41 EST Article-I.D.: sdchema.652 Posted: Fri Mar 20 04:03:41 1987 Date-Received: Sat, 21-Mar-87 10:30:12 EST References: <4804@brl-adm.ARPA> <365@bms-at.UUCP> Sender: news@sdchem.UUCP Reply-To: tps@sdchemf.UUCP (Tom Stockfisch) Organization: UC San Diego Lines: 26 In article <365@bms-at.UUCP> stuart@bms-at.UUCP (Stuart D. Gathman) writes: >In article <4804@brl-adm.ARPA>,Schauble@mit-multics.arpa(Paul Schauble) writes: >>...[claim that with float x,y, the test (x*y==x*y) can fail on many machines Every single usage of "==" for floating point can fail? What about double dflmax(); double x = dflmax(); if ( x == dflmax() ) ... or double x = 0; if ( x == 0 ) ... ? || Tom Stockfisch, UCSD Chemistry tps%chem@sdcsvax.ucsd.edu or sdcsvax!sdchem!tps