Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
v?Fmod
The v?Fmod function performs element by element computation of the modulus function of vector a with respect to vector b .
Syntax
call vsfmod(n, a, b, y)
call vsfmodi(n, a, inca, b, incb, y, incy)
call vmsfmod(n, a, b, y, mode)
call vmsfmodi(n, a, inca, b, incb, y, incy, mode)
call vdfmod(n, a, b, y)
call vdfmodi(n, a, inca, b, incb, y, incy)
call vmdfmod(n, a, b, y, mode)
call vmdfmodi(n, a, inca, b, incb, y, incy, mode)
Include Files
mkl_vml.f90
Input Parameters
Name |
Type |
Description |
|---|---|---|
n |
INTEGER |
Specifies the number of elements to be calculated. |
a, b |
REAL for vsFmod REAL for vmsFmod DOUBLE PRECISION for vdFmod DOUBLE PRECISION for vmdFmod |
Pointers to arrays containing the input vectors a and b . |
inca , incb , incy |
INTEGER, INTENT(IN) |
Specifies increments for the elements of a , b , and y . |
mode |
INTEGER (KIND=8) |
Overrides the global VM mode setting for this function call. See vmlSetMode (Sets a new mode for VM functions according to the mode parameter and stores the previous VM mode to oldmode.) for possible values and their description. |
Output Parameters
Name |
Type |
Description |
|---|---|---|
y |
REAL for vsFmod REAL for vmsFmod DOUBLE PRECISION for vdFmod DOUBLE PRECISION for vmdFmod |
Pointer to an array containing the output vector y . |
Description
The v?Fmod function computes the modulus function of each element of vector a , with respect to the corresponding elements of vector b :
\(a_{i} - b_{i}*trunc(a_{i}/b_{i})\)
In general, the modulus function fmod (a_{i}, b_{i}) returns the value a_{i} - n*b_{i} for some integer n such that if bi is nonzero, the result has the same sign as ai and a magnitude less than the magnitude of bi .
Special values for Real Function v?Fmod(x, y)
Argument 1 |
Argument 2 |
Result |
VM Error Status |
Exception |
|---|---|---|---|---|
x not NAN |
± 0 |
NAN |
VML_STATUS_SING |
INVALID |
±∞ |
y not NAN |
NAN |
VML_STATUS_SING |
INVALID |
± 0 |
y ≠ 0, not NAN |
± 0 |
||
x finite |
±∞ |
x |
UNDERFLOW if x is subnormal |
|
NAN |
y |
NAN |
||
x |
NAN |
NAN |