Inherent imprecision of floating point variables

Tony Olekshy tony at oha.UUCP
Fri Jun 29 11:42:36 AEST 1990


In <b3f.2688bfce at ibmpcug.co.uk>, dylan at ibmpcug.co.uk (Matthew Farwell) writes:
>
> > [question about]	while (f != 10.0) f += 0.1;
>
> If its all to do with conversion routines, why doesn't this stop when f
> reaches 10?
	[which was a rhetorical question, to the poster he had quoted]

I add...

It does not stop at (f == 10.0) simply because no-one said f = 10.0;
The converse (why did it stop, if it had) is more complex.
Next question.

--
Yours etc., Tony Olekshy.               Internet: tony%oha at CS.UAlberta.CA
					  BITNET: tony%oha at UALTAMTS.BITNET
					    uucp: alberta!oha!tony



More information about the Comp.lang.c mailing list