finite() — Determine the infinity classification of a floating-point number

Standards

Standards / Extensions C or C++ Dependencies

Language Environment

both

OS/390 V2R6

Format

#define _AIX_COMPATIBILITY
#include <math.h>

int finite(x)
double x;

General description

The finite() function determines the infinity classification of floating-point number x.
Note: This function works in both IEEE Binary Floating-Point and hexadecimal floating-point formats. See IEEE binary floating-point for more information about IEEE Binary Floating-Point.

Returned value

finite() returns nonzero if the x parameter is a finite number, that is, if x is not +-, INF, NaNQ, or NaNS.

finite() does not return errors or set bits in the floating-point exception status, even if a parameter is a NaNS.

Special behavior for hex: finite() always returns 1 when it is called from HFP mode.

Related information