Article View: comp.os.os2.programmer
Article #787Whats wrong with floor()?
From: Ulf Ruthberg
Date: Thu, 13 Aug 1992 09:01
Date: Thu, 13 Aug 1992 09:01
16 lines
879 bytes
879 bytes
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.====
Technical Details
Message-ID:
<2118@lunic.luth.se>Path:
arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!gatech!bloom-beacon!eru.mt.luth.se!lunic!goliat.dc.luth.se!ulfShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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