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?Acos

Computes inverse cosine of vector elements.

Syntax

vsAcos( n, a, y );

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

vmsAcos( n, a, y, mode );

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

vdAcos( n, a, y );

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

vmdAcos( n, a, y, mode );

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

vcAcos( n, a, y );

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

vmcAcos( n, a, y, mode );

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

vzAcos( n, a, y );

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

vmzAcos( n, a, y, mode );

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

Include Files
  • mkl.h
Input Parameters

Name

Type

Description

n

const int

Specifies the number of elements to be calculated.

a

const float* for vsAcos, vmsAcos

const double* for vdAcos, vmdAcos

const MKL_Complex8* for vcAcos, vmcAcos

const MKL_Complex16* for vzAcos, vmzAcos

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 vsAcos, vmsAcos

double* for vdAcos, vmdAcos

MKL_Complex8* for vcAcos, vmcAcos

MKL_Complex16* for vzAcos, vmzAcos

Pointer to an array that contains the output vector y.

Description

The v?Acos function computes inverse cosine of vector elements.

Special Values for Real Function v?Acos(x)
Argument Result VM Error Status Exception
+0 +π/2    
-0 +π/2    
+1 +0    
-1 +π    
|X| > 1 QNAN VML_STATUS_ERRDOM INVALID
+ QNAN VML_STATUS_ERRDOM INVALID
- QNAN VML_STATUS_ERRDOM INVALID
QNAN QNAN    
SNAN QNAN   INVALID

See Special Value Notations for the conventions used in the table below.

Special Values for Complex Function v?Acos(z)

RE(z)

i·IM(z)

-

 

-X

 

-0

 

+0

 

+X

 

+

 

NAN

 

+i· +3·π/4-i· +π/2-i· +π/2-i· +π/2-i· +π/2-i· +π/4-i· QNAN-i·
+i·Y +π-i·         +0-i· QNAN+i·QNAN
+i·0 +π-i·   +π/2-i·0 +π/2-i·0   +0-i· QNAN+i·QNAN
-i·0 +π+i·   +π/2+i·0 +π/2+i·0   +0+i· QNAN+i·QNAN
-i·Y +π+i·         +0+i· QNAN+i·QNAN
-i· +3π/4+i· +π/2+i· +π/2+i· +π/2+i· +π/2+i· +π/4+i· QNAN+i·
+i·NAN QNAN+i· QNAN+i·QNAN +π/2+i·QNAN +π/2+i·QNAN QNAN+i·QNAN QNAN+i· QNAN+i·QNAN

Notes:

  • raises INVALID exception when real or imaginary part of the argument is SNAN

  • Acos(CONJ(z))=CONJ(Acos(z)).