Rounding Modes for the Floating-Point Environment

Facilities for retrieving and setting the floating-point environment's modes for rounding off numbers.

The floating point environment has a control mode to specify how to perform rounding operations. The table below lists the macros that define the modes that specify how to round off numbers.
Table 1. Rounding Modes
Macro Rounding Mode
FE_DOWNWARD To the smallest integer
FE_TONEAREST To the nearest integer
FE_TOWARDZERO To the largest integer when negative, to the smallest integer when positive
FE_UPWARD To the largest integer