__setfpucw(3)
π __setfpucw β the i386 FPU control word girlie π
okay so real talk, bestie: we're in section 3 of the Library Functions Manual and this page is lowkey a museum exhibit. it's giving vintage. it's giving "removed in glibc 2.1". but you asked, so we're gonna learn it properly. π«Ά
β¨ NAME β¨
__setfpucw β set the FPU control word on the i386 architecture (and yes, she is obsolete, keep reading, we'll get to that π)
π LIBRARY π
Standard C library (libc, -lc) β the classic, the icon, the one you already have linked.
π SYNOPSIS π
#include <i386/fpu_control.h>
[[deprecated]] void __setfpucw(unsigned short control_word);
see that [[deprecated]] right there? that's the compiler literally side-eyeing you. respect the label. π
πΈ DESCRIPTION πΈ
so what does she do? __setfpucw() transfers control_word straight to the registers of the FPU (floating-point unit) on the i386 architecture. π
back in the day this was the way to control:
- floating-point precision
- floating-point rounding
- floating-point exceptions
that's it, that's the whole job. one unsigned short and you're controlling how your floats behave. main character energy honestly. β¨
β STANDARDS β
GNU. that's the whole standard section. GNU. periodt. π
π HISTORY π
Removed in glibc 2.1.
girl. she's gone. if you're on anything remotely modern, this function does not exist. do not come for her, she has left the building. π
π§ NOTES π§
okay so, since __setfpucw() packed her bags, C99 came through with a whole new crew of functions, prototypes chilling in <fenv.h>. here's the full roster, no cap:
controlling FPU rounding modes:
the floating-point environment:
FPU exception handling:
and if you still genuinely need to poke the FPU control word directly β like, direct access, no middleman β the _FPU_GETCW and _FPU_SETCW macros from <fpu_control.h> are right there for you. π (note: <fpu_control.h>, not the <i386/fpu_control.h> from the synopsis. that distinction? iconic.)
π₯ EXAMPLES π₯
__setfpucw(0x1372)
what does that magic number do? it sets the FPU control word on the i386 architecture to:
- extended precision
- rounding to nearest
- exceptions on overflow, zero divide and NaN
three for one, ate that. no crumbs. π
π SEE ALSO π
feclearexcept(3)<fpu_control.h>
that's the whole page, bestie! π¦ source: Linux man-pages 6.20, dated 2026-02-08 β go forth, respect the deprecated tag, and use <fenv.h> like a modern girlie. mwah. πβ¨π
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: GPL-1.0-or-later
- Copyright 1997, J. "MUFTI" Scheurich <mufti@csv.ica.uni-stuttgart.de>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms