# IEEE_SET_UNDERFLOW_MODE

Intrinsic Module Subroutine (Generic): Sets the current underflow mode. This is an impure subroutine.

## Module

USE, INTRINSIC :: IEEE_ARITHMETIC

CALL IEEE_SET_UNDERFLOW_MODE (gradual)

gradual | (Input) Must be scalar and of type logical. If it is true, the current underflow mode is set to gradual underflow (subnormals may be produced on underflow). If it is false, the current underflow mode is set to abrupt (underflowed results are set to zero).

## Example

Consider the following:

    USE, INTRINSIC :: IEEE_EXCEPTIONS
    LOGICAL :: SG
    ...
    CALL IEEE_GET_UNDERFLOW_MODE (SG) ! Stores underflow mode
    CALL IEEE_SET_UNDERFLOW_MODE (.FALSE.) ! Resets underflow mode
    ...                                    ! Abrupt underflows happens here
    CALL IEEE_SET_UNDERFLOW_MODE (SG) ! Restores previous underflow mode

Parent topic: H to I