Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 12/16/2022
Public

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

Document Table of Contents

v?Sin

Computes sine of vector elements.

Syntax

vsSin( n, a, y );

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

vmsSin( n, a, y, mode );

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

vdSin( n, a, y );

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

vmdSin( n, a, y, mode );

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

vcSin( n, a, y );

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

vmcSin( n, a, y, mode );

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

vzSin( n, a, y );

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

vmzSin( n, a, y, mode );

vmzSinI(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 vsSin, vmsSin

const double* for vdSin, vmdSin

const MKL_Complex8* for vcSin, vmcSin

const MKL_Complex16* for vzSin, vmzSin

Pointer to an array that contains the input vector a.

inca, incy

const MKL_INT

Specifies increments for the elements of a and y.

mode

const MKL_INT64

Overrides global VM mode setting for this function call. See vmlSetMode for possible values and their description.

Output Parameters

Name

Type

Description

y

float* for vsSin, vmsSin

double* for vdSin, vmdSin

MKL_Complex8* for vcSin, vmcSin

MKL_Complex16* for vzSin, vmzSin

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 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?Sin(x)
Argument Result VM Error Status Exception
+0 +0    
-0 -0    
+ QNAN VML_STATUS_ERRDOM INVALID
- QNAN VML_STATUS_ERRDOM INVALID
QNAN QNAN    
SNAN QNAN   INVALID

Specifications for special values of the complex functions are defined according to the following formula

Sin(z) = -i*Sinh(i*z).

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

Notice revision #20201201