Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ttrdc.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ihnp4!mgnetp!ltuxa!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: net.lang.c Subject: Re: C Floating point arithmetic Message-ID: <597@ttrdc.UUCP> Date: Thu, 21-Nov-85 20:55:27 EST Article-I.D.: ttrdc.597 Posted: Thu Nov 21 20:55:27 1985 Date-Received: Sat, 23-Nov-85 06:07:57 EST References: <3369@brl-tgr.ARPA> <286@well.UUCP> Organization: AT&T, Computer Systems Division, Skokie, IL Lines: 26 In article <286@well.UUCP>, farren@well.UUCP (Mike Farren) writes: >In article <3369@brl-tgr.ARPA>, Schauble@mit-multics.arpa (Paul Schauble) writes: >> Does anyone know of a C compiler for the IBM PC that does NOT force all >> floating point arithmetic to be done in double precision? 8087 support >> is necessary. > Yes, but the 8087 forces conversion to double-precision anyway, there >is no way to avoid it. Why would you want to? One would wish to do this for the same reason that floats and doubles are two distinct types in Fortran (real and double precision)--sometimes the added machine-crunch effort to handle the doubles is unnecessary for the amount of precision desired out of the computation. If the machine has separate floating point instructions meant to handle the smaller floats, this makes sense, but if (as in the case of the 8087) it only handles double-size items, I agree it is pointless (alas) to make the distinction except artificially. On machines that do provide distinct instructions for floats and doubles, a multiply/divide of two doubles takes ~4 times the crunch of a multiply of two floats as best as I can remember from CS101. (Refutations tolerated, flames > /dev/null). -- ------------------------------- Disclaimer: The views contained herein are | dan levy | yvel nad | my own and are not at all those of my em- | an engihacker @ | ployer or the administrator of any computer | at&t computer systems division | upon which I may hack. | skokie, illinois | -------------------------------- Path: ..!ihnp4!ttrdc!levy