Functions for saving and restoring the whole floating-point environment

Note

The following functionality requires you to select a floating-point model that supports exceptions, such as --fpmode=ieee_full or --fpmode=ieee_fixed.

C99 provides the following functions to save and restore the entire floating-point environment:

void fegetenv(fenv_t *envp); void fesetenv(const fenv_t *envp);

The fegetenv() function stores the current state of the floating-point environment into the fenv_t variable provided. The fesetenv() function restores the environment from the variable provided.

Like fesetexceptflag(), fesetenv() does not call trap handlers when it sets the sticky flags for trapped exceptions.

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0475H
Non-ConfidentialID070912