Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!accelerator.eng.ohio-state.edu!phao.eng.ohio-state.edu!rob From: rob@phao.eng.ohio-state.edu (Rob Carriere) Newsgroups: comp.lang.c Subject: Re: Unnecessary Macros (was Re: Unnecessary Parenthesis) Message-ID: <712@accelerator.eng.ohio-state.edu> Date: 5 Oct 88 17:05:28 GMT References: <2089@ssc-vax.UUCP> <441@kaon.uchicago.edu> <1401@devsys.oakhill.UUCP> <23@datcon.UUCP> <8577@smoke.ARPA> <8078@haddock.ima.isc.com> <8590@smoke.ARPA> <701@accelerator.eng.ohio-state.edu> <12546@oberon.USC.EDU> Sender: news@accelerator.eng.ohio-state.edu Reply-To: rob@phao.eng.ohio-state.edu (Rob Carriere) Distribution: na Organization: Ohio State Univ, College of Engineering Lines: 14 In article <12546@oberon.USC.EDU> english@stromboli.usc.edu (Joe English) writes: >In article <701@accelerator.eng.ohio-state.edu> rob@kaa.eng.ohio-state.edu >(Rob Carriere) writes: >>I *don't* want to write [in some inner loop] >>foo = sin( x )*sin( x ) + 1.7; >Why not? Unless you're using square() for legibility, the macro >expansion is going to be sin(x) * sin(x) anyway. That was the point of the original discussion. Needlessly evaluating transcendental functions twice is generally frowned upon in numerical circles. Rob Carriere