Xref: news-dnh.mv.net comp.os.msdos.djgpp:3563 Path: news-dnh.mv.net!mv!news.sprintlink.net!datalytics!news.ahc.ameritech.com!ddsw1!news.mcs.net!van-bc!news.mindlink.net!agate!msunews!uwm.edu!homer.alpha.net!news.jersey.net!ns2.mainstreet.net!bug.rahul.net!a2i!rahul.net!a2i!ken.a2i!ken From: ken AT rahul DOT net (Ken Greenberg) Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug in floor/ceil Date: Sat, 02 Dec 1995 11:01:08 -0500 Organization: California Advanced Software Tools Lines: 23 References: <1995Dec2 DOT 084304 DOT 15106 AT frontier DOT tno DOT nl> Nntp-Posting-Host: foxtrot.rahul.net Nntp-Posting-User: ken To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp In article <1995Dec2 DOT 084304 DOT 15106 AT frontier DOT tno DOT nl>, antwerp AT tpd DOT tno DOT nl (Gert van Antwerpen) wrote: >Hai folks, > >I found a problem in the floor/ceil of the emu386.dxe and libemu.a. >The following program gives 3 times zero (0)! > >#include > >main() >{ > printf("%g\n",floor(.1)); > printf("%g\n",floor(.5)); > printf("%g\n",floor(.9)); >} Well, that's what floor does. Floor returns a floating point value that represents the largest integer that is less than or equal to its argument. For any value v such that 0 < v < 0.9999999...., floor returns zero. -- Ken Greenberg | "Sorry" isn't good enough; ken AT rahul DOT net | you have to stop screwing up. Los Gatos, CA | -S. Manchester