2004-11-03 13:51:07 +00:00
|
|
|
.\" Written Sat Mar 8 10:35:08 MEZ 1997 by J. "MUFTI" Scheurich (mufti@csv.ica.uni-stuttgart.de)
|
|
|
|
.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
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR __setfpucw ()
|
2004-11-03 13:51:07 +00:00
|
|
|
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
|
2005-07-06 08:00:30 +00:00
|
|
|
\- extended precision
|
2004-11-03 13:51:07 +00:00
|
|
|
.br
|
2005-07-06 08:00:30 +00:00
|
|
|
\- rounding to nearest
|
2004-11-03 13:51:07 +00:00
|
|
|
.br
|
2005-07-06 08:00:30 +00:00
|
|
|
\- exceptions on overflow, zero divide and NaN
|
2004-11-03 13:51:07 +00:00
|
|
|
.br
|
|
|
|
.SH AVAILABILITY
|
|
|
|
As of glibc 2.1 this function does not exist anymore.
|
|
|
|
There are new functions from ISO 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
|
2004-12-17 13:52:17 +00:00
|
|
|
If direct access to the FPU control word is still needed, the _FPU_GETCW
|
2004-11-03 13:51:07 +00:00
|
|
|
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
|