<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2448.0">
<TITLE>RE: [LCP]Rounding questions</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>> point, not only did everything look correct, but the return value</FONT>
<BR><FONT SIZE=2>> suddenly changed to 29.84. Deleting any one of the fprintf()'s</FONT>
<BR><FONT SIZE=2>> caused the erroneous value to return. It didn't matter which one I</FONT>
<BR><FONT SIZE=2>> deleted. All three had to be present for the return value to be</FONT>
<BR><FONT SIZE=2>> correct.</FONT>
</P>
<P><FONT SIZE=2>It might be because of some optimization done by the compiler.</FONT>
<BR><FONT SIZE=2>Which might include moving around fp values from an FPU register</FONT>
<BR><FONT SIZE=2>to and from memory. On i386, FPU registers have better precision</FONT>
<BR><FONT SIZE=2>that the memory they are stored in, so if you move something from</FONT>
<BR><FONT SIZE=2>FPU to mem, then from mem to FPU, the value will have changed.</FONT>
<BR><FONT SIZE=2>This *may* be (part of) the problem.</FONT>
</P>
<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Vincent Penquerc'h </FONT>
</P>
</BODY>
</HTML>