Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
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?Arg

Computes argument of vector elements.

Syntax

call vcarg( n, a, y )

call vcargi(n, a, inca, y, incy)

call vmcarg( n, a, y, mode )

call vmcargi(n, a, inca, y, incy, mode)

call vzarg( n, a, y )

call vzargi(n, a, inca, y, incy)

call vmzarg( n, a, y, mode )

call vmzargi(n, a, inca, y, incy, mode)

Include Files
  • mkl_vml.f90
Input Parameters

Name

Type

Description

n

INTEGER, INTENT(IN)

Specifies the number of elements to be calculated.

a

FORTRAN77: COMPLEX for vcarg, vmcarg

DOUBLE COMPLEX for vzarg, vmzarg

COMPLEX, INTENT(IN) for vcarg, vmcarg

DOUBLE COMPLEX, INTENT(IN) for vzarg, vmzarg

Array that specifies the input vector a.

inca, incy

INTEGER, INTENT(IN)

Specifies increments for the elements of a and y.

mode

INTEGER(KIND=8), INTENT(IN)

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

Output Parameters

Name

Type

Description

y

DOUBLE PRECISION for vzarg, vmzarg

REAL, INTENT(OUT) for vcarg, vmcarg

DOUBLE PRECISION, INTENT(OUT) for vzarg, vmzarg

Array that specifies 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)).