home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
- From: dic5340@hertz.njit.edu (David Charlap)
- Newsgroups: comp.os.os2.programmer
- Subject: Re: Whats wrong with floor()?
- Message-ID: <1992Aug21.200819.22295@njitgw.njit.edu>
- Date: 21 Aug 92 20:08:19 GMT
- References: <2118@lunic.luth.se>
- Sender: news@njit.edu
- Organization: New Jersey Institute of Technology, Newark, N.J.
- Lines: 18
- Nntp-Posting-Host: hertz.njit.edu
-
- In article <2118@lunic.luth.se> ulf@goliat.dc.luth.se (Ulf Ruthberg) writes:
- >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?
-
- Did you remember to #include <math.h>?
- --
- |) David Charlap "I don't even represent myself
- /|_ dic5340@hertz.njit.edu sometimes so NJIT is right out!.
- ((|,)
- ~|~ Hi! I am a .signature virus, copy me into your .signature file.
-