Chapter Contents |
Previous |
Next |
fegetround |
Portability: | C99 |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
CAUTIONS | |
RELATED FUNCTIONS | |
SEE ALSO |
SYNOPSIS |
#include <fenv.h> int fegetround(void);
DESCRIPTION |
fegetround
is used to obtain
the rounding mode from the current floating-point environment.
RETURN VALUE |
fegetround
returns an integer
representing the current rounding mode. The integer will have one of the values FE_TONEAREST
, FE_TOWARDZERO
,
FE_UPWARD
or FE_DOWNWARD
, defined
in fenv.h
. If the rounding mode cannot be
meaningfully determined, a negative value is returned.
CAUTIONS |
fegetround
returns -1 when
called from a function whose default floating-point format is hexadecimal,
that is, one compiled without the bfp
option.
A program which calls fegetround
must
use the standard FENV_ACCESS pragma in an enclosing scope, or the effects
are unpredictable.
RELATED FUNCTIONS |
fsetround
SEE ALSO |
"Mathematical Functions" in Chapter 2, "Function Categories"
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2004 by SAS Institute Inc., Cary, NC, USA. All rights reserved.