Intel® oneAPI Math Kernel Library Developer Reference - C
Computes four-quadrant inverse tangent of elements of two vectors.
vsAtan2( n, a, b, y );
vsAtan2I(n, a, inca, b, incb, y, incy);
vmsAtan2( n, a, b, y, mode );
vmsAtan2I(n, a, inca, b, incb, y, incy, mode);
vdAtan2( n, a, b, y );
vdAtan2I(n, a, inca, b, incb, y, incy);
vmdAtan2( n, a, b, y, mode );
vmdAtan2I(n, a, inca, b, incb, y, incy, mode);
Name |
Type |
Description |
|---|---|---|
n |
const MKL_INT |
Specifies the number of elements to be calculated. |
a, b |
const float* for vsAtan2, vmsAtan2 const double* for vdAtan2, vmdAtan2 |
Pointers to arrays that contain the input vectors a and b. |
inca, incb, incy |
const MKL_INT |
Specifies increments for the elements of a, b and y. |
mode |
const MKL_INT64 |
Overrides global VM mode setting for this function call. See vmlSetMode for possible values and their description. |
Name |
Type |
Description |
|---|---|---|
y |
float* for vsAtan2, vmsAtan2 double* for vdAtan2, vmdAtan2 |
Pointer to an array that contains the output vector y. |
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].
| 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 |