ieee_support_flag
- Date:
10-12-2011
NAME
IEEE_SUPPORT_FLAG - Determines if the system supports an exception
SYNOPSIS
IEEE_SUPPORT_FLAG ([FLAG=]flag [,[X=]x])
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
Fortran
IEEE Standard for Binary Floating-point Arithmetic
DESCRIPTION
The function IEEE_SUPPORT_FLAG() can be used to determine if a system supports an exception.
This function accepts the following argument:
- flag
Must be of type TYPE(IEEE_FLAG_TYPE). It is a scalar. The values for flag may be one of the named constants:
IEEE_DIVIDE_BY_ZERO
IEEE_INEXACT
IEEE_INVALID
IEEE_OVERFLOW
IEEE_UNDERFLOW
- x
Must be of type real. It may be a scalar or an array.
IEEE_SUPPORT_DIVIDE() is an inquiry 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, INTRINSIC :: IEEE_ARITHMETIC
USE, INTRINSIC :: IEEE_EXCEPTIONS
RETURN VALUES
The result type and type parameter is default logical.
If x is present, the result is true if the system supports the detection of the specified exception for x; otherwise, the result is false.
If x is not present, the result is true if the system supports the detection of the specified exception for all real variables supported on this system; otherwise, the result is false.
EXAMPLES
Example 1:
USE, INTRINSIC :: IEEE_ARITHMETIC
USE, INTRINSIC :: IEEE_EXCEPTIONS
LOGICAL excep_supported, excepallx_supported
REALxdef
REAL(8) x8
TYPE(IEEE_FLAG_TYPE) :: div_by_zero = IEEE_DIVIDE_BY_ZERO
excep_supported = IEEE_SUPPORT_FLAG(IEEE_DIVIDE_BY_ZERO,xdef)
excepallx_supported = IEEE_SUPPORT_FLAG(FLAG = div_by_zero)