Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 7/13/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?Arg

Computes argument of vector elements.

Syntax

vcArg( n, a, y );

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

vmcArg( n, a, y, mode );

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

vzArg( n, a, y );

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

vmzArg( n, a, y, mode );

vmzArgI(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 MKL_Complex8* for vcArg, vmcArg

const MKL_Complex16* for vzArg, vmcArg

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 vcArg, vmcArg

double* for vzArg, vmcArg

Pointer to an array that contains the output vector y.

Description

The v?Arg function computes argument of vector elements.

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

Special Values for Complex Function v?Arg(z)

RE(z)

i·IM(z)

-

 

-X

 

-0

 

+0

 

+X

 

+

 

NAN

 

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

Notes:

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

  • Arg(z)=Atan2(IM(z),RE(z)).