OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / 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 .\" This page is licensed under the GNU General Public License
4 .\"
5 .TH __SETFPUCW 3 1997-03-08 "Linux" "Linux Programmer's Manual"
6 .SH NAME
7 __setfpucw \- set FPU control word on i386 architecture (obsolete)
8 .SH SYNOPSIS
9 .B #include <i386/fpu_control.h>
10 .sp
11 .BI "void __setfpucw(unsigned short " control_word );
12 .SH DESCRIPTION
13 .BR __setfpucw ()
14 transfers
15 .I control_word
16 to the registers of the FPU (floating-point unit) on the i386 architecture.
17 This was used to control floating-point precision,
18 rounding and floating-point exceptions.
19 .SH CONFORMING TO
20 This function was a nonstandard GNU extension.
21 .SH NOTES
22 As of glibc 2.1 this function does not exist anymore.
23 There are new functions from C99, with prototypes in
24 .IR <fenv.h> ,
25 to control FPU rounding modes, like
26 .IR fegetround ,
27 .IR fesetround ,
28 and the floating-point environment, like
29 .IR fegetenv ,
30 .IR feholdexcept ,
31 .IR fesetenv ,
32 .I feupdateenv
33 and FPU exception handling, like
34 .IR feclearexcept ,
35 .IR fegetexceptflag ,
36 .IR feraiseexcept ,
37 .IR fesetexceptflag ,
38 .IR fetestexcept .
39 .PP
40 If direct access to the FPU control word is still needed, the
41 .B _FPU_GETCW
42 and
43 .B _FPU_SETCW
44 macros from
45 .I <fpu_control.h>
46 can be used.
47 .SH EXAMPLE
48 .B __setfpucw(0x1372)
49
50 Set FPU control word on the i386 architecture to
51 .br
52      \- extended precision
53 .br
54      \- rounding to nearest
55 .br
56      \- exceptions on overflow, zero divide and NaN
57 .SH "SEE ALSO"
58 .BR feclearexcept (3)
59 .br
60 .I <fpu_control.h>