Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (e - f) fesetround(3)
NAME
fesetround - Sets the floating-point rounding direction
LIBRARY
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <fenv.h>
int fesetround(
int round);
PARAMETERS
round Specifies one of the following rounding direction macros, which are defined in
the fenv.h header file:
FE_TONEAREST
Round to nearest.
FE_UPWARD Round upwards (towards positive infinity).
FE_DOWNWARD
Round downwards (towards negative infinity).
FE_TOWARDZERO
Round toward zero.
DESCRIPTION
The fesetround( ) function establishes the floating-point rounding direction represented by the
parameter round.
If the specified parameter does not match a rounding direction macro, the rounding direction is
not changed.
NOTES
This function is implemented only for the IEEE_float oating-point option. Applications using
this function cannot be compiled if the specified floating-point option is Tandem_float.
RETURN VALUES
The fesetround( ) function returns 0 (zero) if the requested rounding direction was established.
RELATED INFORMATION
Functions: fegetround(3).
STANDARDS CONFORMANCE
This function conforms to the ISO/IEC 9899:1999 standard.
This function conforms to the IEEE Std 1003.1, 2004 Edition.
527187-017 Hewlett-Packard Company 257