Next: fetestexcept
—test floating-point exception flags, Previous: fesetexceptflag
—set floating-point status flags, Up: Floating-Point Environment (fenv.h) [Contents][Index]
fesetround
—set current rounding directionSynopsis
#include <fenv.h> int fesetround(int round); Link with -lm.
Description
This method attempts to set the current rounding direction represented
by round. round must be the value of one of the
rounding-direction macros.
Returns
If the rounding mode was successfully established, this method returns
zero. Otherwise, a non-zero value is returned.
Portability
ANSI C requires fesetround
.
Not all Newlib targets have a working implementation. Refer to
the file sys/fenv.h
to see the status for your target.