Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!uw-beaver!tektronix!cae780!amdcad!amd!intelca!mipos3!cpocd2!howard From: howard@cpocd2.UUCP Newsgroups: comp.lang.c Subject: Re: Order of evaluation, machine floating point Message-ID: <521@cpocd2.UUCP> Date: Mon, 23-Mar-87 15:08:12 EST Article-I.D.: cpocd2.521 Posted: Mon Mar 23 15:08:12 1987 Date-Received: Wed, 25-Mar-87 06:22:05 EST References: <4775@brl-adm.ARPA> <7779@utzoo.UUCP> Reply-To: howard@cpocd2.UUCP (Howard A. Landman) Organization: Intel Corp. ASIC Services Organization, Chandler AZ Lines: 19 In article <7779@utzoo.UUCP> henry@utzoo.UUCP (Henry Spencer) writes: >> ... for unknown reasons all floating arithmetic is supposed to occur in >> double precision. I realize that K&R said it, but I don't know why... > >Dennis Ritchie answered this on the net a long time ago: > >> 3) Because it is numerically more desirable to evaluate single-precision >> expressions in double precision, then truncate the result. > >#3 is usually true for the naive but makes the pros very unhappy. Unless you happen to be working on an IBM 360/370 family machine. The "single precision" arithmetic is so bad that it has often been called "half precision". The C insistance on double precision makes a lot of sense in such an environment. -- Howard A. Landman ...!intelca!mipos3!cpocd2!howard