__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 🌈


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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms