Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!amdahl!pacbell!ditka!stb!michael From: michael@stb.UUCP (Michael) Newsgroups: comp.lang.c Subject: Re: How not to write a loop, revisited Keywords: precision floating numbers Message-ID: <10476@stb.UUCP> Date: 15 Jul 88 01:50:58 GMT References: <16276@brl-adm.ARPA> <329@accelerator.eng.ohio-state.edu> <3637@teklds.TEK.COM> Reply-To: michael@stb.UUCP (Michael) Organization: STB BBS, La, Ca, Usa, +1 213 459 7231 Lines: 24 In article <3637@teklds.TEK.COM> daniels@teklds.UUCP (Scott Daniels) writes: >In article <329@accelerator.eng.ohio-state.edu> > rob@kaa.eng.ohio-state.edu (Rob Carriere) writes: >>... nobody I know *guarantees* that integers are representable (i.e. >>the closest approximation to 2 might be 1.999999) > In fact, I have read interesting arguments that propose that many >integers be purposely mis-represented. The argument goes as follows: > >Assume (for concreteness) a binary floating point representation with >an 4-bit mantissa ranging [0..1),and a 3-bit signed exponent field, and a Hang on, you give a nice example for why FLOATS may not be accurate. If you actually did that for integers, I wouldn't touch you with a ten foot pole. Besides, in your example you give a tighter specification that does not include 2. However, I think you'll find that a specification that is symetrical around two (i.e., has 2 in the middle of the what it represents range) will work better. Michael : --- : Michael Gersten uunet.uu.net!denwa!stb!michael : sdcsvax!crash!gryphon!denwa!stb!michael : What would have happened if we had lost World War 2. Well, the west coast : would be owned by Japan, we would all be driving foreign cars, hmm...