Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
v?Atan2
vsAtan2 vdAtan2 vmsAtan2 vmdAtan2 Computes four-quadrant inverse tangent of elements of two vectors.
Syntax
call vsatan2(n, a, b, y)
call vsatan2i(n, a, inca, b, incb, y, incy)
call vmsatan2(n, a, b, y, mode)
call vmsatan2i(n, a, inca, b, incb, y, incy, mode)
call vdatan2(n, a, b, y)
call vdatan2i(n, a, inca, b, incb, y, incy)
call vmdatan2(n, a, b, y, mode)
call vmdatan2i(n, a, inca, b, incb, 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 , b |
Fortran 77: DOUBLE PRECISION for vdatan2 , vmdatan2Fortran 90: REAL , INTENT(IN) for vsatan2 , vmsatan2Fortran 90: DOUBLE PRECISION , INTENT(IN) for vdatan2 , vmdatan2 |
Arrays that specify the input vectors a and b . |
inca , incb , incy |
INTEGER, INTENT(IN) |
Specifies increments for the elements of a , b and y . |
mode |
INTEGER(KIND=8) , INTENT(IN) |
Overrides global VM mode setting for this function call. See vmlSetMode (Sets a new mode for VM functions according to the mode parameter and stores the previous VM mode to oldmode.) for possible values and their description. |
Output Parameters
Name |
Type |
Description |
|---|---|---|
y |
Fortran 90: DOUBLE PRECISION for vdatan2 , vmdatan2Fortran 90: REAL , INTENT(OUT) for vsatan2 , vmsatan2Fortran 90: DOUBLE PRECISION , INTENT(OUT) for vdatan2 , vmdatan2 |
Array that specifies the output vector y . |
Description
The v?Atan2 function computes four-quadrant inverse tangent of elements of two vectors.
The elements of the output vector y 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 |
|
|
|
-0 |
|
|
|
+0 |
|
|
|
X > +0 |
|
|
|
|
|
|
X < +0 |
|
|
|
X < +0 |
-0 |
|
|
X < +0 |
+0 |
|
|
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 |
|
|
X > +0 |
+0 |
|
|
X > +0 |
|
+0 |
|
|
|
+3* π /4 |
|
|
X < +0 |
|
|
|
-0 |
|
|
|
+0 |
|
|
|
X > +0 |
|
|
|
|
|
|
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 |