Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

v?Powr

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);

vsPowrI(n, a, inca, b, incb, y, incy);

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

vmsPowrI(n, a, inca, b, incb, y, incy, mode);

vdPowr (n, a, b, y);

vdPowrI(n, a, inca, b, incb, y, incy);

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

vmdPowrI(n, a, inca, b, incb, y, incy, 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.

inca, incb, incy

const MKL_INT

Specifies increments for the elements of a, b, and y.

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