fp_class

Date:

10-12-2011

NAME

FP_CLASS - Returns the class of an IEEE real argument

SYNOPSIS

FP_CLASS ([X=]x)

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

Fortran extension

DESCRIPTION

The FP_CLASS function returns the class of an IEEE real argument. This function accepts the following argument:

x

Must be of type real.

FP_CLASS is an elemental function. The name of this intrinsic cannot be passed as an argument.

NOTES

The IEEE intrinsic procedures use the named constants contained in a system module, so you must include the following statement in your program:

USE FTN_IEEE_DEFINITIONS

RETURN VALUES

The value returned is a default integer and has one of the following values:

                  Return Values
-------------------------------------------------------
Class of argument               Return value
-------------------------------------------------------
Signaling NaN                   FOR_K_FP_SNAN
Quiet NaN                       FOR_K_FP_QNAN
Positive infinity               FOR_K_FP_POS_INF
Negative infinity               FOR_K_FP_NEG_INF
Positive normalized number      FOR_K_FP_POS_NORM
Negative normalized number      FOR_K_FP_NEG_NORM
Positive denormalized number    FOR_K_FP_POS_DENORM
Negative denormalized number    FOR_K_FP_NEG_DENORM
Positive zero                   FOR_K_FP_POS_ZERO
Negative zero                   FOR_K_FP_NEG_ZERO
-------------------------------------------------------

The preceding return values are defined in file fordef.f, which is a system file.

EXAMPLES

FP_CLASS(4.0_8) has the value FOR_K_FP_POS_NORM.