Developer Reference

  • 2021.1
  • 12/04/2020
  • Public Content
Contents

v?Remainder

Performs element by element computation of the remainder function on the elements of vector
a
and the corresponding elements of vector
b
.

Syntax

vsRemainder
(
n
,
a
,
b
,
y
);
vsRemainderI(n, a, inca, b, incb, y, incy);
vmsRemainder
(
n
,
a
,
b
,
y
,
mode
);
vmsRemainderI(n, a, inca, b, incb, y, incy, mode);
vdRemainder
(
n
,
a
,
b
,
y
);
vdRemainderI(n, a, inca, b, incb, y, incy);
vmdRemainder
(
n
,
a
,
b
,
y
,
mode
);
vmdRemainderI(n, a, inca, b, incb, y, incy, mode);
Include Files
  • mkl.h
Input Parameters
Name
Type
Description
n
const MKL_INT
Specifies the number of elements to be calculated.
a, b
const float*
for
vsRemainder
const float*
for
vmsRemainder
const double*
for
vdRemainder
const double*
for
vmdRemainder
Pointers to arrays containing the input vectors
a
and
b
.
inca
,
incb
,
incy
const MKL_INT
Specifies increments for the elements of
a
,
b
, and
y
.
mode
const MKL_INT64
Overrides the global VM
mode
setting for this function call. See
vmlSetMode
for possible values and their description.
Output Parameters
Name
Type
Description
y
float*
for
vsRemainder
float*
for
vmsRemainder
double*
for
vdRemainder
double*
for
vmdRemainder
Pointer to an array containing the output vector
y
.
Description
Computes the remainder of each element of vector
a
, with respect to the corresponding elements of vector
b
: compute the values of
n
such that
n
=
a
i
-
n
*
b
i
where
n
is the integer nearest to the exact value of
a
i
/
b
i
. If two integers are equally close to
a
i
/
b
i
,
n
is the even one. If
n
is zero, it has the same sign as
a
i
.
Special values for Real Function
v?Remainder(x, y)
Argument 1
Argument 2
Result
VM Error Status
Exception
x
not NAN
±
0
NAN
VML_STATUS_DOM
INVALID
±∞
y
not NAN
NAN
INVALID
±
0
y
0, not NAN
±
0
 
x
finite
±∞
x
UNDERFLOW if
x
is subnormal
NAN
y
NAN
x
NAN
NAN
If element
i
in the result of
v?Remainder
is 0, its sign is that of
a
i
.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.