XL Fortran for AIX 8.1

Language Reference


IEEE Derived Data Types and Constants

The IEEE modules define the following derived types.

IEEE_FLAG_TYPE

A derived data type defined by the IEEE_EXCEPTIONS module that identifies a particular exception flag. The values for IEEE_FLAG_TYPE must be one of the following named constants as defined in the IEEE_EXCEPTIONS module:

IEEE_OVERFLOW
Occurs when the result for an intrinsic real operation or an assignment has an exponent too large to be represented. This exception also occurs when the real or imaginary part of the result for an intrinsic complex operation or assignment has an exponent too large to be represented.

When using REAL(4), an overflow occurs when the result value's unbiased exponent is > 127 or < -126.

When using REAL(8), an overflow occurs when the result value's unbiased exponent is > 1023 or < -1022.

IEEE_DIVIDE_BY_ZERO
Occurs when a real or complex division has a nonzero numerator and a zero denominator.

IEEE_INVALID
Occurs when a real or complex operation or assignment is invalid.

IEEE_UNDERFLOW
Occurs when the result for an intrinsic real operation or assignment has an absolute value too small to be represented by anything other than zero, and loss of accuracy is detected. The exception also occurs when the real or imaginary part of the result for an intrinsic complex operation or assignment has an absolute value that is too small to be represented by anything other than zero, and loss of accuracy is detected.

For REAL(4), an underflow occurs when the result has an absolute value < 2-149.

For REAL(8), an underflow occurs when the result has an absolute value < 2-1074.

IEEE_INEXACT
Occurs when the result of a real or complex assignment or operation is not exact.

The following constants are arrays of IEEE_FLAG_TYPE:

IEEE_USUAL
An array named constant containing IEEE_OVERFLOW, IEEE_DIVIDE_BY_ZERO, and IEEE_INVALID elements in order.

IEEE_ALL
An array named constant containing IEEE_USUAL, IEEE_UNDERFLOW, and IEEE_INEXACT elements in order.

IEEE_STATUS_TYPE

A derived data type defined in the IEEE_ARITHMETIC modules that represents the current floating-point status as defined in the IEEE_ARITHMETIC module. The floating-point status encompasses the values of all exception flags, halting, and rounding modes.

IEEE_CLASS_TYPE

A derived data type defined in the IEEE_ARITHMETIC module that categorizes a class of floating-point values. The values for IEEE_CLASS_TYPE must be one of the following named constants as defined in the IEEE_ARITHMETIC module:

IEEE_SIGNALING_NAN IEEE_NEGATIVE_ZERO
IEEE_QUIET_NAN IEEE_POSITIVE_ZERO
IEEE_NEGATIVE_INF IEEE_POSITIVE_DENORMAL
IEEE_NEGATIVE_NORMAL IEEE_POSITIVE_NORMAL
IEEE_NEGATIVE_DENORMAL IEEE_POSITIVE_INF

IEEE_ROUND_TYPE

A derived data type defined in the IEEE_ARITHMETIC modules that identifies a particular rounding mode. The values for IEEE_ROUND_TYPE must be one of the following named constants as defined in the IEEE_ARITHMETIC module:

IEEE_NEAREST
Rounds the exact result to the nearest representable value.

IEEE_TO_ZERO
Rounds the exact result to the next representable value, towards zero.

IEEE_UP
Rounds the exact result to the next representable value, towards positive infinity.

IEEE_DOWN
Rounds the exact result to the next representable value, towards negative infinity.

IEEE_OTHER
Indicates that the rounding mode does not conform to the IEEE standard.

IEEE_FEATURES_TYPE

A derived data type defined in the IEEE_FEATURES module that identifies the IEEE features to use. The values for IEEE_FEATURES_TYPE must be one of the following named constants as defined in the IEEE_FEATURES module:

IEEE_DATATYPE IEEE_DATATYPE
IEEE_DENORMAL IEEE_INVALID_FLAG
IEEE_DIVIDE IEEE_NAN
IEEE_HALTING IEEE_ROUNDING
IEEE_INEXACT_FLAG IEEE_SQRT
IEEE_INF IEEE_UNDERFLOW_FLAG


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]