v?Atan2

Computes four-quadrant inverse tangent of elements of two vectors.

Syntax

FORTRAN:

call vsatan2( n, a, b, y )

call vmsatan2( n, a, b, y, mode )

call vdatan2( n, a, b, y )

call vmdatan2( n, a, b, y, mode )

C:

vsAtan2( n, a, b, y );

vmsAtan2( n, a, b, y, mode );

vdAtan2( n, a, b, y );

vmdAtan2( n, a, b, y, mode );

Include Files

Input Parameters

Name

Type

Description

n

FORTRAN 77: INTEGER

Fortran 90: INTEGER, INTENT(IN)

C: const int

Specifies the number of elements to be calculated.

a, b

FORTRAN 77: REAL for vsatan2, vmsatan2

DOUBLE PRECISION for vdatan2, vmdatan2

Fortran 90: REAL, INTENT(IN) for vsatan2, vmsatan2

DOUBLE PRECISION, INTENT(IN) for vdatan2, vmdatan2

C: const float* for vsAtan2, vmsAtan2

const double* for vdAtan2, vmdAtan2

FORTRAN: Arrays that specify the input vectors a and b.

C: Pointers to arrays that contain the input vectors a and b.

mode

FORTRAN 77: INTEGER*8

Fortran 90: INTEGER(KIND=8), INTENT(IN)

C: const MKL_INT64

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

Output Parameters

Name

Type

Description

y

FORTRAN 77: REAL for vsatan2, vmsatan2

DOUBLE PRECISION for vdatan2, vmdatan2

Fortran 90: REAL, INTENT(OUT) for vsatan2, vmsatan2

DOUBLE PRECISION, INTENT(OUT) for vdatan2, vmdatan2

C: float* for vsAtan2, vmsAtan2

double* for vdAtan2, vmdAtan2

FORTRAN: Array that specifies the output vector y.

C: Pointer to an array that contains the output vector y.

Description

The v?Atan2 function computes four-quadrant inverse tangent of elements of two vectors.

The elements of the output vectory are computed as the four-quadrant arctangent of a[i] / b[i].

Special values for Real Function v?Atan2(x)
Argument 1 Argument 2 Result Exception
- - -3*π/4  
- X < +0 -π/2  
- -0 -π/2  
- +0 -π/2  
- X > +0 -π/2  
- + -π/4  
X < +0 - -π  
X < +0 -0 -π/2  
X < +0 +0 -π/2  
X < +0 + -0  
-0 - -π  
-0 X < +0 -π  
-0 -0 -π  
-0 +0 -0  
-0 X > +0 -0  
-0 + -0  
+0 - +π  
+0 X < +0 +π  
+0 -0 +π  
+0 +0 +0  
+0 X > +0 +0  
+0 + +0  
X > +0 - +π  
X > +0 -0 +π/2  
X > +0 +0 +π/2  
X > +0 + +0  
+ - -3*π/4  
+ X < +0 +π/2  
+ -0 +π/2  
+ +0 +π/2  
+ X > +0 +π/2  
+ + +π/4  
X > +0 QNAN QNAN  
X > +0 SNAN QNAN INVALID
QNAN X > +0 QNAN  
SNAN X > +0 QNAN INVALID
QNAN QNAN QNAN  
QNAN SNAN QNAN INVALID
SNAN QNAN QNAN INVALID
SNAN SNAN QNAN INVALID

Submit feedback on this help topic