# Powx

Raises each element of a vector to the constant power.

## Syntax

Fortran:

call vspowx( n, a, b, y )

call vdpowx( n, a, b, y )

call vcpowx( n, a, b, y )

call vzpowx( n, a, b, y )

C:

vsPowx( n, a, b, y );

vdPowx( n, a, b, y );

vcPowx( n, a, b, y );

vzPowx( n, a, b, y );

## Input Parameters

Name | Type | Description
--- | --- | ---
n | FORTRAN: INTEGER, INTENT(IN) C: int | Number of elements to be calculated.
a | FORTRAN: REAL, INTENT(IN) for vspowx DOUBLE PRECISION, INTENT(IN) for vdpowx COMPLEX, INTENT(IN) for vcpowx DOUBLE COMPLEX, INTENT(IN) for vzpowx C: const float* for vsPowx const double* for vdPowx const MKL_Complex8* for vcPowx const MKL_Complex16* for vzPowx | FORTRAN: Array a that specifies the input vector C: Pointer to an array that contains the input vector a.
b | FORTRAN: REAL, INTENT(IN) for vspowx DOUBLE PRECISION, INTENT(IN) for vdpowx COMPLEX, INTENT(IN) for vcpowx DOUBLE COMPLEX, INTENT(IN) for vzpowx C: const float for vsPowx const double for vdPowx const MKL_Complex8* for vcPowx const MKL_Complex16* for vzPowx | FORTRAN: Scalar value b that is the constant power. C: Constant value for power b.

Precision Overflow Thresholds for Powx Real Function
Data Type | Threshold Limitations on Input Parameters
--- | ---
single precision | `abs(a[i]) < ( FLT_MAX )1/b`
double precision | `abs(a[i]) < ( DBL_MAX )1/b`

### Note

Overflow can occur also in Powx complex function, but the exact formula is beyond the scope of this document.

## Output Parameters

Name | Type | Description
--- | --- | ---
y | FORTRAN: REAL for vspowx DOUBLE PRECISION for vdpowx COMPLEX for vcpowx DOUBLE COMPLEX for vzpowx C: float* for vsPowx double* for vdPowx MKL_Complex8* for vcPowx MKL_Complex16* for vzPowx | FORTRAN: Array, specifies the output vector y. C: Pointer to an array that contains the output vector y.

## Description

The real function Powx has certain limitations on the input range of a and b parameters. Specifically, if a[i] is positive, then b may be arbitrary. For negative a[i], the value of b must be integer (either positive or negative).

The complex function Powx has no such input range limitations.

Parent topic: Power and Root Functions