Comments on ANSI public Oct 86 Public review draft.

braner braner at batcomputer.tn.cornell.edu
Tue Mar 10 15:25:28 AEST 1987


[]

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



More information about the Comp.lang.c mailing list