Date: Fri, 23 Mar 2001 14:45:18 +0500 From: berkus X-Mailer: The Bat! (v1.47 Halloween Edition) Personal Organization: XQ X-Priority: 3 (Normal) Message-ID: <6646730334.20010323144518@k45.ru> To: djgpp AT delorie DOT com Subject: Re: Strange behavior in loops!! In-reply-To: <200103230505.AAA00595@delorie.com> References: <200103230505 DOT AAA00595 AT delorie DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Use The Source, Eric! Replying to your mail dated Friday, March 23, 2001, 10:05:03 AM, about "Strange behavior in loops!!": LAadc> float from=.3,to=.5,by=.05; LAadc> float x; Switching to "double" solves this. (Rounding errors?) LAadc> for (x=from;x<=to;x+=by) LAadc> (void)printf("%g\n",x); Is there a need for (void) ?!? keep in touch. berkus. * mailto:berk AT k45 DOT ru * http://ber.k45.ru * ICQ UIN 49516372 * * The Go! operating system development: http://attend.to/go *