---
title: cos()
framework: coreml
role: symbol
role_heading: Instance Method
path: coreml/mltensor/cos()
---

# cos()

Computes the cosine of the tensor’s elements.

## Declaration

```swift
func cos() -> MLTensor
```

## See Also

### Applying trigonometric functions

- [cosh()](coreml/mltensor/cosh().md)
- [acos()](coreml/mltensor/acos().md)
- [acosh()](coreml/mltensor/acosh().md)
- [sin()](coreml/mltensor/sin().md)
- [sinh()](coreml/mltensor/sinh().md)
- [asin()](coreml/mltensor/asin().md)
- [asinh()](coreml/mltensor/asinh().md)
- [tan()](coreml/mltensor/tan().md)
- [tanh()](coreml/mltensor/tanh().md)
- [atan()](coreml/mltensor/atan().md)
- [atanh()](coreml/mltensor/atanh().md)
