home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!gatech!bloom-beacon!eru.mt.luth.se!lunic!goliat.dc.luth.se!ulf
- From: ulf@goliat.dc.luth.se (Ulf Ruthberg)
- Newsgroups: comp.os.os2.programmer
- Subject: Whats wrong with floor()?
- Message-ID: <2118@lunic.luth.se>
- Date: 13 Aug 92 09:01:36 GMT
- Sender: news@luth.se
- Lines: 16
- Nntp-Posting-Host: goliat.dc.luth.se
- X-Newsreader: Tin 1.1 PL3
-
- If I do the following:
-
- double tmp=33433.740234;
-
- printf("%f %f",tmp,floor(tmp));
-
- I expect the result "33433.740234 33433"
- but what I get is "33433.740234 33433.740234
-
- A bug in GCC or in me?
-
-
- =================== Boring signature follows ==========================
- Ulf Ruthberg, ulf@dc.luth.se, {uunet,mcsun}!sunic!dc.luth.se!ulf
- Computer Service Center, Lule} University.
- ====I'd rather have a bottle in front of me, than a frontal lobotomy.====
-