__SETFPUCW(3) Linux Programmer's Manual __SETFPUCW(3)

__setfpucw - set FPU control word on i386 architecture (obsolete)

#include <i386/fpu_control.h>

void __setfpucw(unsigned short control_word);

__setfpucw() transfers control_word to the registers of the FPU (floating point unit) on the i386 architecture. This was used to control floating point precision, rounding and floating point exceptions.

This function was a non-standard GNU extension.

As of glibc 2.1 this function does not exist anymore. There are new functions from C99, with prototypes in <fenv.h>, to control FPU rounding modes, like fegetround, fesetround, and the floating point environment, like fegetenv, feholdexcept, fesetenv, feupdateenv and FPU exception handling, like feclearexcept, fegetexceptflag, feraiseexcept, fesetexceptflag, fetestexcept.

If direct access to the FPU control word is still needed, the _FPU_GETCW and _FPU_SETCW macros from <fpu_control.h> can be used.

__setfpucw(0x1372)

Set FPU control word on the i386 architecture to
- extended precision
- rounding to nearest
- exceptions on overflow, zero divide and NaN

feclearexcept(3)
<fpu_control.h>

This page is part of release 2.78 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.

1997-03-08 Linux

Different Versions of this Page: