home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.compilers:2274 comp.lang.fortran:5214
- Newsgroups: comp.compilers,comp.lang.fortran
- Path: sparky!uunet!think.com!spdcc!iecc!compilers-sender
- From: dodd@mycenae.cchem.berkeley.edu (Lawrence R. Dodd)
- Subject: Re: Wanted: folk theorems in Fortran Programming.
- Reply-To: dodd@mycenae.cchem.berkeley.edu (Lawrence R. Dodd)
- Organization: Dept of Chemical Engineering, Polytechnic Univ, NY, USA
- Date: Wed, 27 Jan 1993 09:20:19 GMT
- Approved: compilers@iecc.cambridge.ma.us
- Message-ID: <93-01-199@comp.compilers>
- References: <93-01-193@comp.compilers>
- Keywords: Fortran
- Sender: compilers-sender@iecc.cambridge.ma.us
- Lines: 18
-
- "Steve" Stevenson <steve@hubcap.clemson.edu> writes:
- > I am trying to make a catalog of folk wisdom in fortran programming.
-
- My personal favorite is the one discussed on page 137 of the 1st edition of
- Numerical Recipes (Fortran edition, of course):
-
- BAD
-
- P = c(1) + c(2)*x + c(3)*x**2 + c(4)*x**3 + c(5)*x**4
-
- GOOD
-
- P = c(1) + x*(c(2) + x*(c(3) + x*(c(4) + x*c(5))))
-
- It is a little harder to read but you won't be `summarily executed'
- --
- Send compilers articles to compilers@iecc.cambridge.ma.us or
- {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.
-