Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

IEEE_SET_MODES

Intrinsic Module Subroutine (Generic): Restores the current IEEE floating-point modes. This is an impure subroutine.

Module

USE, INTRINSIC :: IEEE_EXCEPTIONS

CALL IEEE_SET_MODES (modes)

modes

(Input) Must be scalar and of type TYPE (IEEE_MODES_TYPE). Its value must be a value that was assigned to the modes argument of a previous call to IEEE_GET_MODES.

A call to IEEE_SET_MODES restores the value of the floating-point modes to the state at the time IEEE_GET_MODES was called.

Example

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