Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site umd5.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!gatech!seismo!umcp-cs!cvl!umd5!zben From: zben@umd5.UUCP Newsgroups: net.lang.c Subject: Re: C Floating point arithmetic Message-ID: <793@umd5.UUCP> Date: Mon, 25-Nov-85 07:04:42 EST Article-I.D.: umd5.793 Posted: Mon Nov 25 07:04:42 1985 Date-Received: Wed, 27-Nov-85 05:23:03 EST References: <706@lasspvax.UUCP> <4614@alice.UUCP> Reply-To: zben@umd5.UUCP (Ben Cranston) Organization: U of Md, CSC, College Park, Md Lines: 32 Summary: Then the definition of 'float' is wrong... In article <4614@alice.UUCP> ark@alice.UucP (Andrew Koenig) writes: These comments by garry wiegand: [z] >> In an inauspicious moment, K&R specified "All floating-point arithmetic >> in C is done in double precision" (pg 41). >> 1) floats, as opposed to doubles, are costly and useless (except >> when memory space is critical), and >> 2) I have to advise people with CPU-intense problems not to use C. >> Comments? Does everybody agree? Andrew replies: [z] >No -- on most machines, single-precision does not offer enough significance >for serious number-crunching, so people tend to use double-precision >anyway if they care about the results. Now, this is a most disingenious argument. If this were really true, one would map 'float' to the double-precision operations and totally ignore the single-precision ones. Let's face it - this, as well as several other "features" of the Unix system (such as the treatment of parameters passed to functions) is left over from the PDP-11 days, and puts the lie to Unix's claim of machine independance... Well, perhaps that's too strong. A better statement is that like every other claim made by Unix, the claim of machine independance is only about 90% true. Don't get sore! 90% is pretty damn good given the level of snake oil in this field... -- Ben Cranston ...{seismo!umcp-cs,ihnp4!rlgvax}!cvl!umd5!zben zben@umd2.ARPA