SET_IEEE_STATUS(3I) Last changed: 1698
SET_IEEE_STATUS  Restores floatingpoint status
SET_IEEE_STATUS ([STATUS=]status)
UNICOS/mk and IRIX systems
CRAY T90 systems that support IEEE floatingpoint arithmetic
CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
IEEE Standard for Binary Floatingpoint Arithmetic
The SET_IEEE_STATUS intrinsic subroutine is typically used to restore
the caller's floatingpoint status just before exiting a procedure.
It accepts the following argument:
status Must be scalar and of an integer type that occupies a full
word. It is an INTENT(IN) argument.
On CRAY T90 systems that support IEEE floatingpoint
arithemetic, its value (contained in a 64bit word) is
stored into SR0. On other architectures, the flags are
stored into the appropriate flag bits of the word(s) or
register(s) that record the floatingpoint state.
The value in status is assumed to have been produced through
an invocation of GET_IEEE_STATUS(3I).
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.
There are 6 bits, called the IEEE Floating Point Exception Status Bits
or the sticky bits, that indicate whether any one of 6 possible
exceptions has occurred (the 5 exceptions specified by the IEEE
floatingpoint standard and a Cray Research extension). The user
program begins with these bits cleared to zero. The occurrence of any
of the exceptions will set the corresponding bit. Only the user can
clear these bits.
! Assume this example demonstrates code for an IRIX system
! where default integer type occupies a full word.
SUBROUTINE CALCULATE
USE FTN_IEEE_DEFINITIONS
INTEGER IEEE_STATUS
... ! Only stmts here that can't change the
! floating point status.
CALL GET_IEEE_STATUS(IEEE_STATUS)
... ! Body of the procedure.
CALL SET_IEEE_STATUS(IEEE_STATUS)
END SUBROUTINE
GET_IEEE_STATUS(3I) is called upon entry to the example's procedure
CALCULATE to capture the current floatingpoint status. If procedure
CALCULATE changes the floatingpoint status, the original
floatingpoint status can be reset before exiting from CALCULATE by
calling SET_IEEE_STATUS.
GET_IEEE_STATUS(3I)
Intrinsic Procedures Reference Manual, publication SR2138, for the
printed version of this man page.
SET_IEEE_STATUS(3I) Last changed: 1698
SET_IEEE_STATUS  Restores floatingpoint status
SET_IEEE_STATUS ([STATUS=]status)
UNICOS/mk and IRIX systems
CRAY T90 systems that support IEEE floatingpoint arithmetic
CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
IEEE Standard for Binary Floatingpoint Arithmetic
The SET_IEEE_STATUS intrinsic subroutine is typically used to restore
the caller's floatingpoint status just before exiting a procedure.
It accepts the following argument:
status Must be scalar and of an integer type that occupies a full
word. It is an INTENT(IN) argument.
On CRAY T90 systems that support IEEE floatingpoint
arithemetic, its value (contained in a 64bit word) is
stored into SR0. On other architectures, the flags are
stored into the appropriate flag bits of the word(s) or
register(s) that record the floatingpoint state.
The value in status is assumed to have been produced through
an invocation of GET_IEEE_STATUS(3I).
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.
There are 6 bits, called the IEEE Floating Point Exception Status Bits
or the sticky bits, that indicate whether any one of 6 possible
exceptions has occurred (the 5 exceptions specified by the IEEE
floatingpoint standard and a Cray Research extension). The user
program begins with these bits cleared to zero. The occurrence of any
of the exceptions will set the corresponding bit. Only the user can
clear these bits.
! Assume this example demonstrates code for an IRIX system
! where default integer type occupies a full word.
SUBROUTINE CALCULATE
USE FTN_IEEE_DEFINITIONS
INTEGER IEEE_STATUS
... ! Only stmts here that can't change the
! floating point status.
CALL GET_IEEE_STATUS(IEEE_STATUS)
... ! Body of the procedure.
CALL SET_IEEE_STATUS(IEEE_STATUS)
END SUBROUTINE
GET_IEEE_STATUS(3I) is called upon entry to the example's procedure
CALCULATE to capture the current floatingpoint status. If procedure
CALCULATE changes the floatingpoint status, the original
floatingpoint status can be reset before exiting from CALCULATE by
calling SET_IEEE_STATUS.
GET_IEEE_STATUS(3I)
Intrinsic Procedures Reference Manual, publication SR2138, for the
printed version of this man page.
[ Back ]
