IEEE_SET_ROUNDING_MODE

Intrinsic Module Subroutine (Generic): Sets the IEEE rounding mode.

Module

USE, INTRINSIC :: IEEE_ARITHMETIC

構文

CALL IEEE_SET_ROUNDING_MODE (round_value)

round_value

(Output) Must be scalar and of type TYPE (IEEE_ROUND_TYPE). It specifies one of the following IEEE floating-point rounding values:

IEEE_DOWN, IEEE_NEAREST, IEEE_TO_ZERO, IEEE_UP, or IEEE_OTHER.

Consider the following:

USE, INTRINSIC :: IEEE_ARITHMETIC 
TYPE (IEEE_ROUND_TYPE) ROUND
...
CALL IEEE_GET_ROUNDING_MODE (ROUND) ! Stores the rounding mode
CALL IEEE_SET_ROUNDING_MODE (IEEE_UP) ! Resets the rounding mode
...
CALL IEEE_SET_ROUNDING_MODE (VALUE) ! Restores the previous rounding mode

このヘルプトピックについてのフィードバックを送信

© 1996-2011 Intel Corporation. 無断での引用、転載を禁じます。