Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
isnan(3) Guardian Native C Library Calls Reference Manual
NAME
isnan - Tests whether a value is NaN (not a number)
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 <math.h>
int isnan(
double x);
PARAMETERS
x Specifies a double-precision floating-point value.
DESCRIPTION
The isnan( ) function tests whether x is NaN (not a number).
NOTES
If you call this function with an IEEE floating-point value for the x parameter that is a signaling
NaN, an exception occurs. To test for a signaling NaN without causing an exception, call the
fp_class() function.
RETURN VALUES
Tandem floating-point format does not support NaN values. Thus, the isnan() function returns a
value of 0 (zero) for Tandem floating-point data.
When used for IEEE floating-point data, this function returns TRUE if the value specified for the
x parameter is not a number. Otherwise, the value FALSE is returned.
RELATED INFORMATION
Functions: fp_class(3).
STANDARDS CONFORMANCE
This function conforms to the XPG4 Version 2 specification when used for IEEE floating-point
format data.
3−68 Hewlett-Packard Company 527192-005