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

# vvremainder(_:_:_:_:)

Calculates the remainder after dividing each element in an array by the corresponding element in a second array of double-precision values.

```
func vvremainder(_: 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 [`vvremainder(_:_:_:_:)`](/documentation/Accelerate/vvremainder(_:_:_:_:)):

```swift
var x: [Double] = [7, 4, 3, 4]
var y: [Double] = [2, 5, 10, 30]
var z = [Double](repeating: 0, count: x.count)
var n = Int32(x.count)
 
vvremainder(&z, &y, &x, &n)
 
print(z) // [2.0, 1.0, 1.0, -2.0]
```

---

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)