|
|
HP-UX Reference Volume 4 of 5 > ffesetenv(3M) |
|
NAMEfesetenv() — set floating-point environment DESCRIPTIONThe fesetenv() function establishes the floating-point environment represented by the object pointed to by envp. The argument envp must point to an object set by a call to fegetenv() or feholdexcept(), or equal the macro FE_DFL_ENV. Note that fesetenv() merely installs the state of the exception flags represented through its argument, and does not raise these exceptions. The ISO/ANSI C committee has approved the fesetenv() 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. EXAMPLESStore the current floating-point environment, continue on exceptions, then restore the previous environment without raising the accumulated exceptions. #include <fenv.h> /*...*/ fenv_t holdenv; feholdexcept(&holdenv); /* perform operations */ fesetenv(&holdenv); Restore the default environment: #include <fenv.h> /*...*/ fesetenv(FE_DFL_ENV); |
|