インテル® Fortran コンパイラー 19.0 デベロッパー・ガイドおよびリファレンス
Elemental Intrinsic Function (Specific): Selects the left 64 bits after shifting a 128-bit integer value to the right. This function cannot be passed as an actual argument.
result = DSHIFTR (i,j,shift)
i |
(Input) Must be of type integer, or a binary, octal, or hexadecimal literal constant. |
j |
(Input) Must be of type integer, or a binary, octal, or hexadecimal literal constant. |
shift |
(Input) Integer. Must be nonnegative and less than or equal to 64. This is the shift count. |
The result type is integer. The result value is the 64-bit value starting at bit 64 + shift of the 128-bit concatenation of the values of i and j.
If either i or j is a binary, octal, or hexadecimal literal constant, it is first converted as if by the intrinsic function INT to type integer with the kind type parameter of the other. The leftmost shift bits of the result value are the same as the rightmost bits of i, and the remaining bits of the result value are the same as the leftmost bits of j. This is equal to IOR (SHIFTL (I, BIT SIZE (I) - SHIFT), SHIFTR (J, SHIFT)).
Consider the following:
INTEGER(8) ILEFT / Z'111122221111222' /
INTEGER(8) IRIGHT / Z'FFFFFFFFFFFFF' /
PRINT *, DSHIFTR (ILEFT, IRIGHT, 16_8) ! prints 1306606910610341887