feholdexcept()

Save the floating-point environment, clear all flags, and ignore future errors

Synopsis:

#include <fenv.h>

int feholdexcept( fenv_t *envp );

Arguments:

envp
A pointer to a fenv_t object where the function can store the environment.

Library:

libm

Use the -l m option to qcc to link against this library.

Description:

The feholdexcept() function saves the floating-point environment in the object that envp points to, clears all the floating-point status flags, and installs a nonstop mode. In nonstop mode, floating-point exceptions don't interrupt execution.

To restore the floating-point environment, use fesetenv() or feupdateenv().

Returns:

O on success, or a nonzero value if an error occurred.

Classification:

C99, POSIX 1003.1

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes