Important: The information in this document is obsolete and should not be used for new development.
fegetexcept
You can use thefegetexcept
function to save the current value of one or more floating-point exception flags.
void fegetexcept (fexcept_t *flagp, int excepts);
flagp
- A pointer to where the exception flag values are to be stored.
excepts
- A mask indicating which exception flags to save.
DESCRIPTION
Thefegetexcept
function saves the values of the floating-point exception flags specified by the argumentexcepts
to the area pointed to by the argumentflagp
. Theexcepts
argument may be one of the constants in Table 8-2 on page 8-6, two or more of these constants ORed together, or the constantFE_ALL_EXCEPT
.EXAMPLES
fegetexcept(flagp, FE_INVALID); /* saves the invalid flag */ fegetexcept(flagp, FE_INVALID|FE_OVERFLOW|FE_DIVBYZERO); /* saves the invalid, overflow, and divide-by-zero flags */ fegetexcept(flagp, FE_ALL_EXCEPT); /* saves all flags */