Changes: Ready for 5.13
[man-pages.git] / man3 / __setfpucw.3
blobb7daecde90e2bf028706aae212d0e3647ce2cf9b
1 .\" Written Sat Mar  8 10:35:08 MEZ 1997 by
2 .\" J. "MUFTI" Scheurich (mufti@csv.ica.uni-stuttgart.de)
3 .\"
4 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
5 .\" This page is licensed under the GNU General Public License
6 .\" %%%LICENSE_END
7 .\"
8 .TH __SETFPUCW 3 2021-03-22 "Linux" "Linux Programmer's Manual"
9 .SH NAME
10 __setfpucw \- set FPU control word on i386 architecture (obsolete)
11 .SH SYNOPSIS
12 .nf
13 .B #include <i386/fpu_control.h>
14 .PP
15 .BI "void __setfpucw(unsigned short " control_word );
16 .fi
17 .SH DESCRIPTION
18 .BR __setfpucw ()
19 transfers
20 .I control_word
21 to the registers of the FPU (floating-point unit) on the i386 architecture.
22 This was used to control floating-point precision,
23 rounding and floating-point exceptions.
24 .SH CONFORMING TO
25 This function was a nonstandard GNU extension.
26 .SH NOTES
27 As of glibc 2.1 this function does not exist anymore.
28 There are new functions from C99, with prototypes in
29 .IR <fenv.h> ,
30 to control FPU rounding modes, like
31 .BR fegetround (3),
32 .BR fesetround (3),
33 and the floating-point environment, like
34 .BR fegetenv (3),
35 .BR feholdexcept (3),
36 .BR fesetenv (3),
37 .BR feupdateenv (3),
38 and FPU exception handling, like
39 .BR feclearexcept (3),
40 .BR fegetexceptflag (3),
41 .BR feraiseexcept (3),
42 .BR fesetexceptflag (3),
43 and
44 .BR fetestexcept (3).
45 .PP
46 If direct access to the FPU control word is still needed, the
47 .B _FPU_GETCW
48 and
49 .B _FPU_SETCW
50 macros from
51 .I <fpu_control.h>
52 can be used.
53 .SH EXAMPLES
54 .B __setfpucw(0x1372)
55 .PP
56 Set FPU control word on the i386 architecture to
57      \- extended precision
58      \- rounding to nearest
59      \- exceptions on overflow, zero divide and NaN
60 .SH SEE ALSO
61 .BR feclearexcept (3)
62 .PP
63 .I <fpu_control.h>