fegetround


fegetround

Determines the current rounding direction in the floating-point environment

 #include <fenv.h> int fegetround( void ); 

The fegetround( ) function obtains the current rounding direction. The integer return value is negative if the rounding direction is undetermined, or equal to one of the following macros, defined in fenv.h as integer constants, if the function is successful:


FE_DOWNWARD

Round down to the next lower integer.


FE_UPWARD

Round up to the next greater integer.


FE_TONEAREST

Round up or down toward whichever integer is nearest.


FE_TOWARDZERO

Round positive values downward and negative values upward.

Example

See the examples for fmod( ) and fesetround( ) in this chapter.

See Also

fesetround( ), fegetenv( ), fegetexceptflag( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net