Intel® Math Kernel Library 2019 Developer Reference - Fortran
Computes the cosine of vector elements multiplied by π/180.
call vscosd (n, a, y)
call vmscosd (n, a, y, mode)
call vdcosd (n, a, y)
call vmdcosd (n, a, y, mode)
Name |
Type |
Description |
|---|---|---|
n |
INTEGER |
Specifies the number of elements to be calculated. |
a |
REAL for vscosd REAL for vmscosd DOUBLE PRECISION for vdcosd DOUBLE PRECISION for vmdcosd |
Pointer to the array containing the input vector a. |
mode |
INTEGER (KIND=8) |
Overrides the global VM mode setting for this function call. See vmlSetMode for possible values and their description. |
Name |
Type |
Description |
|---|---|---|
y |
REAL for vscosd REAL for vmscosd DOUBLE PRECISION for vdcosd DOUBLE PRECISION for vmdcosd |
Pointer to an array containing the output vector y. |
The v?Cosd function computes the cosine of vector elements multiplied by π/180. For an argument x, the function computes cos(π*x/180).
| Argument | Result | VM Error Status | Exception |
|---|---|---|---|
| +0 | +1 | ||
| -0 | +1 | ||
| ±∞ | QNAN | VML_STATUS_ERRDOM | INVALID |
| QNAN | QNAN | ||
| SNAN | QNAN | INVALID |
If arguments abs(ai) ≤ 224 for single precision or abs(ai ) ≤ 252 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.