Partager via


numeric_limits::has_denorm

Tests whether a type allows denormalized values.

static const float_denorm_style has_denorm = denorm_absent;

Return Value

An enumeration value of type const float_denorm_style, indicating whether the type allows denormalized values.

Remarks

The member stores denorm_present for a floating-point type that has denormalized values, effectively a variable number of exponent bits.

Example

// numeric_limits_has_denorm.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>

using namespace std;

int main( )
{
   cout << "Whether float objects allow denormalized values: "
        << numeric_limits<float>::has_denorm 
        << endl;
   cout << "Whether double objects allow denormalized values: "
        << numeric_limits<double>::has_denorm 
        << endl;
   cout << "Whether long int objects allow denormalized values: " 
        << numeric_limits<long int>::has_denorm 
        << endl;
}
Whether float objects allow denormalized values: 1
Whether double objects allow denormalized values: 1
Whether long int objects allow denormalized values: 0

Requirements

Header: <limits>

Namespace: std

See Also

Reference

strstreambuf Class