CLEAR_IEEE_EXCEPTION(3I) Last changed: 1-6-98
CLEAR_IEEE_EXCEPTION - Clears floating-point exception indicator
CLEAR_IEEE_EXCEPTION ([EXCEPTION=]exception)
UNICOS/mk and IRIX systems
CRAY T90 systems that support IEEE floating-point arithmetic
CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
IEEE Standard for Binary Floating-point Arithmetic
The CLEAR_IEEE_EXCEPTION intrinsic subroutine clears the specified
floating-point exception indicator. It accepts the following
argument:
exception Must be of type default integer. It is an INTENT(IN)
argument. If exception is an array, it must be 1-
dimensional. The single argument in the scalar case,
or each array element in the array case, must be set to
one of the values represented by the following named
constants:
* IEEE_XPTN_CRI_INVALID_OPND (accepted only on CRAY T90
systems that support IEEE floating-point arithmetic)
* IEEE_XPTN_INEXACT_RESULT
* IEEE_XPTN_UNDERFLOW
* IEEE_XPTN_OVERFLOW
* IEEE_XPTN_DIV_BY_ZERO
* IEEE_XPTN_INVALID_OPR
* IEEE_XPTN_ALL
The name of this intrinsic cannot be passed as an argument.
The IEEE intrinsic procedures use the named constants contained in a
system module, so you must include one of the following statements in
your program:
* On UNICOS and UNICOS/mk systems: USE CRI_IEEE_DEFINITIONS
* On UNICOS, UNICOS/mk, and IRIX systems: USE FTN_IEEE_DEFINITIONS
The CRI_IEEE_DEFINITIONS module is obsolescent. It will be removed
for the CF90 4.0 release.
The exception indicator specified by exception (or each element of
exception) is cleared so it now indicates that the exception has not
occurred.
! Clear the divide by zero bit.
CALL CLEAR_IEEE_EXCEPTION(IEEE_XPTN_DIV_BY_ZERO)
! Perform a vectorized floating point divide.
x(1:n) = y(1:n) / z(1:n)
IF (TEST_IEEE_EXCEPTION(IEEE_XPTN_DIV_BY_ZERO) THEN
! Reset result since exception bit is set.
DO i = 1, n
x(i) = CVMGN(0.0, x, MASK)
END DO
END IF
GET_IEEE_EXCEPTIONS(3I), SET_IEEE_EXCEPTION(3I),
TEST_IEEE_EXCEPTION(3I).
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
CLEAR_IEEE_EXCEPTION(3I) Last changed: 1-6-98
CLEAR_IEEE_EXCEPTION - Clears floating-point exception indicator
CLEAR_IEEE_EXCEPTION ([EXCEPTION=]exception)
UNICOS/mk and IRIX systems
CRAY T90 systems that support IEEE floating-point arithmetic
CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
IEEE Standard for Binary Floating-point Arithmetic
The CLEAR_IEEE_EXCEPTION intrinsic subroutine clears the specified
floating-point exception indicator. It accepts the following
argument:
exception Must be of type default integer. It is an INTENT(IN)
argument. If exception is an array, it must be 1-
dimensional. The single argument in the scalar case,
or each array element in the array case, must be set to
one of the values represented by the following named
constants:
* IEEE_XPTN_CRI_INVALID_OPND (accepted only on CRAY T90
systems that support IEEE floating-point arithmetic)
* IEEE_XPTN_INEXACT_RESULT
* IEEE_XPTN_UNDERFLOW
* IEEE_XPTN_OVERFLOW
* IEEE_XPTN_DIV_BY_ZERO
* IEEE_XPTN_INVALID_OPR
* IEEE_XPTN_ALL
The name of this intrinsic cannot be passed as an argument.
The IEEE intrinsic procedures use the named constants contained in a
system module, so you must include one of the following statements in
your program:
* On UNICOS and UNICOS/mk systems: USE CRI_IEEE_DEFINITIONS
* On UNICOS, UNICOS/mk, and IRIX systems: USE FTN_IEEE_DEFINITIONS
The CRI_IEEE_DEFINITIONS module is obsolescent. It will be removed
for the CF90 4.0 release.
The exception indicator specified by exception (or each element of
exception) is cleared so it now indicates that the exception has not
occurred.
! Clear the divide by zero bit.
CALL CLEAR_IEEE_EXCEPTION(IEEE_XPTN_DIV_BY_ZERO)
! Perform a vectorized floating point divide.
x(1:n) = y(1:n) / z(1:n)
IF (TEST_IEEE_EXCEPTION(IEEE_XPTN_DIV_BY_ZERO) THEN
! Reset result since exception bit is set.
DO i = 1, n
x(i) = CVMGN(0.0, x, MASK)
END DO
END IF
GET_IEEE_EXCEPTIONS(3I), SET_IEEE_EXCEPTION(3I),
TEST_IEEE_EXCEPTION(3I).
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
[ Back ]
|