HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
f
feupdateenv(3M) feupdateenv(3M)
NAME
feupdateenv() - update floating-point environment
SYNOPSIS
#include <fenv.h>
void feupdateenv(const fenv_t *envp);
DESCRIPTION
The feupdateenv() function saves the current exceptions in its automatic storage, installs the floating-
point environment represented through envp, and then raises the saved exceptions. The argument envp
must point to an object set by a call to fegetenv() or feholdexcept(), or equal the macro
FE_DFL_ENV.
The ISO/ANSI C committee has approved the feupdateenv() function for inclusion in the C9X draft
standard.
To 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>. 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.
RETURN VALUE
None.
ERRORS
No errors are defined.
EXAMPLE
Store the current oating-point environment in
holdenv, hide spurious underflow exceptions, and con-
tinue on any exceptions that occur until the call to feupdateenv()
is encountered.
#include <fenv.h>
/*...*/
fenv_t holdenv;
feholdexcept(&holdenv);
/* perform operations */
if (/* test for spurious underflow */)
feclearexcept(FE_UNDERFLOW);
feupdateenv(&holdenv); /* raise accumulated exceptions */
SEE ALSO
fegetenv(3M), feholdexcept(3M), fesetenv(3M), fenv(5).
HP-UX Release 11i: December 2000 1 Section 3235
___
___