Computes a square root of vector elements.

Syntax

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

  • mkl.h

Input Parameters

Name

Type

Description

n

const MKL_INT

Specifies the number of elements to be calculated.

a

const float* for vsSqrt, vmsSqrt

const double* for vdSqrt, vmdSqrt

const MKL_Complex8* for vcSqrt, vmcSqrt

const MKL_Complex16* for vzSqrt, vmzSqrt

Pointer to an array that contains the input vector a.

mode

const MKL_INT64

Overrides global VM mode setting for this function call. See vmlSetMode for possible values and their description.

Output Parameters

Name

Type

Description

y

float* for vsSqrt, vmsSqrt

double* for vdSqrt, vmdSqrt

MKL_Complex8* for vcSqrt, vmcSqrt

MKL_Complex16* for vzSqrt, vmzSqrt

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 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· ++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)).

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.
Selecione a cor do botão adesivo: 
Orange (only for download buttons)