From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,4f7a405235f760ec X-Google-Attributes: gid1164f8,public From: hoffman@xdelta.enet.dec.com.no-spam (Stephen Hoff Hoffman) Subject: Re: Bug in C compiler? Date: 1996/09/19 Message-ID: <51rtb5$f94@usenet.pa.dec.com>#1/1 X-Deja-AN: 184015279 distribution: world references: <4buf2zhlw.fsf@ruls41.fsw.LeidenUniv.nl> organization: Digital Equipment Corp reply-to: hoffman@xdelta.zko.dec.com.no-spam newsgroups: comp.sys.dec In article <4buf2zhlw.fsf@ruls41.fsw.LeidenUniv.nl>, vosse@ruls41.fsw.LeidenUniv.nl (Theo Vosse) writes: :I wrote this piece of program: : :static double FillBinomTable(double tab[], int b) :{ .. :} : :which fills a table with binomial probabilities. The problem is that :when I use DEC's c compiler (with -g), 'factor' becomes 0.707106..., :which is sqrt(2), whereas when I use gcc, it becomes 1/(2**b). The :last one is correct. : :Is this some kind of optimizer bug? Please e-mail me with the operating system and version, platform, and the complete series of DCL or shell commands used to compile and build the image here, and a *short* standalone copy of the C source to me, and I'll pass it all along to the appropriate engineering folks. (From the compiler commands, I'll be able to tell which C compiler is involved, but -- if applicable -- the C compiler version would also be useful.) When e-mailing, note I have munged the headers. -------------------------- pure personal opinion --------------------------- Stephen 'Hoff' Hoffman OpenVMS Engineering hoffman@xdelta.enet.dec.com OpenVMS Frequently Asked Questions (FAQ): http://www.openvms.digital.com