]>
Commit | Line | Data |
---|---|---|
3d54a910 MK |
1 | .\" Written Sat Mar 8 10:35:08 MEZ 1997 by |
2 | .\" J. "MUFTI" Scheurich (mufti@csv.ica.uni-stuttgart.de) | |
7674db48 MK |
3 | .\" This page is licensed under the GNU General Public License |
4 | .\" | |
69962544 | 5 | .TH __SETFPUCW 3 1997-03-08 "Linux" "Linux Programmer's Manual" |
fea681da | 6 | .SH NAME |
696dbf1a | 7 | __setfpucw \- set FPU control word on i386 architecture (obsolete) |
fea681da MK |
8 | .SH SYNOPSIS |
9 | .B #include <i386/fpu_control.h> | |
10 | .sp | |
84b1afa3 | 11 | .BI "void __setfpucw(unsigned short " control_word ); |
fea681da | 12 | .SH DESCRIPTION |
e511ffb6 | 13 | .BR __setfpucw () |
fea681da | 14 | transfers |
c13182ef | 15 | .I control_word |
c45bd688 MK |
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. | |
2cd8446a | 19 | .SH CONFORMING TO |
c8f2dd47 | 20 | This function was a nonstandard GNU extension. |
696dbf1a | 21 | .SH NOTES |
fea681da | 22 | As of glibc 2.1 this function does not exist anymore. |
68e1685c | 23 | There are new functions from C99, with prototypes in |
3ea909db | 24 | .IR <fenv.h> , |
696dbf1a | 25 | to control FPU rounding modes, like |
fea681da MK |
26 | .IR fegetround , |
27 | .IR fesetround , | |
c45bd688 | 28 | and the floating-point environment, like |
fea681da MK |
29 | .IR fegetenv , |
30 | .IR feholdexcept , | |
31 | .IR fesetenv , | |
0daa9e92 | 32 | .I feupdateenv |
696dbf1a | 33 | and FPU exception handling, like |
fea681da MK |
34 | .IR feclearexcept , |
35 | .IR fegetexceptflag , | |
36 | .IR feraiseexcept , | |
37 | .IR fesetexceptflag , | |
38 | .IR fetestexcept . | |
39 | .PP | |
ec5a588f MK |
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 | |
3ea909db | 45 | .I <fpu_control.h> |
fea681da | 46 | can be used. |
2b2581ee | 47 | .SH EXAMPLE |
0daa9e92 | 48 | .B __setfpucw(0x1372) |
2b2581ee | 49 | |
696dbf1a | 50 | Set FPU control word on the i386 architecture to |
2b2581ee MK |
51 | .br |
52 | \- extended precision | |
53 | .br | |
54 | \- rounding to nearest | |
55 | .br | |
56 | \- exceptions on overflow, zero divide and NaN | |
fea681da MK |
57 | .SH "SEE ALSO" |
58 | .BR feclearexcept (3) | |
59 | .br | |
3ea909db | 60 | .I <fpu_control.h> |