FEGETEXCEPTFLAG(3P)
β¨ PROLOG β¨
okay so before we even get into it β this manual page is part of the POSIX Programmer's Manual. bestie, hear me out: the Linux implementation of this interface may differ (so like, go check the corresponding Linux manual page for the deets on Linux behavior), or the interface might just straight up not be implemented on Linux at all. π
πΈ NAME πΈ
fegetexceptflag, fesetexceptflag β get and set floating-point status flags, no cap π
π SYNOPSIS π
#include <fenv.h>
int fegetexceptflag(fexcept_t *flagp, int excepts);
int fesetexceptflag(const fexcept_t *flagp, int excepts);
π¦ DESCRIPTION π¦
so the functionality described on this reference page is aligned with the ISO C standard. if there's any conflict between what's written here and the ISO C standard, that's unintentional, okay? this volume of POSIX.1β2017 defers to the ISO C standard. periodt.
the fegetexceptflag() function shall attempt to store an implementation-defined representation of the states of the floating-point status flags indicated by the argument excepts in the object pointed to by the argument flagp. literally just grabbing those flag states and tucking them away. β¨
the fesetexceptflag() function shall attempt to set the floating-point status flags indicated by the argument excepts to the states stored in the object pointed to by flagp. now the important bit, bestie: the value pointed to by flagp shall have been set by a previous call to fegetexceptflag() whose second argument represented at least those floating-point exceptions represented by the argument excepts. so like, you gotta have gotten them first, iykyk. π
and listen β this function does not raise floating-point exceptions. it only sets the state of the flags. that's it. that's the whole vibe. π
π RETURN VALUE π
if the representation was successfully stored, fegetexceptflag() shall return zero. otherwise, it shall return a non-zero value.
if the excepts argument is zero, or if all the specified exceptions were successfully set, fesetexceptflag() shall return zero. otherwise, it shall return a non-zero value. slay. π«Ά
π ERRORS π
no errors are defined. iconic behavior honestly.
heads up: the following sections are informative. β
π EXAMPLES π
none. π
π§ APPLICATION USAGE π§
none. π
π RATIONALE π
none. π
β FUTURE DIRECTIONS β
none. β¨
π₯ SEE ALSO π₯
feclearexcept()feraiseexcept()fetestexcept()- the Base Definitions volume of POSIX.1β2017,
<fenv.h>
π COPYRIGHT π
portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie π«Ά this little cutie came to you courtesy of IEEE/The Open Group, 2017, and yeah β FEGETEXCEPTFLAG(3P) is the name of the game, the header AND the footer energy, periodt. ππΈβ¨
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- 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-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms