---
name: "acos"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/acos"
---

# acos(3)

arc cosine functions

## NAME

**acos**, **acosf**, **acosl** – arc cosine functions

## LIBRARY

Math Library (libm, -lm)

## SYNOPSIS

**#include \<math.h\>**

*double*\

**acos**(*double x*);

*float*\

**acosf**(*float x*);

*long* *double*\

**acosl**(*long double x*);

## DESCRIPTION

The **acos**(), **acosf**(), and **acosl**() functions compute the principal value of the arc cosine of *x*.

## RETURN VALUES

These functions return the arc cosine in the range \[0\], radians. If:

```
|x| > 1,
```

**acos**(*x*) raises an invalid exception and returns an .

## SEE ALSO

[asin(3)](/asin/3.md), [atan(3)](/atan/3.md), [atan2(3)](/atan2/3.md), [cos(3)](/cos/3.md), [cosh(3)](/cosh/3.md), [fenv(3)](/fenv/3.md), [math(3)](/math/3.md), [sin(3)](/sin/3.md), [sinh(3)](/sinh/3.md), [tan(3)](/tan/3.md), [tanh(3)](/tanh/3.md)

## STANDARDS

The **acos**(), **acosf**(), and **acosl**() functions conform to ISO/IEC 9899:1999 (“ISO C99”).
