isnand(3C)isnand(3C)NAME
isnand, finite, fpclass, unordered, finitel, fpclassl, unorderedl -
determine type of floating-point number
SYNOPSIS
#include <ieeefp.h>
int isnand (double dsrc);
int finite (double dsrc);
fpclass_t fpclass (double dsrc);
int unordered (double dsrc1, double dsrc2);
int finitel (long double dsrc);
fpclass_t fpclassl (long double dsrc);
int unorderedl (long double dsrc1, long double dsrc2);
DESCRIPTION
(Note that the long double routines are only valid for the MIPSpro
compilers.)
isnand returns true (1) if the argument dsrc is a NaN; otherwise it
returns false (0).
fpclass and fpclassl return the class the dsrc belongs to. The 10
possible classes are as follows:
FP_SNAN signaling NaN
FP_QNAN quiet NaN
FP_NINF negative infinity
FP_PINF positive infinity
FP_NDENORM negative denormalized non-zero
FP_PDENORM positive denormalized non-zero
FP_NZERO negative zero
FP_PZERO positive zero
FP_NNORM negative normalized non-zero
FP_PNORM positive normalized non-zero
In the case of long doubles, non-zero numbers less than 2**-916 in
absolute value are classified as denormalized, since one of the numbers
used in their representation may be a denormal double.
finite and finitel return true (1) if the argument dsrc is neither
infinity nor NaN; otherwise they return false (0).
unordered and unorderedl return true (1) if one of their two arguments is
unordered with respect to the other argument. This is equivalent to
reporting whether either argument is NaN. If neither of the arguments is
Page 1
isnand(3C)isnand(3C)
NaN, false (0) is returned.
None of these routines generate any exceptions, even for signaling NaNs.
Note that the SVR4 function fpclass is distinct from the functions
documented in fp_class(3C).
NOTES
The functions described on this page are not specified by the ANSI C
Programming Language Specification ISO/IEW 9899: 1999 (E), and are
provided for backward compatibility.
SEE ALSOclass(3C), compare(3C), fpgetround(3C), fp_class(3C), intro(3M).
class(3C) describes the macro isnan.
Page 2