|
delorie.com/djgpp/doc/libc/libc_340.html
|
search
|
libc.a reference
fpclassify
Syntax
Description
The macro fpclassify returns the kind of the floating point
value supplied.
Return Value
FP_INFINITE, FP_NAN, FP_NORMAL,
FP_SUBNORMAL, FP_ZERO or FP_UNNORMAL.
Portability
Example
| | float f = 1;
double d = INFINITY;
long double ld = NAN;
if( fpclassify(f) != FP_NORMAL )
{
printf("Something is wrong with the implementation!\n");
}
if( fpclassify(d) != FP_INFINITE )
{
printf("Something is wrong with the implementation!\n");
}
if( fpclassify(ld) != FP_NAN )
{
printf("Something is wrong with the implementation!\n");
}
|