1.5. Data Definitions for libm

This section defines global identifiers and their values that are associated with interfaces contained in libm. These definitions are organized into groups that correspond to system headers. This convention is used as a convenience for the reader, and does not imply the existence of these headers, or their content.

These definitions are intended to supplement those provided in the referenced underlying specifications.

This specification uses ISO/IEC 9899 C Language as the reference programming language, and data definitions are specified in ISO C format. The C language is used here as a convenient notation. Using a C language description of these data objects does not preclude their use by other programming languages.

1.5.1. fenv.h


#define FE_INVALID	(1 << (31 - 2))
#define FE_OVERFLOW	(1 << (31 - 3))
#define FE_UNDERFLOW	(1 << (31 - 4))
#define FE_DIVBYZERO	(1 << (31 - 5))
#define FE_INEXACT	(1 << (31 - 6))

#define FE_ALL_EXCEPT	(FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)

#define FE_TONEAREST	0
#define FE_TOWARDZERO	1
#define FE_DOWNWARD	3

typedef unsigned int fexcept_t;

typedef double fenv_t;
#define FE_DFL_ENV	(& __fe_dfl_env)

1.5.2. math.h


#define fpclassify(x)	(sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x) )
#define signbit(x)	(sizeof (x) == sizeof (float)? __signbitf (x): __signbit (x))

#define FP_ILOGB0	-2147483647
#define FP_ILOGBNAN	2147483647