Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!purdue!i.cc.purdue.edu!h.cc.purdue.edu!s.cc.purdue.edu!ags From: ags@s.cc.purdue.edu (Dave Seaman) Newsgroups: comp.lang.fortran Subject: Re: Fortran versus C for numerical analysis Message-ID: <3537@s.cc.purdue.edu> Date: 4 Sep 88 02:24:42 GMT References: <3535@s.cc.purdue.edu> <3183@lanl.gov> Reply-To: ags@s.cc.purdue.edu.UUCP (Dave Seaman) Organization: Purdue University Lines: 15 In article <3183@lanl.gov> jlg@lanl.gov (Jim Giles) writes: [I asked for an example of Fortran using associativity legally] >You almost gave one yourself. The expression A+B+C may be evaluated >as (A+B)+C, A+(B+C), or (A+C)+B. Fortran is free to do the calculation >in any of those orders. Well, ok, that's technically an application of associativity, but it's not exactly what I had in mind. The only reason you are allowed to write A+B+C in the first place, rather than (A+B)+C or A+(B+C), is that you are assuming associativity and therefore you are telling the compiler that it doesn't matter. -- Dave Seaman ags@j.cc.purdue.edu