Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!hc!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: intrinsic functions, math operators (was: i++, i+=1, i=i+1) Message-ID: <4032@lanl.gov> Date: 22 Sep 88 19:00:46 GMT References: <1033@amelia.nas.nasa.gov> Organization: Los Alamos National Laboratory Lines: 21 From article <1033@amelia.nas.nasa.gov>, by fouts@lemming.nas.nasa.gov.nas.nasa.gov (Marty Fouts): > This is true, but only accurate when the expression evaluates to a > constant. You couldn't (because of finite precision) replace > 1-COS(X)*COS(X) with SIN(x)*SIN(x) and guarentee the same results. True, but Fortran would allow this anyway since optimized expressions need only to be mathematically identical, not computationally identical (see section 6.6 of the standard). > that you are contemplating to Macsyma, Mathematic, et al. ^ That's Mathematica. And I agree. I have long wanted to write the mathematics preprocessor that Knuth talks about. In fact, I want a more powerful system which could take (for example) a set of differential equations and a 3-d initial geometrical set-up and automatically generate a Fortran code which efficiently runs a finite differencing technique on the problem. J. Giles Los Alamos