<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vvpow(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vvpow"
  },
  "title" : "vvpow(_:_:_:_:)"
}
-->

# vvpow(_:_:_:_:)

Raises each element in an array to the power of the corresponding element in a second array of double-precision values.

```
func vvpow(_: UnsafeMutablePointer<Double>, _: UnsafePointer<Double>, _: UnsafePointer<Double>, _: UnsafePointer<Int32>)
```

## Discussion

### 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.

The following code shows an example of using [`vvpow(_:_:_:_:)`](/documentation/Accelerate/vvpow(_:_:_:_:)):

```swift
var x: [Double] = [3, 2, 10, 6]
var y: [Double] = [2, 4, 3, 2]
var z = [Double](repeating: 0, count: x.count)
var n = Int32(x.count)
 
vvpow(&z, &y, &x, &n)
 
print(z) // [9.0, 16.0, 1000.0, 36.0]
```

The following special values of `x` and `y` produce the given value of `z`:

|x (base)         |y (exponent)|z (result)|
|-----------------|------------|----------|
|`odd integer, <0`|`+/-0`      |`+/-inf`  |
|`odd integer, >0`|`+/-0`      |`+/-0`    |
|`otherwise, <0`  |`+/-0`      |`+inf`    |
|`otherwise, >0`  |`+/-0`      |`+0`      |
|`+/-inf`         |`-1`        |`1`       |
|`NaN`            |`+1`        |`1`       |
|`+/-0`           |`NaN`       |`1`       |
|`-inf`           |`|x|<1`     |`+inf`    |
|`-inf`           |`|x|>1`     |`+0`      |
|`+inf`           |`|x|<1`     |`+0`      |
|`+inf`           |`|x|>1`     |`+inf`    |
|`odd integer, <0`|`-inf`      |`-0`      |
|`odd integer, >0`|`-inf`      |`-inf`    |
|`otherwise, <0`  |`-inf`      |`+0`      |
|`otherwise, >0`  |`-inf`      |`+inf`    |
|`<0`             |`+inf`      |`+0`      |
|`>0`             |`+inf`      |`+inf`    |
|`non-integer`    |`<0`        |`NaN`     |

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)