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.

CAUTION:
This operation doesn't work on AArch64 targets. There's a known hardware limitation that causes any saving of floating-point environments to be ignored.

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

Returns:

0

Classification:

C99, POSIX 1003.1

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