Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
v?Sqrt
vsSqrt vdSqrt vcSqrt vzSqrt vmsSqrt vmdSqrt vmcSqrt vmzSqrt Computes a square root of vector elements.
Syntax
call vssqrt ( n , a , y )
call vssqrti(n, a, inca, y, incy)
call vmssqrt ( n , a , y , mode )
call vmssqrti(n, a, inca, y, incy, mode)
call vdsqrt ( n , a , y )
call vdsqrti(n, a, inca, y, incy)
call vmdsqrt ( n , a , y , mode )
call vmdsqrti(n, a, inca, y, incy, mode)
call vcsqrt ( n , a , y )
call vcsqrti(n, a, inca, y, incy)
call vmcsqrt ( n , a , y , mode )
call vmcsqrti(n, a, inca, y, incy, mode)
call vzsqrt ( n , a , y )
call vzsqrti(n, a, inca, y, incy)
call vmzsqrt ( n , a , y , mode )
call vmzsqrti(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 |
Fortran 77: DOUBLE PRECISION for vdsqrt , vmdsqrtFortran 77: COMPLEX for vcsqrt , vmcsqrtFortran 77: DOUBLE COMPLEX for vzsqrt , vmzsqrtFortran 90: REAL , INTENT(IN) for vssqrt , vmssqrtFortran 90: DOUBLE PRECISION , INTENT(IN) for vdsqrt , vmdsqrtFortran 90: COMPLEX , INTENT(IN) for vcsqrt , vmcsqrtFortran 90: DOUBLE COMPLEX , INTENT(IN) for vzsqrt , vmzsqrt |
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 (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 77: REAL for vssqrt , vmssqrtFortran 77: DOUBLE PRECISION for vdsqrt , vmdsqrtFortran 77: COMPLEX for vcsqrt , vmcsqrtFortran 90: DOUBLE COMPLEX for vzsqrt , vmzsqrtFortran 90: REAL , INTENT(OUT) for vssqrt , vmssqrtFortran 90: DOUBLE PRECISION , INTENT(OUT) for vdsqrt , vmdsqrtFortran 90: COMPLEX , INTENT(OUT) for vcsqrt , vmcsqrtFortran 90: DOUBLE COMPLEX , INTENT(OUT) for vzsqrt , vmzsqrt |
Array that specifies the output vector y . |
Description
The v?Sqrt function computes a square root of vector elements.
Special Values for Real Function v?Sqrt(x)
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.
Special Values for Complex Function v?Sqrt(z)
RE(z) i · IM(z) |
|
-X |
-0 |
+0 |
+X |
|
NAN |
|---|---|---|---|---|---|---|---|
+i · ∞ |
|
|
|
|
|
|
|
+i · Y |
+0+i · ∞ |
|
QNAN+i · QNAN |
||||
+i · 0 |
+0+i · ∞ |
+0+i · 0 |
+0+i · 0 |
|
QNAN+i · QNAN |
||
-i · 0 |
+0-i · ∞ |
+0-i · 0 |
+0-i · 0 |
|
QNAN+i · QNAN |
||
-i · Y |
+0-i · ∞ |
|
QNAN+i · QNAN |
||||
-i · ∞ |
|
|
|
|
|
|
|
+i · NAN |
QNAN+i · QNAN |
QNAN+i · QNAN |
QNAN+i · QNAN |
QNAN+i · QNAN |
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)) .