fp_class(3) Library Functions Manual fp_class(3)
Name
fp_class - classes of IEEE floating-point values
Syntax
#include <fp_class.h>
int fp_class_d(double x);
int fp_class_f(float x);
Description
These routines are used to determine the class of IEEE floating-point values. They return one of the constants in the file and never cause
an exception, even for signaling NaNs. These routines are to implement the recommended function class(x) in the appendix of the IEEE
754-1985 standard for binary floating-point arithmetic. The constants in refer to the following classes of values:
Constant Class
FP_SNAN Signaling NaN (Not-a-Number)
FP_QNAN Quiet NaN (Not-a-Number)
FP_POS_INF +oo (positive infinity)
FP_NEG_INF -oo (negative infinity)
FP_POS_NORM positive normalized nonzero
FP_NEG_NORM negative normalized nonzero
FP_POS_DENORM positive denormalized
FP_NEG_DENORM negative denormalized
FP_POS_ZERO +0.0 (positive zero)
FP_NEG_ZERO -0.0 (negative zero)
Also See
ANSI/IEEE Std 754-1985, IEEE Standard for Binary Floating-Point Arithmetic
RISC fp_class(3)