# `cos`, `acos`

_Cosine, arccosine_
```syntax
cos x     cos[x]
acos x    acos[x]
```

Where `x` is a numeric, returns

`cos`

: the [cosine](https://en.wikipedia.org/wiki/Trigonometric_functions#cosine)
of `x`, taken to be in radians. The result is between `-1` and `1`, or null if the argument is null or infinity.

`acos`

: the [arccosine](https://en.wikipedia.org/wiki/Inverse_trigonometric_functions#Basic_properties) of `x`; that is, the value whose cosine is `x`. The result is in radians and lies between 0 and π. (The range is approximate due to rounding errors).
Null is returned if the argument is not between -1 and 1.
```q
q)cos 0.2                       / cosine
0.9800666
q)min cos 10000?3.14159265
-1f
q)max cos 10000?3.14159265
1f

q)acos -0.4                     / arccosine
1.982313
```

`cos` and `acos` are [multithreaded primitives](../kb/mt-primitives.md).

## Domain and range
```txt
domain: b g x h i j e f c s p m d z n u v t
range:  f . f f f f f f f . f f f z f f f f
```

## Implicit iteration

`cos` and `acos` are [atomic functions](../basics/atomic.md).
```q
q)cos (.2;.3 .4)
0.9800666
0.9553365 0.921061

q)acos (.2;.3 .4)
1.369438
1.266104 1.159279
```

----

[`sin`, `asin`](sin.md)  

[Mathematics](../basics/math.md)
