Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

Guardian Native C Library Calls (f) fp_class(3)
NAME
fp_class - Returns the class of a oating-point value
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <ieeefp.h>
int fp_class(
double x);
PARAMETERS
x Species a double-precision IEEE oating-point value.
DESCRIPTION
The fp_class() function returns an indication of the class of the value specied by the x parame-
ter. This function is recommended by the IEEE Std 754-1985 for oating-point arithmetic, which
denes the classes for oating-point values.
The possible classes are:
FP_NEG_DENORM A negative denormalized nonzero value.
FP_NEG_INF Negative innity.
FP_NEG_NORM A negative normalized nonzero value.
FP_NEG_ZERO Negative 0.0 (zero).
FP_POS_DENORM A positive denormalized nonzero value.
FP_POS_INF Positive innity.
FP_POS_NORM A positive normalized nonzero value.
FP_POS_ZERO Positive 0.0 (zero).
FP_SNAN A signaling NaN.
FP_QNAN A quiet NaN.
NOTES
The fp_class() function can be called only by native processes. The sign value of a TNS/E NaN
and a TNS/R NaN can differ for the same condition.
This function is not available for Tandem oating-point data.
RETURN VALUES
The fp_class() function returns the class of the value of x. Exceptions are never returned, even
when x is a signaling NaN.
ERRORS
No errors can be returned. This function does not set errno.
527192-007 Hewlett-Packard Company 253