##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# fegetround, fesetround

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

Defined in header `<<fenv.h>>` |  |
int fesetround( int round ); | (1) | (since C99)
int fegetround(); | (2) | (since C99)

1) Attempts to establish the floating-point rounding direction equal to the argument argument `round`, which is expected to be one of the floating point rounding macros.

2) Returns the value of the floating point rounding macro that corresponds to the current rounding direction.

### [edit] Parameters

round | - | rounding direction, one of floating point rounding macros

### [edit] Return value

1) ​0​ on success, non-zero otherwise.

2) the floating point rounding macro describing the current rounding direction or a negative value if the direction cannot be determined

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

nearbyint (C99) | nearest integer using current rounding mode (function) [edit]
rint lrint llrint (C99)(C99)(C99) | nearest integer using current rounding mode with exception if the result differs (function) [edit]
C++ documentation for fegetround, fesetround

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

- Todo no example