Intel® Math Kernel Library 2019 Developer Reference - Fortran
Computes a square root of vector elements.
call vssqrt( n, a, y )
call vmssqrt( n, a, y, mode )
call vdsqrt( n, a, y )
call vmdsqrt( n, a, y, mode )
call vcsqrt( n, a, y )
call vmcsqrt( n, a, y, mode )
call vzsqrt( n, a, y )
call vmzsqrt( n, a, y, mode )
Name |
Type |
Description |
|---|---|---|
n |
INTEGER, INTENT(IN) |
Specifies the number of elements to be calculated. |
a |
DOUBLE PRECISION for vdsqrt, vmdsqrt COMPLEX for vcsqrt, vmcsqrt DOUBLE COMPLEX for vzsqrt, vmzsqrt REAL, INTENT(IN) for vssqrt, vmssqrt DOUBLE PRECISION, INTENT(IN) for vdsqrt, vmdsqrt COMPLEX, INTENT(IN) for vcsqrt, vmcsqrt DOUBLE COMPLEX, INTENT(IN) for vzsqrt, vmzsqrt |
Array that specifies the input vector a. |
mode |
INTEGER(KIND=8), INTENT(IN) |
Overrides global VM mode setting for this function call. See vmlSetMode for possible values and their description. |
Name |
Type |
Description |
|---|---|---|
y |
REAL for vssqrt, vmssqrt DOUBLE PRECISION for vdsqrt, vmdsqrt COMPLEX for vcsqrt, vmcsqrt DOUBLE COMPLEX for vzsqrt, vmzsqrt REAL, INTENT(OUT) for vssqrt, vmssqrt DOUBLE PRECISION, INTENT(OUT) for vdsqrt, vmdsqrt COMPLEX, INTENT(OUT) for vcsqrt, vmcsqrt DOUBLE COMPLEX, INTENT(OUT) for vzsqrt, vmzsqrt |
Array that specifies the output vector y. |
The v?Sqrt function computes a square root of vector elements.
| Argument | Result | VM Error Status | Exception |
|---|---|---|---|
| X < +0 | QNAN | VML_STATUS_ERRDOM | INVALID |
| +0 | +0 | ||
| -0 | -0 | ||
| -∞ | QNAN | VML_STATUS_ERRDOM | INVALID |
| +∞ | +∞ | ||
| QNAN | QNAN | ||
| SNAN | QNAN | INVALID |
See Special Value Notations for the conventions used in the table below.
RE(z) i·IM(z) |
-∞
|
-X
|
-0
|
+0
|
+X
|
+∞
|
NAN
|
|---|---|---|---|---|---|---|---|
| +i·∞ | +∞+i·∞ | +∞+i·∞ | +∞+i·∞ | +∞+i·∞ | +∞+i·∞ | +∞+i·∞ | +∞+i·∞ |
| +i·Y | +0+i·∞ | +∞+i·0 | QNAN+i·QNAN |
||||
| +i·0 | +0+i·∞ | +0+i·0 | +0+i·0 | +∞+i·0 | QNAN+i·QNAN |
||
| -i·0 | +0-i·∞ | +0-i·0 | +0-i·0 | +∞-i·0 | QNAN+i·QNAN |
||
| -i·Y | +0-i·∞ | +∞-i·0 | QNAN+i·QNAN |
||||
| -i·∞ | +∞-i·∞ | +∞-i·∞ | +∞-i·∞ | +∞-i·∞ | +∞-i·∞ | +∞-i·∞ | +∞-i·∞ |
| +i·NAN | QNAN+i·QNAN |
QNAN+i·QNAN |
QNAN+i·QNAN |
QNAN+i·QNAN |
QNAN+i·QNAN |
+∞+i·QNAN |
QNAN+i·QNAN |
Notes:
raises INVALID exception when the real or imaginary part of the argument is SNAN
Sqrt(CONJ(z))=CONJ(Sqrt(z)).