# fenv.h - [Overview](#section792694826165627) - [Summary](#section154874694165627) - [Data Structures](#nested-classes) - [Macros](#define-members) - [Typedefs](#typedef-members) ## **Overview** **Related Modules:** [MATH](MATH.md) **Description:** Declares specific functions for performing operations for floating-point exceptions and rounding modes. You can use the functions provided in this file to set, clear, and store the current floating-point exception and to obtain and set the current rounding mode. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Data Structures

Data Structure Name

Description

fenv_t

Defines the floating-point environment.

## Macros

Macro Name and Value

Description

FE_INVALID 1

Indicates an invalid floating-point exception. At least one parameter value is not defined in the function.

FE_DIVBYZERO 2

Indicates a pole error exception. The return value is asymptotically infinite when the divisor is zero or the input is asymptotic to zero.

FE_OVERFLOW 4

Indicates an overflow floating-point exception. The result is too large to be represented in the normal return value.

FE_UNDERFLOW 8

Indicates an underflow floating-point exception. The result is too small to be represented in the normal return value.

FE_INEXACT 16

Indicates an inexact floating-point exception.

FE_ALL_EXCEPT 31

Indicates bitwise OR of all the preceding supported floating-point exceptions.

FE_TONEAREST 0

Indicates rounding towards the nearest integer.

FE_DOWNWARD 0x800000

Indicates rounding towards negative infinity.

FE_UPWARD 0x400000

Indicates rounding towards positive infinity.

FE_TOWARDZERO 0xc00000

Indicates rounding towards zero.

FE_DFL_ENV ((const fenv_t *) -1)

Defines the default floating-point environment.

## Typedefs

Typedef Name

Description

fexcept_t

typedef unsigned long

Floating-point exception type.