Why an application starts with FPU Control Word different than Default8087CW? : <p>Could you please help me to understand what is going on with FPU Control Word in my Delphi application, on Win32 platform.</p>

<p>When we create a new VCL application, the control word is set up to 1372h. This is the first thing I don't understand, why it is 1372h instead of 1332h which is the <code>Default8087CW</code> defined in <code>System</code> unit.</p>

<p>The difference between these two:</p>

<pre><code>1001101110010  //1372h
1001100110010  //1332h
</code></pre>

<p>is the 6th bit which according to documentation is reserved or not used.</p>

<p>The second question regards <code>CreateOleObject</code>.</p>

<pre><code>function CreateOleObject(const ClassName: string): IDispatch;
var
  ClassID: TCLSID;
begin
  try
    ClassID := ProgIDToClassID(ClassName);
{$IFDEF CPUX86}
    try
      Set8087CW( Default8087CW or $08);
{$ENDIF CPUX86}
      OleCheck(CoCreateInstance(ClassID, nil, CLSCTX_INPROC_SERVER or
        CLSCTX_LOCAL_SERVER, IDispatch, Result));
{$IFDEF CPUX86}
    finally
      Reset8087CW;
    end;
{$ENDIF CPUX86}
  except
    on E: EOleSysError do
      raise EOleSysError.Create(Format('%s, ProgID: "%s"',[E.Message, ClassName]),E.ErrorCode,0) { Do not localize }
  end;    
end;
</code></pre>

<p>The above function is changing control word to <code>137Ah</code>, so it is turning on the 3rd bit (Overflow Mask). I don't understand why it is calling <code>Reset8087CW</code> after, instead of restoring the state of the word which was before entering into the function? </p>
