测试类型是否能确定值太小而无法表示正常化舍入值。它。
static const bool tinyness_before = false;
返回值
true,则类型可以在检测之前舍入小的值;false,如果不可以。
备注
可以检测 tinyness 的类型包括为与 IEC 的选项 559 位浮点表示形式以及其实现可以影响一些结果。
示例
// numeric_limits_tinyness_before.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << "Whether float types can detect tinyness before rounding: "
<< numeric_limits<float>::tinyness_before
<< endl;
cout << "Whether double types can detect tinyness before rounding: "
<< numeric_limits<double>::tinyness_before
<< endl;
cout << "Whether long int types can detect tinyness before rounding: "
<< numeric_limits<long int>::tinyness_before
<< endl;
cout << "Whether unsigned char types can detect tinyness before rounding: "
<< numeric_limits<unsigned char>::tinyness_before
<< endl;
}
要求
页眉: <限制>
命名空间: std