🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #1195

Re: Whats wrong with floor()?

#1195
From: David Charlap
Date: Fri, 21 Aug 1992 20:08
18 lines
996 bytes
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.
Technical Details
Message-ID: <1992Aug21.200819.22295@njitgw.njit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
References: <2118@lunic.luth.se>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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