Namespaces
Variants
Views
Actions

FP_NORMAL, FP_SUBNORMAL, FP_ZERO, FP_INFINITE, FP_NAN

From cppreference.com
< c‎ | numeric‎ | math
Revision as of 20:15, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)(C99)(C99)
Exponential functions
(C99)
(C99)
(C99)
(C99)
Power functions
(C99)
(C99)
Trigonometric and hyperbolic functions
(C99)
(C99)
(C99)
Error and gamma functions
(C99)
(C99)
(C99)
(C99)
Nearest integer floating point operations
(C99)(C99)(C99)
(C99)
(C99)(C99)(C99)
Floating point manipulation functions
(C99)(C99)
(C99)
(C99)
Classification
(C99)
(C99)
(C99)
Macro constants
FP_NORMALFP_SUBNORMALFP_ZEROFP_INFINITEFP_NAN
(C99)(C99)(C99)(C99)(C99)
 

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <math.h>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td >
#define FP_NORMAL    /*implementation defined*/
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> <tr class="t-dcl ">

<td >
#define FP_SUBNORMAL /*implementation defined*/
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> <tr class="t-dcl ">

<td >
#define FP_ZERO      /*implementation defined*/
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> <tr class="t-dcl ">

<td >
#define FP_INFINITE  /*implementation defined*/
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> <tr class="t-dcl ">

<td >
#define FP_NAN       /*implementation defined*/
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> Template:ddcl list end

The FP_NORMAL, FP_SUBNORMAL, FP_ZERO, FP_INFINITE, FP_NAN macros each represent a distinct category of floating-point numbers. They all expand to an integer constant expression.

Constant Explanation
FP_NORMAL indicates that the value is normal, i.e. not an infinity, subnormal, not-a-number or zero
FP_SUBNORMAL indicates that the value is subnormal
FP_ZERO indicates that the value is positive or negative zero
FP_INFINITE indicates that the value is not representable by the underlying type (positive or negative infinity)
FP_NAN indicates that the value is not-a-number (NaN)

See also

Template:c/numeric/math/dcl list fpclassify
C++ documentation for FP_categories