Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Tests whether loss of accuracy is detected as a denormalization loss rather than as an inexact result.
static const bool has_denorm_loss = false;
Return Value
true if the loss of accuracy is detected as a denormalization loss; false if not.
Remarks
The member stores true for a type that determines whether a value has lost accuracy because it is delivered as a denormalized result (too small to represent as a normalized value) or because it is inexact (not the same as a result not subject to limitations of exponent range and precision), an option with IEC 559 floating-point representations that can affect some results.
Example
// 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;
}
Whether float objects can detect denormalized loss: 1 Whether double objects can detect denormalized loss: 1 Whether long int objects can detect denormalized loss: 0
Requirements
Header: <limits>
Namespace: std