v?Sqrt

Computes a square root of vector elements.

Syntax

Fortran:

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 )

C:

vsSqrt( n, a, y );

vmsSqrt( n, a, y, mode );

vdSqrt( n, a, y );

vmdSqrt( n, a, y, mode );

vcSqrt( n, a, y );

vmcSqrt( n, a, y, mode );

vzSqrt( n, a, y );

vmzSqrt( n, a, y, mode );

Include Files

The FORTRAN 77 interfaces are specified in the mkl_vml.f77 include file, the Fortran 95 interfaces are specified in the mkl_vml.f90 include file, and the C interfaces are specified in the mkl_vml_functions.h include file.

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

FORTRAN 77: REAL for vssqrt, vmssqrt

DOUBLE PRECISION for vdsqrt, vmdsqrt

COMPLEX for vcsqrt, vmcsqrt

DOUBLE COMPLEX for vzsqrt, vmzsqrt

Fortran 90: 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

C: const float* for vsSqrt, vmsSqrt

const double* for vdSqrt, vmdSqrt

const MKL_Complex8* for vcSqrt, vmcSqrt

const MKL_Complex16* for vzSqrt, vmzSqrt

FORTRAN: Array that specifies the input vector a.

C: Pointer to an array that contains the input vector a.

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 SetMode for possible values and their description.

Output Parameters

Name

Type

Description

y

FORTRAN: REAL for vssqrt, vmssqrt

DOUBLE PRECISION for vdsqrt, vmdsqrt

COMPLEX for vcsqrt, vmcsqrt

DOUBLE COMPLEX for vzsqrt, vmzsqrt

Fortran 90: 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

C: float* for vsSqrt, vmsSqrt

double* for vdSqrt, vmdSqrt

MKL_Complex8* for vcSqrt, vmcSqrt

MKL_Complex16* for vzSqrt, vmzSqrt

FORTRAN: Array that specifies the output vector y.

C: Pointer to an array that contains 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 VML 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· ++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:


Submit feedback on this help topic

Copyright © 1994 - 2011, Intel Corporation. All rights reserved.