Exceptions and IEEE Arithmetic

The intrinsic module IEEE_EXCEPTIONS supplied with the Cray Fortran compiler contains three named constants in addition to those specified by the standard. These are of type IEEE_STATUS_TYPE and can be used as arguments to the IEEE_SET_STATUS subroutine. Their definitions correspond to common combinations of settings and allow for simple and fast changes to the IEEE mode settings.

The Exceptions

The intrinsic module IEEE_EXCEPTIONS supplied with the Cray Fortran compiler contains three named constants in addition to those specified by the standard. These are of type IEEE_STATUS_TYPE and can be used as arguments to the IEEE_SET_STATUS subroutine. Their definitions correspond to common combinations of settings and allow for simple and fast changes to the IEEE mode settings. The constants are:
Table 1. Cray Fortran IEEE Intrinsic Module Extensions
NameEffect of CALL IEEE_SET_STATUS (Name)
ieee_cri_nostop_mode
  • Clears all currently set exception flags
  • Disables halting for all exceptions
  • Enables setting of all exception flags
  • Sets rounding mode to round_to_nearest
ieee_cri_default_mode
  • Clears all currently set exception flags
  • Enables halting for overflow, divide_by_zero, and invalid
  • Disables halting for underflow and inexact
  • Enables setting of all exception flags
  • Sets rounding mode to round_to_nearest