A RetroSearch Logo

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

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4140/cfenv below:

[cfenv]

26.3.1 Header <cfenv> synopsis [cfenv.syn]
namespace std {
    typedef object type  fenv_t;
  typedef integer type fexcept_t;

    int feclearexcept(int except);
  int fegetexceptflag(fexcept_t* pflag, int except);
  int feraiseexcept(int except);
  int fesetexceptflag(const fexcept_t* pflag, int except);
  int fetestexcept(int except);

  int fegetround(void);
  int fesetround(int mode);

  int fegetenv(fenv_t* penv);
  int feholdexcept(fenv_t* penv);
  int fesetenv(const fenv_t* penv);
  int feupdateenv(const fenv_t* penv);
}

The header also defines the macros:

  FE_ALL_EXCEPT
  FE_DIVBYZERO
  FE_INEXACT
  FE_INVALID
  FE_OVERFLOW
  FE_UNDERFLOW

  FE_DOWNWARD
  FE_TONEAREST
  FE_TOWARDZERO
  FE_UPWARD

  FE_DFL_ENV

The header defines all functions, types, and macros the same as Clause 7.6 of the C standard.

The floating-point environment has thread storage duration ([basic.stc.thread]). The initial state for a thread's floating-point environment is the state of the floating-point environment of the thread that constructs the corresponding std::thread object ([thread.thread.class]) at the time it constructed the object. [ Note: That is, the child thread gets the floating-point state of the parent thread at the time of the child's creation.  — end note ]

A separate floating-point environment shall be maintained for each thread. Each function accesses the environment corresponding to its calling thread.


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