测试特定丢失是否已检测作为阻碍规范化丢失而不是一个不精确的结果。
static const bool has_denorm_loss = false;
返回值
true,如果特定丢失检测作为阻碍规范化丢失; false,如果没有。
备注
该成员存储为true的类型确定值是否丢失准确性,因为它是提供作为一个denormalized结果(太小而无法表示为一个正常化的值),或因为它是不精确的结果(不是同样不受指数大小和精度的限制),而可能影响某些结果的IEC 559位浮点表示形式的一个选项。
示例
// numeric_limits_has_denorm_loss.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << "Whether float objects can detect denormalized loss: "
<< numeric_limits<float>::has_denorm_loss
<< endl;
cout << "Whether double objects can detect denormalized loss: "
<< numeric_limits<double>::has_denorm_loss
<< endl;
cout << "Whether long int objects can detect denormalized loss: "
<< numeric_limits<long int>::has_denorm_loss
<< endl;
}
要求
标头: <limits>
命名空间: std