问题描述
Mountain Lion的libmath实现(位于/usr/lib/system/libsystem_m.dylib)具有所有标准的libmath函数,以及每个函数的$fenv_access_off
变体.例如,有acos
和acos$fenv_access_off
. (我没有安装任何其他版本的Mac OS来检查10.8之前是否是这种情况.)
Mountain Lion's implementation of libmath (located at /usr/lib/system/libsystem_m.dylib) has all the standard libmath functions, plus, for each of them, a $fenv_access_off
variation. For instance, there's acos
, and acos$fenv_access_off
. (I do not have any other version of Mac OS installed available to check if it was the case before 10.8.)
$fenv_access_off
是什么意思?
我知道我永远不会直接打电话给任何人,但我仍然对它们感到好奇.
I understand that I won't ever be calling directly any of these, but I'm still curious about them.
推荐答案
有一个邮件列表线程,其中包含有关fenv_access_off的讨论.苹果工程师斯蒂芬·佳能(Stephen Canon)解释:
There is a mailing list thread between some of Apple's engineers that contains a discussion about fenv_access_off. Stephen Canon, an Apple engineer, explains:
来自fenv
的man page
:
...
FENV_ACCESS编译指示提供了一种方法来通知编译器: 该程序可能会访问浮点环境以测试状态 标记或更改控制模式.
The FENV_ACCESS pragma provides a means to inform the compiler that the program might access the floating-point environment to test status flags or change the control modes.
这篇关于在Mac OS X上,libmath的$ fenv_access_off函数是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!