Date: Tue, 3 Dec 1996 08:40:30 +0200 (IST) From: Eli Zaretskii To: Joe Wright cc: djgpp AT delorie DOT com Subject: Re: Problems with DJGPP V2.01 - atof() function In-Reply-To: <32A33C44.68FE@exis.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 2 Dec 1996, Joe Wright wrote: > the result 'wrong' but why are they different? Why does i=(int)(f*100); > yield a different result than f=f*100; i=(int)f; ? Why? Because the second one involves an extra store of an intermediate result into the float variable `f', which causes the result to be rounded, because a float is 32 bit while the FPU internally uses 80 bits.