ieee_value

Date:

10-12-2011

NAME

IEEE_VALUE - Generates an IEEE value

SYNOPSIS

IEEE_VALUE ([X=]x [,[CLASS=]class])

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

Fortran

IEEE Standard for Binary Floating-point Arithmetic

DESCRIPTION

The IEEE_VALUE intrinsic function returns the specified IEEE value. It accepts the following arguments:

x

Can be of type real.

class

Must be of type TYPE(IEEE_CLASS_TYPE).

  • The value of class may be IEEE_SIGNALING_NAN or IEEE_QUIET_NAN if IEEE_SUPPORT_NAN(X) returns the value true.

  • The value of class may be IEEE_NEGATIVE_INF or IEEE_POSITIVE_INF if IEEE_SUPPORT_INF(X) returns the value true.

  • The value of class may be IEEE_NEGATIVE_DENORMAL or IEEE_POSITIVE_DENORMAL if IEEE_SUPPORT_DENORMAL(X) returns the value true.

  • The value of class may be IEEE_NEGATIVE_NORMAL, IEEE_POSITIVE_NORMAL, IEEE_NEGATIVE_ZERO, or IEEE_POSITIVE_ZERO.

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

IEEE_VALUE should not be invoked if IEEE_SUPPORT_DATATYPE(X) has the value false.

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, INTRINSIC :: IEEE_ARITHMETIC

RETURN VALUES

The result type and type parameters are the same as x.

EXAMPLES

Example 1:

USE, INTRINSIC :: IEEE_ARITHMETIC
REAL(8) k, kresult
TYPE(IEEE_VALUE_CLASS_TYPE) ieeeval

kresult = IEEE_VALUE( k, IEEE_POSITIVE_ZERO)

SEE ALSO

ieee_support_datatype(3i)