X-Authentication-Warning: sal.physics.ucsb.edu: dwhysong owned process doing -bs Date: Thu, 13 May 1999 18:24:53 -0700 (PDT) From: David Whysong To: pgcc AT delorie DOT com cc: Marc Lehmann Subject: Common subexpression elimination Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: pgcc AT delorie DOT com I hate to follow up myself, but I wrote: >inline double fast(double A1, double A2, double A3, double A4) >{ register double tmp=A3*A4; > return( A1*(A2*A3+tmp) + A2*tmp); } > >There are only 5 arithmetic operations, 3 multiplies and 2 adds. ... > >There are only 5 arithmetic operations, 3 multiplies and 2 adds. ... >functin "fast" has 4 multiplies and 2 adds (I'm not sure why it has 4 >fmul? operations instead of 3). I can't add correctly, of course there really are 4 multiplies in "fast". Dave David Whysong dwhysong AT physics DOT ucsb DOT edu Astrophysics graduate student University of California, Santa Barbara My public PGP keys are on my web page - http://www.physics.ucsb.edu/~dwhysong DSS PGP Key 0x903F5BD6 : FE78 91FE 4508 106F 7C88 1706 B792 6995 903F 5BD6 D-H PGP key 0x5DAB0F91 : BC33 0F36 FCCD E72C 441F 663A 72ED 7FB7 5DAB 0F91