Visible to Intel only — GUID: GUID-0BE617ED-120D-4371-873B-AD5E6E62C9DE
Visible to Intel only — GUID: GUID-0BE617ED-120D-4371-873B-AD5E6E62C9DE
v?Cospi
Computes the cosine of vector elements multiplied by π.
Syntax
vhCospi (n, a, y);
vhCospiI(n, a, inca, y, incy);
vmhCospi (n, a, y, mode);
vmhCospiI(n, a, inca, y, incy, mode);
vsCospi (n, a, y);
vsCospiI(n, a, inca, y, incy);
vmsCospi (n, a, y, mode);
vmsCospiI(n, a, inca, y, incy, mode);
vdCospi (n, a, y);
vdCospiI(n, a, inca, y, incy);
vmdCospi (n, a, y, mode);
vmdCospiI(n, a, inca, 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 |
const _Float16* for vhCospi const float* for vsCospi const _Float16* for vmhCospi const float* for vmsCospi const double* for vdCospi const double* for vmdCospi |
Pointer to the array containing the input vector a. |
inca, incy |
const MKL_INT |
Specifies increments for the elements of a 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 |
_Float16* for vhCospi float* for vsCospi _Float16* for vmhCospi float* for vmsCospi double* for vdCospi double* for vmdCospi |
Pointer to an array containing the output vector y. |
Description
The v?Cospi function computes the cosine of vector elements multiplied by π. For an argument x, the function computes cos(π*x).
Argument | Result | VM Error Status | Exception |
---|---|---|---|
+0 | +1 | ||
-0 | +1 | ||
n + 0.5, for any integer n where n + 0.5 is representable | +0 | ||
±∞ | QNAN | VML_STATUS_ERRDOM | INVALID |
QNAN | QNAN | ||
SNAN | QNAN | INVALID |
Application Notes
If arguments abs(ai) ≤ 222 for single precision or abs(ai ) ≤ 243 for double precision, they belong to the fast computational path: arguments for which VM provides the best possible performance. Avoid arguments with do not belong to the fast computational path in VM High Accuracy (HA) or Low Accuracy (LA) functions. For arguments which do not belong to the fast computational path you can use VM Enhanced Performance (EP) functions, which are fast on the entire function domain. However, these functions provide lower accuracy.