Array indexing vs. pointers...

Andrew Koenig ark at alice.UUCP
Thu Oct 6 11:07:52 AEST 1988


In article <1703 at dataio.Data-IO.COM>, bright at Data-IO.COM (Walter Bright) writes:

> 	The result may differ in the last bit of the significand because
> 	of this. However, in most cases, that is irrelevant and the
> 	multiply will be significantly faster.

If, however, you want your compiler to implement IEEE floating point,
you had better not substitute a multiply by 0.1 for a divide by 10.

IEEE defines the results of addition, subtraction, multiplication,
division, square root, and a few other operations precisely -- down
to the last bit.  Either you get the right answer or you don't.
It is true that in many cases users don't need the last bit or so,
but a language implementer has an obligation to give it to the
people who demand it.
-- 
				--Andrew Koenig
				  ark at europa.att.com



More information about the Comp.lang.c mailing list