System.Set8087CW
Delphi
procedure Set8087CW(NewCW: Word);
C++
extern DELPHI_PACKAGE void __fastcall Set8087CW(Word NewCW);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.pas System.hpp |
System | System |
Description
Sets the FPU control word.
On 32-bit Windows: This control word controls the precision of floating-point calculations, the rounding mode, and whether certain floating-point operations trigger exceptions. See the Intel processors' 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 the 8087CW. For an example, see the Set8087CW code examples, listed below.
Note: To change the exception mode, the rounding mode, and the precision for floating-point numbers, we recommend that you use System.Math.SetExceptionMask, System.Math.SetRoundMode, and System.Math.SetPrecisionMode instead of Set8087CW or System.SetMXCSR.
On 64-bit Windows: This control word does not control floating-point operations, because the SSE register is used for floating point in 64-bit mode, instead of the FPU (floating-point unit). However the FPU is still present in 64-bit mode, so Set8087CW sets the value of the control word, as in 32-bit mode.
On iOS/Simulator: This function does not change the exception for the X87 control word mask bits. The masked bits for this exception always have the value 1.
See Also
- System.Reset8087CW
- System.Get8087CW
- System.SetMXCSR
- System.Math.SetExceptionMask
- System.Math.SetRoundMode
- System.Math.SetPrecisionMode
- System.SetMXCSR
- Floating-Point Number Control Routines
Code Examples