Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

v?Cosd

Computes the cosine of vector elements multiplied by π/180.

Syntax

vsCosd (n, a, y);

vsCosdI(n, a, inca, y, incy);

vmsCosd (n, a, y, mode);

vmsCosdI(n, a, inca, y, incy, mode);

vdCosd (n, a, y);

vdCosdI(n, a, inca, y, incy);

vmdCosd (n, a, y, mode);

vmdCosdI(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 float* for vsCosd

const float* for vmsCosd

const double* for vdCosd

const double* for vmdCosd

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

float* for vsCosd

float* for vmsCosd

double* for vdCosd

double* for vmdCosd

Pointer to an array containing the output vector y.

Description

The v?Cosd function computes the cosine of vector elements multiplied by π/180. For an argument x, the function computes cos(π*x/180).

Special values for Real Function v?Cosd(x)
Argument Result VM Error Status Exception
+0 +1    
-0 +1    
± QNAN VML_STATUS_ERRDOM INVALID
QNAN QNAN    
SNAN QNAN   INVALID
Application Notes

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.

See Also