man-pages/man3/__setfpucw.3

61 lines
1.5 KiB
Groff
Raw Normal View History

2008-07-06 15:10:32 +00:00
.\" 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
.\"
2007-05-18 09:55:10 +00:00
.TH __SETFPUCW 3 1997-03-08 "Linux" "Linux Programmer's Manual"
2004-11-03 13:51:07 +00:00
.SH NAME
__setfpucw \- set FPU control word on i386 architecture (obsolete)
2004-11-03 13:51:07 +00:00
.SH SYNOPSIS
.B #include <i386/fpu_control.h>
.sp
2007-07-13 08:45:03 +00:00
.BI "void __setfpucw(unsigned short " control_word );
2004-11-03 13:51:07 +00:00
.SH DESCRIPTION
.BR __setfpucw ()
2004-11-03 13:51:07 +00:00
transfers
.I control_word
to the registers of the FPU (floating-point unit) on the i386 architecture.
This was used to control floating-point precision,
rounding and floating-point exceptions.
2007-07-18 20:25:46 +00:00
.SH CONFORMING TO
This function was a nonstandard GNU extension.
.SH NOTES
2004-11-03 13:51:07 +00:00
As of glibc 2.1 this function does not exist anymore.
2006-08-03 13:57:30 +00:00
There are new functions from C99, with prototypes in
.IR <fenv.h> ,
to control FPU rounding modes, like
2004-11-03 13:51:07 +00:00
.IR fegetround ,
.IR fesetround ,
and the floating-point environment, like
2004-11-03 13:51:07 +00:00
.IR fegetenv ,
.IR feholdexcept ,
.IR fesetenv ,
2007-09-20 16:26:31 +00:00
.I feupdateenv
and FPU exception handling, like
2004-11-03 13:51:07 +00:00
.IR feclearexcept ,
.IR fegetexceptflag ,
.IR feraiseexcept ,
.IR fesetexceptflag ,
.IR fetestexcept .
.PP
2007-12-16 13:39:24 +00:00
If direct access to the FPU control word is still needed, the
.B _FPU_GETCW
and
.B _FPU_SETCW
macros from
.I <fpu_control.h>
2004-11-03 13:51:07 +00:00
can be used.
.SH EXAMPLE
2007-09-20 16:26:31 +00:00
.B __setfpucw(0x1372)
Set FPU control word on the i386 architecture to
.br
\- extended precision
.br
\- rounding to nearest
.br
\- exceptions on overflow, zero divide and NaN
2004-11-03 13:51:07 +00:00
.SH "SEE ALSO"
.BR feclearexcept (3)
.br
.I <fpu_control.h>