インテル® Fortran コンパイラー 19.0 デベロッパー・ガイドおよびリファレンス
Elemental Module Intrinsic Function (Generic): Returns the result of an exact remainder operation. This is equivalent to the IEEE remainder function.
USE, INTRINSIC :: IEEE_ARITHMETIC
result = IEEE_REM (x,y)
x |
(Input) Must be of type REAL. |
y |
(Input) Must be of type REAL with a radix that is the same as that of x. |
The result type is real with the kind type parameter of whichever argument has greater precision.
Regardless of the rounding mode, the result value is x - y*N, where N is the integer nearest to the value x / y. If |N – x / y | = 1/2, N is even. If the result value is zero, the sign is the same as x.
The value of IEEE_REM (5.0,4.0) is 1.0; the value of IEEE_REM (2.0,1.0) is 0.0; the value of IEEE_REM (3.0,2.0) is -1.0.