From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: Problems with DJGPP V2.01 - atof() function Date: Tue, 03 Dec 1996 09:18:18 -0800 Organization: Alcyone Systems Lines: 16 Message-ID: <32A460DA.6D5AA16B@alcyone.com> References: <329e68a5 DOT 10316617 AT news DOT ua DOT pt> <32A03F1D DOT 4967 AT pobox DOT oleane DOT com> <32a3151a DOT 978532 AT news DOT ox DOT ac DOT uk> <32A33C44 DOT 68FE AT exis DOT net> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Joe Wright wrote: > Not so fast. Before the answer, we have the real question: Not why is > 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? Clearly the > compiler is doing conversions differently in the two cases. As I said earlier, I'm not seeing any difference here (at least with gcc 2.7.2 under Linux). -- Erik Max Francis | max AT alcyone DOT com Alcyone Systems | http://www.alcyone.com/max/ San Jose, California | 37 20 07 N 121 53 38 W &tSftDotIotE | R^4: the 4th R is respect "But since when can wounded eyes see | If we weren't who we were"