Computes a to the power b for elements of two vectors, where the elements of vector argument a are all non-negative.

Syntax

vsPowr (n, a, b, y);

vmsPowr (n, a, b, y, mode);

vdPowr (n, a, b, y);

vmdPowr (n, a, b, y, mode);

Include Files

  • mkl.h

Input Parameters

Name

Type

Description

n

const MKL_INT

Specifies the number of elements to be calculated.

a, b

const float* for vsPowr

const float* for vmsPowr

const double* for vdPowr

const double* for vmdPowr

Pointers to arrays containing the input vectors a and b.

mode

const MKL_INT64

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

Output Parameters

Name

Type

Description

y

float* for vsPowr

float* for vmsPowr

double* for vdPowr

double* for vmdPowr

Pointer to an array containing the output vector y.

Description

The v?Powr function raises each element of vector a by the corresponding element of vector b. The elements of a are all nonnegative (ai 0).

Precision Overflow Thresholds for Real Function v?Powr
Data Type Threshold Limitations on Input Parameters
single precision ai < (FLT_MAX)1/bi
double precision ai < (DBL_MAX)1/bi

Special values and VM Error Status treatment for v?Powr function are the same as for v?Pow, unless otherwise indicated in this table:

Special values for Real Function v?Powr(x)
Argument 1 Argument 2 Result VM Error Status Exception
x < 0 any value y NAN VML_STATUS_ERRDOM INVALID
0 < x < ±0 1    
±0 - < y < 0 +    
±0 - +    
±0 y > 0 +0    
1 - < y < 1    
±0 ±0 NAN    
+ ±0 NAN    
1 + NAN    
x 0 NAN NAN    
NAN any value y NAN    
0 < x <1 - +    
x > 1 - +0    
0 x < 1 + +0    
x > 1 + +    
+ x < +0 +0    
+ x > +0 +    
QNAN QNAN QNAN VML_STATUS_ERRDOM  
QNAN SNAN QNAN VML_STATUS_ERRDOM INVALID
SNAN QNAN QNAN VML_STATUS_ERRDOM INVALID
SNAN SNAN QNAN VML_STATUS_ERRDOM INVALID

See Also

有关编译器优化的更完整信息,请参阅优化通知
选择粘滞按钮颜色: 
Orange (only for download buttons)