FEGETROUND 3CW "09 March 2006" "mathcw-1.00"

Table of contents


NAME

fegetround - get rounding direction mode

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <fenvcw.h>

extern int fegetround (void)


DESCRIPTION

Return the value of the current rounding direction, represented by one of the symbolic names FE_DOWNWARD, FE_TONEAREST, FE_TOWARDZERO, or FE_UPWARD.

NOTES

Rounding control is a required feature of IEEE 754 arithmetic, although some architectures, notably, the DEC/Compaq/HP Alpha, may require compile-time options to enable access to it, because they otherwise generate floating-point instructions that have rounding behavior fixed at compile time. The C# and Java programming languages offer only a subset of IEEE 754 arithmetic, and they exclude rounding-mode access. Thus, this function is unlikely to be of use via the interfaces to the mathcw library defined for those languages.

RETURN VALUES

Return the rounding direction on success, and a negative value on failure.

ERRORS

None.

SEE ALSO

feclearexcept(3CW), fegetenv(3CW), fegetexceptflag(3CW), fegetprec(3CW), feholdexcept(3CW), feraiseexcept(3CW), fesetenv(3CW), fesetexceptflag(3CW), fesetprec(3CW), fesetround(3CW), fetestexcept(3CW), feupdateenv(3CW).