A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

Functions
cos
ArrayFire Functions | ArrayFire Functions by Category » Mathematical functions » Trigonometric functions

## Functions
array | cos (const array &in)
| C++ Interface to evaluate the cosine function.
af_err | af_cos (af_array *out, const af_array in)
| C Interface to evaluate the cosine function.

## Detailed Description

Evaluate the cosine function.

## Function Documentation

## ◆ af_cos()

af_err af_cos | ( | af_array * | out,
|  | const af_array | in )

C Interface to evaluate the cosine function.

Parameters

  [out] | out | cosine
  [in] | in | input array

Returns
  AF_SUCCESS, if function returns successfully, else an af_err code is given

## ◆ cos()

array cos | ( | const array & | in | ) |

C++ Interface to evaluate the cosine function.

Parameters

  [in] | in | input array

Returns
  cosine