Namespaces
Variants
Views
Actions

fegetround, fesetround

From cppreference.com
< c‎ | numeric‎ | fenv
Revision as of 22:37, 31 May 2013 by P12bot (Talk | contribs)

Defined in header <<fenv.h>>
int fesetround( int round );
(1) (since C99)
int fegetround();
(2) (since C++11)

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.

Contents

Parameters

round - rounding direction, one of floating point rounding macros

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

Example

See also

rounds to an integer using current rounding mode
(function) [edit]
(C99)(C99)(C99)(C99)(C99)(C99)(C99)(C99)(C99)
rounds to an integer using current rounding mode with
exception if the result differs
(function) [edit]
C++ documentation for fegetround, fesetround