Developer Reference

Contents

v?Pow

Computes
a
to the power
b
for elements of two vectors.

Syntax

vsPow
(
n
,
a
,
b
,
y
)
;
vsPowI(n, a, inca, b, incb, y, incy);
vmsPow
(
n
,
a
,
b
,
y
,
mode
)
;
vmsPowI(n, a, inca, b, incb, y, incy, mode);
vdPow
(
n
,
a
,
b
,
y
)
;
vdPowI(n, a, inca, b, incb, y, incy);
vmdPow
(
n
,
a
,
b
,
y
,
mode
)
;
vmdPowI(n, a, inca, b, incb, y, incy, mode);
vcPow
(
n
,
a
,
b
,
y
)
;
vcPowI(n, a, inca, b, incb, y, incy);
vmcPow
(
n
,
a
,
b
,
y
,
mode
)
;
vmcPowI(n, a, inca, b, incb, y, incy, mode);
vzPow
(
n
,
a
,
b
,
y
)
;
vzPowI(n, a, inca, b, incb, y, incy);
vmzPow
(
n
,
a
,
b
,
y
,
mode
)
;
vmzPowI(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
vsPow
,
vmsPow
const double*
for
vdPow
,
vmdPow
const MKL_Complex8*
for
vcPow
,
vmcPow
const MKL_Complex16*
for
vzPow
,
vmzPow
Pointers to arrays that contain 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 global VM mode setting for this function call. See
vmlSetMode
for possible values and their description.
Precision Overflow Thresholds for Real
v?Pow
Function
Data Type
Threshold Limitations on Input Parameters
single precision
abs(
a
[i]) < ( FLT_MAX )
1/b[i]
double precision
abs(
a
[i]) < ( DBL_MAX )
1/b[i]
Precision overflow thresholds for the complex
v?Pow
function are beyond the scope of this document.
Output Parameters
Name
Type
Description
y
float*
for
vsPow
,
vmsPow
double*
for
vdPow
,
vmdPow
MKL_Complex8*
for
vcPow
,
vmcPow
MKL_Complex16*
for
vzPow
,
vmzPow
Pointer to an array that contains the output vector
y
.
Description
The
v?Pow
function computes
a
to the power
b
for elements of two vectors.
The real function
v(s/d)Pow
has certain limitations on the input range of
a
and
b
parameters. Specifically, if
a
[i]
is positive, then
b
[i]
may be arbitrary. For negative
a
[i]
, the value of
b
[i]
must be an integer (either positive or negative).
The complex function
v(c/z)Pow
has no input range limitations.
Special values for Real Function
v?Pow(x,y)
Argument 1
(X)
Argument 2
(Y)
Result
VM Error Status
Exception
+0
neg. odd integer
+
VML_STATUS_ERRDOM
ZERODIVIDE
-0
neg. odd integer
-
VML_STATUS_ERRDOM
ZERODIVIDE
+0
neg. even integer
+
VML_STATUS_ERRDOM
ZERODIVIDE
-0
neg. even integer
+
VML_STATUS_ERRDOM
ZERODIVIDE
+0
neg. non-integer
+
VML_STATUS_ERRDOM
ZERODIVIDE
-0
neg. non-integer
+
VML_STATUS_ERRDOM
ZERODIVIDE
-0
pos. odd integer
+0
 
 
-0
pos. odd integer
-0
 
 
+0
pos. even integer
+0
 
 
-0
pos. even integer
+0
 
 
+0
pos. non-integer
+0
 
 
-0
pos. non-integer
+0
 
 
-1
+
+1
 
 
-1
-
+1
 
 
+1
any value
+1
 
 
+1
+0
+1
 
 
+1
-0
+1
 
 
+1
+
+1
 
 
+1
-
+1
 
 
+1
QNAN
+1
 
 
any value
+0
+1
 
 
+0
+0
+1
 
 
-0
+0
+1
 
 
+
+0
+1
 
 
-
+0
+1
 
 
QNAN
+0
+1
 
 
any value
-0
+1
 
 
+0
-0
+1
 
 
-0
-0
+1
 
 
+
-0
+1
 
 
-
-0
+1
 
 
QNAN
-0
+1
 
 
X < +0
non-integer
QNAN
VML_STATUS_ERRDOM
INVALID
|X| < 1
-
+
 
 
+0
-
+
VML_STATUS_ERRDOM
ZERODIVIDE
-0
-
+
VML_STATUS_ERRDOM
ZERODIVIDE
|X| > 1
-
+0
 
 
+
-
+0
 
 
-
-
+0
 
 
|X| < 1
+
+0
 
 
+0
+
+0
 
 
-0
+
+0
 
 
|X| > 1
+
+
 
 
+
+
+
 
 
-
+
+
 
 
-
neg. odd integer
-0
 
 
-
neg. even integer
+0
 
 
-
neg. non-integer
+0
 
 
-
pos. odd integer
-
 
 
-
pos. even integer
+
 
 
-
pos. non-integer
+
 
 
+
X < +0
+0
 
 
+
X > +0
+
 
 
Big finite value*
Big finite value*
+/-
VML_STATUS_OVERFLOW
OVERFLOW
QNAN
QNAN
QNAN
 
 
QNAN
SNAN
QNAN
 
INVALID
SNAN
QNAN
QNAN
 
INVALID
SNAN
SNAN
QNAN
 
INVALID
The complex double precision versions of this function,
vzPow
and
vmzPow
, are implemented in the EP accuracy mode only. If used in HA or LA mode,
vzPow
and
vmzPow
set the VM Error Status to
VML_STATUS_ACCURACYWARNING
(see the Values of the VM Status table).
* Overflow in a real function is supported only in the HA/LA accuracy modes. The overflow occurs when x and y are finite numbers, but the result is too large to fit the target precision. In this case, the function:
  1. Returns
    in the result.
  2. Raises the
    OVERFLOW
    exception.
  3. Sets the VM Error Status to
    VML_STATUS_OVERFLOW
    .
Overflow in a complex function occurs (supported in the
HA
/
LA
accuracy modes only) when all
RE(x)
,
RE(y)
,
IM(x)
,
IM(y)
arguments are finite numbers, but the real or imaginary part of the computed result is so large that it does not fit the target precision. In this case, the function returns
in that part of the result, raises the
OVERFLOW
exception, and sets the VM Error Status to
VML_STATUS_OVERFLOW
(overriding any possible
VML_STATUS_ACCURACYWARNING
status).

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804