_finite, _finitef


For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Determines whether a floating-point value is finite.

int _finite(   
   double x   
int _finitef(   
   float x   
); /* x64 and ARM/ARM64 only */  


The floating-point value to test.

Both _finite and _finitef return a nonzero value if the argument x is finite; that is, if –INF < x < +INF. It returns 0 if the argument is infinite or a NAN.

The _finite and _finitef functions are Microsoft specific. The _finitef function is only available when compiled for x86, ARM, or ARM64 platforms.

FunctionRequired header (C)Required header (C++)
_finite<float.h> or <math.h><float.h>, <math.h>, <cfloat>, or <cmath>
_finitef<math.h><math.h> or <cmath>

For more compatibility information, see Compatibility.


Floating-Point Support
isnan, _isnan, _isnanf
_fpclass, _fpclassf