fetestexcept() — Test the floating-point status flags

Standards

Standards / Extensions C or C++ Dependencies

C99
Single UNIX Specification, Version 3
C++ TR1 C99

both  z/OS V1R7

Format

#define _ISOC99_SOURCE
#include <fenv.h>

int fetestexcept(int excepts);

General description

fetestexcept() determines which of a specified subset of floating-point exception flags are currently set. excepts specifies the floating-point status flags to be queried.
Note: The following table shows the viable formats for these functions. See IEEE binary floating-point for more information about IEEE Binary Floating-Point.
Function Hex IEEE
fetestexcept   X

Returned value

If successful, fetestexcept() returns the value of the bitwise OR for the floating-point exception macros corresponding to the currently set floating-point exceptions included in excepts.