<!--
{
  "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/vvdiv(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vvdiv"
  },
  "title" : "vvdiv(_:_:_:_:)"
}
-->

# vvdiv(_:_:_:_:)

Divides each element in an array by the corresponding value in a second array of double-precision values.

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

## Discussion

### Parameters:

- parameter 1: The output array, *z*.
- parameter 2: The numerators input array, *y*.
- parameter 3: The denominators input array, *x*.
- parameter 4: The number of elements in the arrays.

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

```swift
var x: [Double] = [1, 2, 2, 4]
var y: [Double] = [1, 1, 10, 30]
var z = [Double](repeating: 0, count: x.count)
var n = Int32(x.count)
 
vvdiv(&z, &y, &x, &n)
 
print(z) // [1.0, 0.5, 5.0, 7.5]
```

---

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)