System.Set8087CW
Contents |
Delphi Information
From System.pas
procedure Set8087CW(NewCW: Word);
Unit: System
Type: procedure
Visibility: public
C++ Information
From System.hpp
void __fastcall Set8087CW(unsigned short NewCW);
Unit: System
Type: function
Description
Sets both the control word in the floating-point unit and the variable NoErrMsg declared in the system unit.
The floating-point unit control word controls the precision of floating-point calculations, the rounding mode, and whether certain floating-point operations trigger exceptions. See the Intel processor documentation for details.
This routine allows you to have direct access to the CW. Be aware that using this routine to change the value of the 8087CW changes the behavior of the program's FP calculations. To avoid this, reset it.
We recommend that you disable all floating-point exceptions when using OpenGL to render 3D graphics. To do this, call Set8087CW(0x133f) in your main form's OnCreate event before calling any OpenGL functions.
See Also
Code Samples