##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# FE_DOWNWARD, FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD

From cppreference.com
< c‎ | numeric‎ | fenv

Defined in header `<<fenv.h>>` |  |
#define FE_DOWNWARD /*implementation defined*/ |  | (since C99)
#define FE_TONEAREST /*implementation defined*/ |  | (since C99)
#define FE_TOWARDZERO /*implementation defined*/ |  | (since C99)
#define FE_UPWARD /*implementation defined*/ |  | (since C99)

Each of these macro constants expands to a nonnegative integer constant expression, which can me used with fesetround and fegetround to indicate one of the supported floating-point rounding modes. The implementation may define additional rounding mode constants in `<fenv.h>`, which should all begin with `FE_` followed by at least one uppercase letter. Each macro is only defined if it is supported.

On most implementations, these macro constants expand to the values equal to the values of FLT_ROUNDS and float_round_style

Constant | Explanation
`FE_DOWNWARD` | rounding towards negative infinity
`FE_TONEAREST` | rounding towards nearest integer
`FE_TOWARDZERO` | rounding towards zero
`FE_UPWARD` | rounding towards positive infinity

Additional rounding modes may be supported by an implementation.

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

fegetround fesetround (C99)(C99) | gets or sets rounding direction (function) [edit]
C++ documentation for floating point rounding macros

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/numeric/fenv/FE_round&oldid=62545"
Category:

- Todo no example