Array indexing vs. pointers...

Larry Meadows lfm at fpssun.fps.com
Sat Oct 15 03:13:07 AEST 1988


In article <711 at wsccs.UUCP> dharvey at wsccs.UUCP (David Harvey) writes:
:
:For that matter, it is also very difficult to represent 10.0 (I am
:assuming you are working with floating point) in any floating point
:representation.

This is not the case.  10.0 is 8 * 1.25 or 2^3 * 1.01
						     [base 2].

                                         [P 1s]
In fact, all integers between zero and  1111...1
                                                [base 2]

(where P is the precision) are exactly representable in base 2 floating
point.  It is, however, the case that  N/10.0 is not necessarily the
same as 0.1*N when a binary floating point representation is used.
                                                
-- 
Larry Meadows @ FPS			...!tektronix!fpssun!lfm
					...!nosun!fpssun!lfm



More information about the Comp.lang.c mailing list