A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/fegetenv below:

function

<cfenv>

fegetenv
int fegetenv (fenv_t* envp);

Get floating-point environment

Attempts to store the current state of the floating-point environment in the object pointed by envp.

The floating point environment is a set of status flags and control modes affecting floating-point calculations (including both floating-point exceptions and the rounding direction mode).

Programs calling this function shall ensure that pragma FENV_ACCESS is enabled for the call.



Parameters
envp
Pointer to a fenv_t object where the state of the floating-point environment is stored.

Return Value Zero, if the state was successfully stored.
A non-zero value otherwise.

Data races Each thread maintains a separate floating-point environment with its own state. Spawning a new thread copies the current state. [This applies to C11 and C++11 implementations]

ExceptionsNo-throw guarantee: this function never throws exceptions.

See also
feholdexcept
Hold floating-point exceptions (function)
fesetenv
Set floating-point environment (function)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4