Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!seismo!mcvax!dik From: dik@mcvax.UUCP Newsgroups: comp.lang.c Subject: Re: C and Floating Point Message-ID: <346@zuring.mcvax.cwi.nl> Date: Sat, 11-Apr-87 20:21:20 EST Article-I.D.: zuring.346 Posted: Sat Apr 11 20:21:20 1987 Date-Received: Tue, 14-Apr-87 00:01:43 EST References: <15958@sun.uucp> <5716@brl-smoke.ARPA> Reply-To: dik@zuring.UUCP (Dik T. Winter) Organization: CWI, Amsterdam Lines: 19 Keywords: C Fortran Floating Point Parenthases In article <26916@rochester.ARPA> crowl@rochester.UUCP (Lawrence Crowl) writes: > In article <852@bobkat.UUCP> m5d@bobkat.UUCP (Mike McNally (Man Insane)) writes: > >Seriously, I cannot think of a SINGLE case in all my life when I suffered > >from expression rearrangement. The same goes for all the programmers > >in my office (4 others). Do we just write different kinds of programs? Do you use floating point? > >Note that I'm not doubting these parentheses horror stories; I just > >think it's fascinating that I've never had one. Oh well. > > Well, I cannot say I have been bit, ... Well, I have been bit. Strange though, it was in Fortran. (A - B) - B compiled as A - (B + B). However, I was lucky because A - B - B compiled as (A - B) - B. (Optimization? No damn optimization, we just rearrange your code and see what happens!) -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax