| FEENABLEEXCEPT(3) | Library Functions Manual | FEENABLEEXCEPT(3) |
feenableexcept,
fedisableexcept, fegetexcept
— control floating-point exception masks
Math Library (libm, -lm)
#include <fenv.h>
int
feenableexcept(int
excepts);
int
fedisableexcept(int
excepts);
int
fegetexcept(void);
These functions provide control of the floating-point exception masks. The excepts input argument is a bitmask specifying an exception type and containing any of the values listed in feclearexcept(3).
The
feenableexcept()
function unmasks the floating-point exceptions represented by
excepts. The future floating-point operations that
produce excepts will trap, and a
SIGFPE will be delivered to the process.
The
fedisableexcept()
function masks the floating-point exceptions represented by
excepts. All exceptions are masked by default.
The
fegetexcept()
function returns the current exception mask.
The feenableexcept(), and
fedisableexcept() functions return the previous
exception mask. The fegetexcept() function returns
the current exception mask.
The feenableexcept(),
fedisableexcept(), and
fegetexcept() functions are
OpenBSD extensions.
These functions first appeared in OpenBSD 5.0.
| June 7, 2025 | Debian |