home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / programm / 4190 < prev    next >
Encoding:
Internet Message Format  |  1992-08-12  |  852 b 

  1. Path: sparky!uunet!dtix!darwin.sura.net!gatech!bloom-beacon!eru.mt.luth.se!lunic!goliat.dc.luth.se!ulf
  2. From: ulf@goliat.dc.luth.se (Ulf Ruthberg)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Whats wrong with floor()?
  5. Message-ID: <2118@lunic.luth.se>
  6. Date: 13 Aug 92 09:01:36 GMT
  7. Sender: news@luth.se
  8. Lines: 16
  9. Nntp-Posting-Host: goliat.dc.luth.se
  10. X-Newsreader: Tin 1.1 PL3
  11.  
  12. If I do the following:
  13.  
  14. double tmp=33433.740234;
  15.  
  16. printf("%f %f",tmp,floor(tmp));
  17.  
  18. I expect the result "33433.740234 33433"
  19. but what I get is "33433.740234 33433.740234
  20.  
  21. A bug in GCC or in me?
  22.  
  23.  
  24.    ===================  Boring signature follows  ==========================
  25.        Ulf Ruthberg, ulf@dc.luth.se, {uunet,mcsun}!sunic!dc.luth.se!ulf
  26.                Computer Service Center, Lule} University.
  27.    ====I'd rather have a bottle in front of me, than a frontal lobotomy.====
  28.