HPUX fpclassify[3m]

fpclassify(3M) fpclassify(3M)
NAME
fpclassify(), fpclassifyf() - floating-point operand classification
functions
SYNOPSIS
#include <math.h>
int fpclassify(double x);
int fpclassifyf(float x);
DESCRIPTION
fpclassify() and fpclassifyf() return a non-negative integer value
that specifies the IEEE operand class to which the argument x belongs.
The value returned is one of the following macros which are defined in
<math.h>:
#define FP_PLUS_NORM 0 /* Positive normalized */
#define FP_MINUS_NORM 1 /* Negative normalized */
#define FP_PLUS_ZERO 2 /* Positive zero */
#define FP_MINUS_ZERO 3 /* Negative zero */
#define FP_PLUS_INF 4 /* Positive infinity */
#define FP_MINUS_INF 5 /* Negative infinity */
#define FP_PLUS_DENORM 6 /* Positive denormalized */
#define FP_MINUS_DENORM 7 /* Negative denormalized */
#define FP_SNAN 8 /* Signalling NaN */
#define FP_QNAN 9 /* Quiet NaN */
Every possible argument value falls into one of these ten categories,
so these functions never result in an error.
fpclassifyf() is the float version of fpclassify(). Programs must be
compiled in ANSI mode (with the -Aa option) in order to use this
function; otherwise, the compiler promotes the float argument to
double, and the function returns incorrect results.
DEPENDENCIES
Series 300/400
fpclassify() and fpclassifyf() are not supported on Series 300/400
systems.
Series 700/800
fpclassify() and fpclassifyf() are provided in the PA1.1 versions of
the math library only. The +DA1.1 option (default on Series 700
systems) links in a PA1.1 version automatically. A PA1.1 library can
also be linked in explicitly. For more information, see the HP-UX
Floating-Point Guide.
These functions are not specified by any standard. However, they
implement the class() function suggested in the "Recommended Functions
and Predicates" appendix of the IEEE-754 floating-point standard.
Hewlett-Packard Company - 1 - HP-UX Release 9.0: August 1992
fpclassify(3M) fpclassify(3M)
Also, fpclassifyf() is named in accordance with the conventions
specified in the
"Future Library Directions" section of the ANSI C standard.
SEE ALSO
isnan(3M), isinf(3M), ieee(3M).
Hewlett-Packard Company - 2 - HP-UX Release 9.0: August 1992