We recommend using Visual Studio 2017

_fpclass, _fpclassf

 

The latest version of this topic can be found at _fpclass, _fpclassf.

Returns a value indicating the floating-point classification of the argument.

int _fpclass(   
   double x   
);  
  
int _fpclassf(   
   float x   
); /* x64 only */  

Parameters

x
The floating-point value to test.

The _fpclass and _fpclassf functions return an integer value that indicates the floating-point classification of the argument x. The classification may have one of the following values, defined in <float.h>.

ValueDescription
_FPCLASS_SNANSignaling NaN
_FPCLASS_QNANQuiet NaN
_FPCLASS_NINFNegative infinity ( –INF)
_FPCLASS_NNNegative normalized non-zero
_FPCLASS_NDNegative denormalized
_FPCLASS_NZNegative zero ( – 0)
_FPCLASS_PZPositive 0 (+0)
_FPCLASS_PDPositive denormalized
_FPCLASS_PNPositive normalized non-zero
_FPCLASS_PINFPositive infinity (+INF)

The _fpclass and _fpclassf functions are Microsoft specific. They are similar to fpclassify, but return more detailed information about the argument. The _fpclassf function is only available when compiled for the x64 platform.

FunctionRequired header
_fpclass<float.h>

For more compatibility and conformance information, see Compatibility.

Floating-Point Support
isnan, _isnan, _isnanf
fpclassify

Show: