Xref: news-dnh.mv.net comp.os.msdos.djgpp:3571 Newsgroups: comp.os.msdos.djgpp Path: news-dnh.mv.net!mv!news.sprintlink.net!hk.gin.net!news.hk.net!hpg30a.csc.cuhk.hk!cuhknntp!news.uoregon.edu!europa.chnt.gtegsc.com!newsxfer.itd.umich.edu!chi-news.cic.net!madison.tdsnet.com!gail.ripco.com!mambuhl From: mambuhl AT ripco DOT com (Martin Ambuhl) Subject: Re: Bug in floor/ceil Sender: usenet AT rci DOT ripco DOT com (Net News Admin) Organization: Ripco Internet BBS Chicago Date: Sat, 2 Dec 1995 20:08:51 GMT Lines: 24 To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp antwerp AT tpd DOT tno DOT nl (Gert van Antwerpen) in <1995Dec2 DOT 084304 DOT 15106 AT frontier DOT tno DOT nl> writes: >I found a problem in the floor/ceil of the emu386.dxe and libemu.a. >The following program gives 3 times zero (0)! What did you expect? floor(x) computes the largest integral value not greater than x. largest_integral_value_not_greater_than(.1) == 0 largest_integral_value_not_greater_than(.5) == 0 largest_integral_value_not_greater_than(.9) == 0 >#include >main() >{ > printf("%g\n",floor(.1)); > printf("%g\n",floor(.5)); > printf("%g\n",floor(.9)); >} -- * Martin Ambuhl net: mambuhl AT ripco DOT com * Chicago, IL (USA)