Date: Fri, 29 Nov 1996 14:26:38 +0300 (MSK) From: "Alexander V. Lukyanov" Message-Id: <199611291126.OAA25240@video.yars.free.net> To: afonso AT inesca DOT inesca DOT pt, djgpp AT delorie DOT com Subject: Re: Problems with DJGPP V2.01 - atof() function > I've got result = 112!!! not 113 as I wished, because > the function atof() return is 1.29999... not 1.13 (and I only have > an old i386). > I think that problem is a bug of DJGPP Library V2.xx. It is not a bug in library. It is a general limitation of floating pointer numbers in base 2. The number 1.13 written in binary notation is a periodic number and can't be expressed precicely in types float or double. In general, you can't trust floating numbers in being precice, there is almost always an error.