Intrinsic Module Subroutine (Generic): Stores the current IEEE floating-point modes. This is an impure subroutine.
USE, INTRINSIC :: IEEE_EXCEPTIONS
CALL IEEE_GET_MODES (modes)
modes |
(Output) Must be scalar and of type TYPE (IEEE_MODES_TYPE). It is assigned the value of the floating-point modes. |
Consider the following:
USE, INTRINSIC :: IEEE_EXCEPTIONS ! Can also use IEEE_ARITHMETIC
TYPE (IEEE_MODE_TYPE) MODES
...
CALL IEEE_GET_MODES (MODES) ! Stores the floating-point modes
CALL IEEE_SET_UNDERFLOW_MODE (.TRUE.) ! Sets the underflow mode to gradual
...
CALL IEEE_SET_MODES (MODES) ! Restores the floating-point modes