From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E.C. Melis" To: help-gcc@gnu.org Subject: What the hell is going on? Just a simple division... Date: Fri, 31 Dec 1999 22:24:00 -0000 Message-ID: <83oqfc$2q4$1@dinkel.civ.utwente.nl> X-SW-Source: 1999-12n/msg00294.html Message-ID: <19991231222400.l3Xsy456WuirL1dQ6CZyky-80AhFe6OtGywk0SbJGj4@z> /* Using gcc-2.95.2 and linux 2.0.35 (libc5) the following program gives as output 0 1 instead of the obviously correct output 1 1 Is this a compiler bug? I have a Celeron 333 by the way. /proc/cpuinfo reports that it doesn't have an fdiv bug. Paul (melis@cs.utwente.nl) */ #include #include int main (int argc, char *argv[]) { printf ("%d\n", (int) ( log(2.0) / log(2.0) )); printf ("%d\n", (int) ( log10(2.0) / log10(2.0) )); }