Calculates the remainder after dividing each element in an array by the corresponding element in a second array of single-precision values.
SDKs
- iOS 5.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Accelerate
Declaration
func vvremainderf(_: Unsafe Mutable Pointer<Float>, _: Unsafe Pointer<Float>, _: Unsafe Pointer<Float>, _: Unsafe Pointer<Int32>)
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.
Discussion
The following code shows an example of using vvremainderf(_:
:
var x: [Float] = [7, 4, 3, 4]
var y: [Float] = [2, 5, 10, 30]
var z = [Float](repeating: 0, count: x.count)
var n = Int32(x.count)
vvremainderf(&z, &y, &x, &n)
print(z) // [2.0, 1.0, 1.0, -2.0]