Heroic constant folding (was micro-optimizing
Checkpoint Technologies
ckp at grebyn.com
Sun Mar 3 03:17:37 AEST 1991
In article <992 at caslon.cs.arizona.edu> dave at cs.arizona.edu (Dave P. Schaumann) writes:
>In article <1991Mar2.010049.21044 at grebyn.com> ckp at 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! \/
More information about the Comp.lang.c
mailing list