Path: utzoo!attcan!uunet!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!grebyn!ckp From: ckp@grebyn.com (Checkpoint Technologies) Newsgroups: comp.lang.c Subject: Re: Heroic constant folding (was micro-optimizing Message-ID: <1991Mar2.171737.9308@grebyn.com> Date: 2 Mar 91 17:17:37 GMT References: <10450@dog.ee.lbl.gov> <1991Mar2.010049.21044@grebyn.com> <992@caslon.cs.arizona.edu> Organization: Grebyn Timesharing Lines: 22 In article <992@caslon.cs.arizona.edu> dave@cs.arizona.edu (Dave P. Schaumann) writes: >In article <1991Mar2.010049.21044@grebyn.com> ckp@grebyn.com (Checkpoint Technologies) writes: >|int fib_array[1024] = {1, 1, 2, 3, 5, 8, 13, 21, /* you get the idea */ > >Do you have any idea what the value of fib_array[1024] is??!!!!! >You're asking more than just "a LOT" from the compiler... > >A quick calculation reveals fib_array[1024] is approximately 2.7 E 213. >You'd need a seriously capacious int type to hold that... oops (red face) You do have a good point there. Make that fib_array[16]. (.. and I won't even mention that fib_array[1024] is one beyond the end...) -- First comes the logo: C H E C K P O I N T T E C H N O L O G I E S / / \\ / / Then, the disclaimer: All expressed opinions are, indeed, opinions. \ / o Now for the witty part: I'm pink, therefore, I'm spam! \/