Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
fp_class(3) OSS Library Calls Reference Manual
NAME
fp_class - Returns the class of a floating-point value
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <ieeefp.h>
int fp_class(
double x);
PARAMETERS
x Specifies a double-precision IEEE floating-point value.
DESCRIPTION
The fp_class( ) function returns an indication of the class of the value specified by the x parame-
ter. This function is recommended by the IEEE Std 754-1985 for floating-point arithmetic, which
defines the classes for floating-point values.
The possible classes are:
FP_NEG_DENORM A negative denormalized nonzero value.
FP_NEG_INF Negative infinity.
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 infinity.
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 floating-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.
2−126 Hewlett-Packard Company 527187-017