| 1 |
.\" Copyright 1997, J. "MUFTI" Scheurich <[email protected]> |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: GPL-1.0-or-later |
| 5 |
.\" |
| 6 |
.TH __setfpucw 3 2026-02-08 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
__setfpucw \- set FPU control word on i386 architecture (obsolete) |
| 9 |
.SH LIBRARY |
| 10 |
Standard C library |
| 11 |
.RI ( libc ,\~ \-lc ) |
| 12 |
.SH SYNOPSIS |
| 13 |
.nf |
| 14 |
.B #include <i386/fpu_control.h> |
| 15 |
.P |
| 16 |
.BI "[[deprecated]] void __setfpucw(unsigned short " control_word ); |
| 17 |
.fi |
| 18 |
.SH DESCRIPTION |
| 19 |
.BR __setfpucw () |
| 20 |
transfers |
| 21 |
.I control_word |
| 22 |
to the registers of the FPU (floating-point unit) on the i386 architecture. |
| 23 |
This was used to control floating-point precision, |
| 24 |
rounding and floating-point exceptions. |
| 25 |
.SH STANDARDS |
| 26 |
GNU. |
| 27 |
.SH HISTORY |
| 28 |
Removed in glibc 2.1. |
| 29 |
.SH NOTES |
| 30 |
There are new functions from C99, with prototypes in |
| 31 |
.IR <fenv.h> , |
| 32 |
to control FPU rounding modes, like |
| 33 |
.BR fegetround (3), |
| 34 |
.BR fesetround (3), |
| 35 |
and the floating-point environment, like |
| 36 |
.BR fegetenv (3), |
| 37 |
.BR feholdexcept (3), |
| 38 |
.BR fesetenv (3), |
| 39 |
.BR feupdateenv (3), |
| 40 |
and FPU exception handling, like |
| 41 |
.BR feclearexcept (3), |
| 42 |
.BR fegetexceptflag (3), |
| 43 |
.BR feraiseexcept (3), |
| 44 |
.BR fesetexceptflag (3), |
| 45 |
and |
| 46 |
.BR fetestexcept (3). |
| 47 |
.P |
| 48 |
If direct access to the FPU control word is still needed, the |
| 49 |
.B _FPU_GETCW |
| 50 |
and |
| 51 |
.B _FPU_SETCW |
| 52 |
macros from |
| 53 |
.I <fpu_control.h> |
| 54 |
can be used. |
| 55 |
.SH EXAMPLES |
| 56 |
.B __setfpucw(0x1372) |
| 57 |
.P |
| 58 |
Set FPU control word on the i386 architecture to |
| 59 |
.RS |
| 60 |
.PD 0 |
| 61 |
.IP \[bu] 3 |
| 62 |
extended precision |
| 63 |
.IP \[bu] |
| 64 |
rounding to nearest |
| 65 |
.IP \[bu] |
| 66 |
exceptions on overflow, zero divide and NaN |
| 67 |
.PD |
| 68 |
.RE |
| 69 |
.SH SEE ALSO |
| 70 |
.BR feclearexcept (3) |
| 71 |
.P |
| 72 |
.I <fpu_control.h> |