# Cos

Computes cosine of vector elements.

## Syntax

Fortran:

call vscos( n, a, y )

call vdcos( n, a, y )

call vccos( n, a, y )

call vzcos( n, a, y )

C:

vsCos( n, a, y );

vdCos( n, a, y );

vcCos( n, a, y );

vzCos( n, a, y );

## Input Parameters

Name | Type | Description
--- | --- | ---
n | FORTRAN: INTEGER, INTENT(IN) C: int | Specifies the number of elements to be calculated.
a | FORTRAN: REAL, INTENT(IN) for vscos DOUBLE PRECISION, INTENT(IN) for vdcos COMPLEX, INTENT(IN) for vccos DOUBLE PRECISION, INTENT(IN) for vzcos C: const float* for vsCos const double* for vdCos const MKL_Complex8* for vcCos const MKL_Complex16* for vzCos | FORTRAN: Array, specifies the input vector a. C: Pointer to an array that contains the input vector a.

## Output Parameters

Name | Type | Description
--- | --- | ---
y | FORTRAN: REAL for vscos DOUBLE PRECISION for vdcos COMPLEX for vccos DOUBLE COMPLEX for vzcos C: float* for vsCos double* for vdCos MKL_Complex8* for vcCos MKL_Complex16* for vzCos | FORTRAN: Array, specifies the output vector y. C: Pointer to an array that contains the output vector y.

## Description

The function computes sine of vector elements.

Note that arguments `abs(a[i]) ≤ 213` and `abs(a[i]) ≤ 216` for single and double precisions respectively are called fast computational path. These are trig function arguments for which VML provides the best possible performance. For performance reasons, avoid arguments that do not belong to the fast computational path in the VML HA and LA functions. Alternatively, you can use VML EP functions that are fast on the entire function domain at the cost of accuracy.

Parent topic: Trigonometric Functions