<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>Hello,<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>I am compiling Clp with Visual C++ 2008. In Release
build, I got an infinite recursion in the function below because the condition tolerance&gt;saveTolerance
always evaluated to true, although tolerance was in fact never touched after
copying it into saveTolerance. The problem was that saveTolerance was stored in
memory, and thus was truncated to 64 bit. tolerance was kept in an FPU register
with all 80 bits. Thus tolerance was slightly larger than saveTolerance in the
comparison. I verified this from the generated assembly code.<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>/fp:precise did not solve the problem (and did not either
in Visual C++ 2005 SP1), although from the documentation, it should, because
assignments should force rounding. In fact, the generated code still kept
tolerance in an FPU register. /fp:strict fixed it but is not recommended for
performance. I propose the patch below to side-step the problem. There is one
caveat where I would need Lou's input: if model_-&gt;largestDualError() is only
slightly larger than model_-&gt;largestPrimalError(), it is conceivable that
after the multiplication, still tolerance==saveTolerance, and we still recurse.
Does that break the code?<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>Thank you for help,<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>Arno<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>--- .\Clp\src\ClpDualRowSteepest.cpp      Sat Aug  9
23:05:22 2008<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>+++ .\Clp\src\ClpDualRowSteepest.cpp      Sat Aug  9
22:36:45 2008<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>@@ -168,7 +168,6 @@<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   // But cap<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   tolerance = CoinMin(1000.0,tolerance);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   tolerance *= tolerance; // as we are using
squares<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>-  double saveTolerance = tolerance;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   double * solution = model_-&gt;solutionRegion();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   double * lower = model_-&gt;lowerRegion();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   double * upper = model_-&gt;upperRegion();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>@@ -223,10 +222,13 @@<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   if (model_-&gt;numberIterations()&lt;0)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>     printf(&quot;aac_p it
%d\n&quot;,model_-&gt;numberIterations());<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> #endif<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>+  bool bToleranceIncreased=false;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>  
if(model_-&gt;numberIterations()&lt;model_-&gt;lastBadIteration()+200) {<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>     // we can't really trust infeasibilities if
there is dual error<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>-    if
(model_-&gt;largestDualError()&gt;model_-&gt;largestPrimalError())<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>+     if
(model_-&gt;largestDualError()&gt;model_-&gt;largestPrimalError()) {<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>       tolerance *= CoinMin(model_-&gt;largestDualError()/model_-&gt;largestPrimalError(),1000.0);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>+      bToleranceIncreased=true;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>+     }<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   }<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   int numberWanted;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   if (mode_&lt;2 ) {<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>@@ -318,7 +320,7 @@<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>       break;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   }<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>   //printf(&quot;smallest %g largest
%g\n&quot;,smallestWeight,largestWeight);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>-  if (chosenRow&lt;0&amp;&amp;
tolerance&gt;saveTolerance) {<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>+  if (chosenRow&lt;0&amp;&amp; bToleranceIncreased)
{<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>     // won't line up with checkPrimalSolution - do
again<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>     double saveError =
model_-&gt;largestDualError();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>     model_-&gt;setLargestDualError(0.0);<o:p></o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<!--[object_id=#f07f96e4527b794aa3055b09cc01d6b0#]--><TABLE style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma,Verdana,Arial" cellSpacing=0>
<TBODY>
<TR>
<TD style="PADDING-RIGHT: 10pt">-- </TD></TR>
<TR>
<TD style="PADDING-RIGHT: 10pt">Dr. Arno Schoedl </TD>
<TD colSpan=2><B><A href="mailto:aschoedl@think-cell.com">aschoedl@think-cell.com</A></B> </TD></TR>
<TR style="HEIGHT: 20pt" vAlign=top>
<TD>Technical Director </TD></TR>
<TR>
<TD style="PADDING-RIGHT: 10pt">think-cell Software GmbH </TD>
<TD colSpan=2><B><A href="http://www.think-cell.com/">http://www.think-cell.com</A></B> </TD></TR>
<TR>
<TD style="PADDING-RIGHT: 10pt">Invalidenstr. 34 </TD>
<TD style="PADDING-RIGHT: 5pt">phone </TD>
<TD>+49-30-666473-10 </TD></TR>
<TR style="HEIGHT: 20pt" vAlign=top>
<TD style="PADDING-RIGHT: 10pt">10115 Berlin, Germany </TD>
<TD style="PADDING-RIGHT: 5pt">fax </TD>
<TD>+49-30-666473-19 </TD></TR>
<TR>
<TD colSpan=3>Geschäftsführer: Dr. Markus Hannebauer, Dr. Arno Schoedl </TD></TR>
<TR>
<TD colSpan=3>Amtsgericht Charlottenburg, HRB 85229 </TD></TR></TBODY></TABLE></body>

</html>