Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!ames!amdahl!pyramid!batcomputer!braner From: braner@batcomputer.tn.cornell.edu (braner) Newsgroups: comp.lang.c Subject: Re: Comments on ANSI public Oct 86 Public review draft. Message-ID: <377@batcomputer.tn.cornell.edu> Date: Tue, 10-Mar-87 00:25:28 EST Article-I.D.: batcompu.377 Posted: Tue Mar 10 00:25:28 1987 Date-Received: Tue, 10-Mar-87 23:01:58 EST References: <4804@brl-adm.ARPA> Reply-To: braner@batcomputer.UUCP (braner) Organization: Theory Center, Cornell University, Ithaca NY Lines: 17 Summary: double x,y; if (x==y)... should be retained! [] In many numerical programs you do not want to repeat some calculation if some floating-point variable has not changed. Therefore, double x,y; x = y; ... if (x==y) ... SHOULD be available (and work correctly) even in implementations where (x*y == y*x) fails. And it should be no problem to implement, since x and y are two copies of the same number in the same internal format. (This is very different from the common mistake of expecting infinite precision when using FP variables in loop termination criteria...) - Moshe Braner