ieee_support_datatype

Date:

10-12-2011

NAME

IEEE_SUPPORT_DATATYPE - Determine if the system supports IEEE arithmetic

SYNOPSIS

IEEE_SUPPORT_DATATYPE ([[X=]x])

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

Fortran

IEEE Standard for Binary Floating-point Arithmetic

DESCRIPTION

The function IEEE_SUPPORT_DATATYPE() can be used to inquire whether IEEE arithmetic is supported for a particular kind of real or for all reals.

Complete conformance is not required.

This function accepts the following argument:

x

Must be of type real. It may be a scalar or an array.

IEEE_SUPPORT_DATATYPE() is an inquiry function. The name of this intrinsic cannot be passed as an argument.

Conformance means that:

  • Normalized numbers shall be exactly those of an IEEE floating-point format.

  • The operations of addition, subtraction, and multiplication will be implemented with at least one of the IEEE rounding modes.

  • The IEEE operation rem shall be provided by the function IEEE_REM().

  • The IEEE functions copysign(), scalb(), logb(), nextafter(), and unordered() will be provided by the functions IEEE_COPY_SIGN(), IEEE_SCALB(), IEEE_LOGB(), IEEE_NEXT_AFTER(), and IEEE_UNORDERED(), respectively.

  • The function IEEE_DIVIDE() is provided to determine if the system supports divide with the accuracy specified by the IEEE international standard.

  • The operations of addition, subtraction, and multiplication produce results as specified by the IEEE International Standard whenever the operands are normalized and the result is floating point and normalized.

Individual inquiry functions determine which of these conformance areas is not supported for a particular kind type of real.

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 parameter is default logical.

If x is present, the result is true if the system supports IEEE arithmetic for real variables of this kind type real; otherwise, the result is false.

If x is not present, the result is true if the system supports IEEE arithmetic for all real variables supported on this system; otherwise the result is false.

EXAMPLES

Example 1:

USE, INTRINSIC :: IEEE_ARITHMETIC
REAL xdef
REAL(8) x8
LOGICAL xdef_supported, allx_supported

xdef_supported = IEEE_SUPPORT_DATATYPE(xdef)

allx_supported = IEEE_SUPPORT_DATATYPE()

SEE ALSO

ieee_support_denormal(3i), ieee_support_divide(3i), ieee_support_inf(3i), ieee_support_io(3i), ieee_support_nan(3i), ieee_support_rounding(3i), ieee_support_sqrt(3i), ieee_support_standard(3i)