A RetroSearch Logo

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

Search Query:

Showing content from https://en.cppreference.com/w/cpp/algorithm/../../cpp/../cpp/../c/numeric/fenv/feexceptflag.html below:

fegetexceptflag, fesetexceptflag - cppreference.com

int fegetexceptflag( fexcept_t* flagp, int excepts );

(1) (since C99)

int fesetexceptflag( const fexcept_t* flagp, int excepts );

(2) (since C99)

1) Attempts to obtain the full contents of the floating-point exception flags that are listed in the bitmask argument excepts, which is a bitwise OR of the floating-point exception macros.

2) Attempts to copy the full contents of the floating-point exception flags that are listed in excepts from flagp into the floating-point environment. Does not raise any exceptions, only modifies the flags.

The full contents of a floating-point exception flag is not necessarily a boolean value indicating whether the exception is raised or cleared. For example, it may be a struct which includes the boolean status and the address of the code that triggered the exception. These functions obtain all such content and obtain/store it in flagp in implementation-defined format.

[edit] Parameters flagp - pointer to an fexcept_t object where the flags will be stored or read from excepts - bitmask listing the exception flags to get/set [edit] Return value

​0​ on success, non-zero otherwise.

[edit] Example

Output:

current exceptions raised: FE_INVALID
current exceptions raised: FE_INEXACT FE_OVERFLOW
current exceptions raised: FE_INVALID
[edit] References
[edit] See also

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