Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content


Sets the floating-point control word.

void __cdecl _set_controlfp(
    unsigned int newControl,
    unsigned int mask


New control-word bit values.


Mask for new control-word bits to set.

The _set_controlfp is similar to _control87, but it only sets the floating-point control word to newControl. The bits in the values indicate the floating-point control state. The floating-point control state allows the program to change the precision, rounding, and infinity modes in the floating-point math package. You can also mask or unmask floating-point exceptions using _set_controlfp. For more information, see _control87, _controlfp, __control87_2.

This function is deprecated when compiling with /clr (Common Language Runtime Compilation) or /clr:pure because the common language runtime only supports the default floating-point precision.


Required header




x86 processor only

For more compatibility information, see Compatibility in the Introduction.

© 2015 Microsoft