File: __setfpucw.3

package info (click to toggle)
manpages 2.39-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,712 kB
  • ctags: 7
  • sloc: sh: 361; perl: 162; makefile: 73; lisp: 22
file content (57 lines) | stat: -rw-r--r-- 1,558 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.\" Written Sat Mar  8 10:35:08 MEZ 1997 by J. "MUFTI" Scheurich (mufti@csv.ica.uni-stuttgart.de)
.\" This page is licensed under the GNU General Public License
.\"
.TH __SETFPUCW 3 1997-03-08 "i386 Linux Man Page" "Linux Programmer's Manual"
.SH NAME
__setfpucw \- set fpu control word on i386 architecture (obsolete)
.SH SYNOPSIS
.B #include <i386/fpu_control.h>
.sp
.BI "void __setfpucw((unsigned short) " control_word );
.br
.SH DESCRIPTION
.BR __setfpucw ()
transfers
.I control_word 
to the registers of the fpu (floating point unit) on i386 architecture. This 
was used to control floating point precision, rounding and floating point 
exceptions.
.SH EXAMPLE

.BR __setfpucw(0x1372)

Set fpu control word on i386 architecture to
.br
     \- extended precision
.br     
     \- rounding to nearest
.br     
     \- exceptions on overflow, zero divide and NaN
.br 
.SH AVAILABILITY
As of glibc 2.1 this function does not exist anymore.
There are new functions from C99, with prototypes in
.IR /usr/include/fenv.h ,
to control fpu rounding modes, like
.IR fegetround ,
.IR fesetround ,
and the floating point environment, like
.IR fegetenv ,
.IR feholdexcept ,
.IR fesetenv ,
.IR feupdateenv 
and fpu exception handling, like
.IR feclearexcept ,
.IR fegetexceptflag ,
.IR feraiseexcept ,
.IR fesetexceptflag ,
.IR fetestexcept .
.PP
If direct access to the FPU control word is still needed, the _FPU_GETCW
and _FPU_SETCW macros from
.I /usr/include/fpu_control.h
can be used.
.SH "SEE ALSO"
.BR feclearexcept (3)
.br
.IR /usr/include/i386/fpu_control.h