United States-English |
|
|
HP-UX Reference > Ffesetround(3M)HP-UX 11i Version 3: February 2007 |
|
NAMEfesetround() — set floating-point rounding direction mode DESCRIPTIONThe fesetround() function establishes the rounding direction represented by its argument round. The round argument must equal one of the macros: FE_TONEAREST, FE_UPWARD, FE_DOWNWARD, and FE_TOWARDZERO. If the argument does not match a rounding direction macro, the rounding direction is not changed. The default rounding direction mode is round to nearest (FE_TONEAREST). USAGETo use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. Make sure your program includes <fenv.h>. For HP Integrity servers, specify +Ofenvaccess on the compiler command line or place the call to this function under the effect of an affirmative FENV_ACCESS pragma: #pragma STDC FENV_ACCESS ON If the FENV_ACCESS pragma is placed outside of any top-level declarations in a file, the pragma will apply to all declarations in the compilation following the pragma until another FENV_ACCESS pragma is encountered or until the end of the file is reached. If the FENV_ACCESS pragma is placed at the beginning of a block (compound statement), the pragma will apply until another FENV_ACCESS pragma is encountered or until the end of the block is reached. For PA-RISC, you might need to use the +Onomoveflops compiler option in order to prevent optimizations that can undermine the specified behavior of this function. Link in the math library by specifying -lm on the compiler or linker command line. For more information, see the HP-UX floating-point guide for HP Integrity servers at the following site: http://www.hp.com/go/fp. RETURN VALUEThe fesetround() function returns a zero value if and only if the argument is equal to a rounding direction macro. |
Printable version | ||
|