Raises each element in an array to the power of the corresponding element in a second array of double-precision values.
SDKs
- iOS 5.0+
- macOS 10.4+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Accelerate
Declaration
void vvpow(double *, const double *, const double *, const int *);
Parameters
parameter 1
The output array, z.
parameter 2
The exponent input array, y.
parameter 3
The base input array, x.
parameter 4
The number of elements in the arrays.
Discussion
The following code shows an example of using vvpow
:
double x[] = {3, 2, 10, 6};
double y[] = {2, 4, 3, 2};
double z[4];
int n = 4;
vvpow(z, y, x, &n);
NSLog(@"z: [%lf, %lf, %lf, %lf]", z[0], z[1], z[2], z[3]);
The following special values of x
and y
produce the given value of z
:
x (base) | y (exponent) | z (result) |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|