OSDN Git Service

6b577e406110e1785de2d62d904e958d07f28c73
[linuxjm/LDP_man-pages.git] / original / man3 / __setfpucw.3
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 2012-12-31 "Linux" "Linux Programmer's Manual"
9 .SH NAME
10 __setfpucw \- set FPU control word on i386 architecture (obsolete)
11 .SH SYNOPSIS
12 .B #include <i386/fpu_control.h>
13 .sp
14 .BI "void __setfpucw(unsigned short " control_word );
15 .SH DESCRIPTION
16 .BR __setfpucw ()
17 transfers
18 .I control_word
19 to the registers of the FPU (floating-point unit) on the i386 architecture.
20 This was used to control floating-point precision,
21 rounding and floating-point exceptions.
22 .SH CONFORMING TO
23 This function was a nonstandard GNU extension.
24 .SH NOTES
25 As of glibc 2.1 this function does not exist anymore.
26 There are new functions from C99, with prototypes in
27 .IR <fenv.h> ,
28 to control FPU rounding modes, like
29 .BR fegetround (3),
30 .BR fesetround (3),
31 and the floating-point environment, like
32 .BR fegetenv (3),
33 .BR feholdexcept (3),
34 .BR fesetenv (3),
35 .BR feupdateenv (3),
36 and FPU exception handling, like
37 .BR feclearexcept (3),
38 .BR fegetexceptflag (3),
39 .BR feraiseexcept (3),
40 .BR fesetexceptflag (3),
41 and
42 .BR fetestexcept (3).
43 .PP
44 If direct access to the FPU control word is still needed, the
45 .B _FPU_GETCW
46 and
47 .B _FPU_SETCW
48 macros from
49 .I <fpu_control.h>
50 can be used.
51 .SH EXAMPLE
52 .B __setfpucw(0x1372)
53
54 Set FPU control word on the i386 architecture to
55 .br
56      \- extended precision
57 .br
58      \- rounding to nearest
59 .br
60      \- exceptions on overflow, zero divide and NaN
61 .SH SEE ALSO
62 .BR feclearexcept (3)
63 .br
64 .I <fpu_control.h>
65 .SH COLOPHON
66 This page is part of release 3.79 of the Linux
67 .I man-pages
68 project.
69 A description of the project,
70 information about reporting bugs,
71 and the latest version of this page,
72 can be found at
73 \%http://www.kernel.org/doc/man\-pages/.