December 2005
Beginner to intermediate
618 pages
20h 19m
English
fegetround
Determines the current rounding direction in the floating-point environment
#include <fenv.h>
intfegetround( 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_DOWNWARDRound down to the next lower integer.
FE_UPWARDRound up to the next greater integer.
FE_TONEARESTRound up or down toward whichever integer is nearest.
FE_TOWARDZERORound positive values downward and negative values upward.
See the examples for fmod() and fesetround() in this
chapter.
Read now
Unlock full access