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

# vvcosisinf(_:_:_:)

Calculates the cosine and sine of each element in an array of single-precision values.

```
func vvcosisinf(_: OpaquePointer, _: UnsafePointer<Float>, _: UnsafePointer<Int32>)
```

## Discussion

### Parameters:

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

This function calculates the complex number on the unit circle corresponding to the angle given by each element of a vector.

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

```objc
#include <complex.h>
 
float x[] = {-M_PI_2, 0, M_PI_2};
complex float y[3];
int n = 3;
  
vvcosisinf(y, x, &n);
```

On return, for each array element in `y`, `real` is the cosine of `x` and `imag` is the sine of x.

---

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)