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

# acospi(3)

half-cycle arc cosine functions

## NAME

**acospi**, **acospif**, **acospil** – half-cycle arc cosine functions

## LIBRARY

Math Library (libm, -lm)

## SYNOPSIS

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

*double*\

**acospi**(*double x*);

*float*\

**acospif**(*float x*);

*long* *double*\

**acospil**(*long double x*);

## DESCRIPTION

The **acospi**(), **acospif**(), and **acospil**() functions compute the principal value of the arc cosine of *x*, divided by , thus measuring the angle in half-cycles.

## RETURN VALUES

The **acospi**(), **acospif**(), and **acospil**() functions return values in the range \[-1, +1\]. If \|*x*\| \> 1, **acospi**(*x*) raise an invalid exception and returns an .

## SEE ALSO

[acos(3)](/acos/3.md), [asinpi(3)](/asinpi/3.md), [atanpi(3)](/atanpi/3.md), [cospi(3)](/cospi/3.md)

## STANDARDS

The **acospi**(), **acospif**(), and **acospil**() functions conform to ISO/IEC 9899:2024 (“ISO C23”).
