_fpclass
, _fpclassf
Returns a value indicating the floating-point classification of the argument.
Syntax
int _fpclass(
double x
);
int _fpclassf(
float x
); /* x64 only */
Parameters
x
The floating-point value to test.
Return value
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>
.
Value | Description |
---|---|
_FPCLASS_SNAN |
Signaling NaN |
_FPCLASS_QNAN |
Quiet NaN |
_FPCLASS_NINF |
Negative infinity (-INF ) |
_FPCLASS_NN |
Negative normalized non-zero |
_FPCLASS_ND |
Negative denormalized |
_FPCLASS_NZ |
Negative zero (-0) |
_FPCLASS_PZ |
Positive 0 (+0) |
_FPCLASS_PD |
Positive denormalized |
_FPCLASS_PN |
Positive normalized non-zero |
_FPCLASS_PINF |
Positive infinity (+INF ) |
Remarks
The _fpclass
and _fpclassf
functions are Microsoft-specific. They're similar to fpclassify
, but return more detailed information about the argument. The _fpclassf
function is only available when compiled for the x64 platform.
By default, this function's global state is scoped to the application. To change this behavior, see Global state in the CRT.
Requirements
Function | Required header |
---|---|
_fpclass , _fpclassf |
<float.h> |
For more compatibility and conformance information, see Compatibility.
See also
Math and floating-point support
isnan
, _isnan
, _isnanf
fpclassify