---
name: "atanpi"
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/atanpi"
---

# atanpi(3)

half-cycle arc tangent functions

## NAME

**atanpi**, **atanpif**, **atanpil** – half-cycle arc tangent functions

## LIBRARY

Math Library (libm, -lm)

## SYNOPSIS

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

*double*\

**atanpi**(*double x*);

*float*\

**atanpif**(*float x*);

*long* *double*\

**atanpil**(*long double x*);

## DESCRIPTION

The **atanpi**(), **atanpif**(), and **atanpil**() functions compute the principal value of the arc tangent of *x*, divided by , thus measuring the angle in half-cycles.

## RETURN VALUES

The **atanpi**(), **atanpif**(), and **atanpil**()\
  functions return values in the range \[-1/2, +1/2\].

## SEE ALSO

[acospi(3)](/acospi/3.md), [asinpi(3)](/asinpi/3.md), [atan(3)](/atan/3.md), [tanpi(3)](/tanpi/3.md),

## STANDARDS

The **atanpi**(), **atanpif**(), and **atanpil**() functions conform to ISO/IEC 9899:2024 (“ISO C23”).
