Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

v?SinCos

Computes sine and cosine of vector elements.

Syntax

call vssincos
(
n
,
a
,
y
,
z
)
call vssincosi(n, a, inca, y, incy, z, incz)
call vmssincos
(
n
,
a
,
y
,
z
,
mode
)
call vmssincosi(n, a, inca, y, incy, z, incz, mode)
call vdsincos
(
n
,
a
,
y
,
z
)
call vdsincosi(n, a, inca, y, incy, z, incz)
call vmdsincos
(
n
,
a
,
y
,
z
,
mode
)
call vmdsincosi(n, a, inca, y, incy, z, incz, mode)
Include Files
  • mkl_vml.f90
Input Parameters
Name
Type
Description
n
INTEGER
,
INTENT(IN)
Specifies the number of elements to be calculated.
a
DOUBLE PRECISION
for
vdsincos
,
vmdsincos
REAL
,
INTENT(IN)
for
vssincos
,
vmssincos
DOUBLE PRECISION
,
INTENT(IN)
for
vdsincos
,
vmdsincos
Array that specifies the input vector
a
.
inca
,
incy
,
incz
INTEGER, INTENT(IN)
Specifies increments for the elements of
a
,
y
, and
z
.
mode
INTEGER(KIND=8)
,
INTENT(IN)
Overrides global VM mode setting for this function call. See
vmlSetMode
for possible values and their description.
Output Parameters
Name
Type
Description
y
,
z
DOUBLE PRECISION
for
vdsincos
,
vmdsincos
REAL
,
INTENT(OUT)
for
vssincos
,
vmssincos
DOUBLE PRECISION
,
INTENT(OUT)
for
vdsincos
,
vmdsincos
Arrays that specify the output vectors
y
(for sine values) and
z
(for cosine values).
Description
The function computes sine and cosine of vector elements.
Note that arguments
abs(
a
[i]) ≤ 2
13
and
abs(
a
[i]) ≤ 2
16
for single and double precisions respectively are called fast computational path. These are trigonometric function arguments for which VM provides the best possible performance. Avoid arguments that do not belong to the fast computational path in the VM High Accuracy (HA) and Low Accuracy (LA) functions. Alternatively, you can use VM Enhanced Performance (EP) functions that are fast on the entire function domain. However, these functions provide less accuracy.
Special Values for Real Function
v?SinCos(x)
Argument
Result 1
Result 2
VM Error Status
Exception
+0
+0
+1