For faster navigation, this Iframe is preloading the Wikiwand page for
fenv.h.
fenv.h
是C标准函数库中的头文件,提供了对浮点环境的支持。浮点环境(floating-point environment)是指任何实现支持的浮点状态标志与控制模式。浮点状态标志(floating-point status flag)是一个系统变量,当浮点异常被抛出时该系统变量被置位。浮点控制模式(floating-point
control mode)是一个系统变量,用户可以对其置位,以影响随后的浮点运算行为。
- fenv_t 表示整体浮点环境
- fexcept_t 表示浮点状态的集合
- 表示各种浮点运算异常:
- FE_DIVBYZERO
- FE_INEXACT
- FE_INVALID
- FE_OVERFLOW
- FE_UNDERFLOW
- FE_ALL_EXCEPT
- 近似舍入方法
- FE_DOWNWARD
- FE_TONEAREST
- FE_TOWARDZERO
- FE_UPWARD
- 缺省浮点环境
- feclearexcept 清除给定的浮点异常
- fegetexceptflag 保存一个浮点状态标志到对象中
- feraiseexcept 抛出一个浮点异常
- fesetexceptflag 设置一个浮点状态标志到对象中
- fetestexcept 测试那些浮点异常标志被置位
- fegetround 获取当前近似舍入方法
- fesetround 设置近似舍入方法
- fegetenv 存储当前浮点环境到对象中
- feholdexcept 存储当前浮点环境到对象中,清楚浮点状态标志,安装non-stop模式
- fesetenv 从对象存储的浮点环境恢复现场
- feupdateenv 保存当前浮点异常,从对象存储的浮点环境恢复现场,再重新抛出当前浮点异常
{{bottomLinkPreText}}
{{bottomLinkText}}
This page is based on a Wikipedia article written by
contributors (read/edit).
Text is available under the
CC BY-SA 4.0 license; additional terms may apply.
Images, videos and audio are available under their respective licenses.
{{current.index+1}} of {{items.length}}
Thanks for reporting this video!
This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:
An extension you use may be preventing Wikiwand articles from loading properly.
If you're using HTTPS Everywhere or you're unable to access any article on Wikiwand, please consider switching to HTTPS (https://www.wikiwand.com).
An extension you use may be preventing Wikiwand articles from loading properly.
If you are using an Ad-Blocker, it might have mistakenly blocked our content.
You will need to temporarily disable your Ad-blocker to view this page.
✕
This article was just edited, click to reload
Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}
Follow Us
Don't forget to rate us
Oh no, there's been an error
Please help us solve this error by emailing us at
support@wikiwand.com
Let us know what you've done that caused this error, what browser you're using, and whether you have any special extensions/add-ons installed.
Thank you!