首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

cfenv

这个标头最初在C标准库中作为<fenv.h>...

此标头是浮点环境图书馆。

类型

fenv_t

The type representing the entire floating-point environment

fexcept_t

The type representing all floating-point status flags collectively

功能

feclearexcept (C++11)

clears the specified floating-point status flags (function)

fetestexcept (C++11)

determines which of the specified floating-point status flags are set (function)

feraiseexcept (C++11)

raises the specified floating-point exceptions (function)

fegetexceptflagfesetexceptflag (C++11)(C++11)

copies the state of the specified floating-point status flags from or to the floating-point environment (function)

fegetroundfesetround (C++11)(C++11)

gets or sets rounding direction (function)

fegetenvfesetenv (C++11)

saves or restores the current floating point environment (function)

feholdexcept (C++11)

saves the environment, clears all status flags and ignores all future errors (function)

feupdateenv (C++11)

restores the floating-point environment and raises the previously raise exceptions (function)

FE_ALL_EXCEPTFE_DIVBYZEROFE_INEXACTFE_INVALIDFE_OVERFLOWFE_UNDERFLOW (C++11)

floating-point exceptions (macro constant)

FE_DOWNWARDFE_TONEARESTFE_TOWARDZEROFE_UPWARD (C++11)

floating-point rounding direction (macro constant)

FE_DFL_ENV (C++11)

default floating-point environment (macro constant)

简介

二次

代码语言:javascript
复制
namespace std {
    // types
    typedef /*object type*/ fenv_t;
    typedef /*integer type*/ fexcept_t;
 
    // functions
    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);
}

二次

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com