tanpi(3)

tanpi3

Half–cycle tangent functions

Usage

#include <math.h>

double

tanpi(double x);

float

tanpif(float x);

long double

tanpil(long double x);

Library

Math Library (libm, -lm)

Overview

The tanpi(), tanpif(), and tanpil() functions compute the tangent of π × x and measure angles in half-cycles.

Return values

The tanpi(), tanpif(), and tanpil() functions returns tan(π × x). If x 2^(p - 1) where p is the floating–point precision of x, then the returned value is 0 and it has no significance.

Special values

tanpi(0)

returns 0.

tanpi(n)

returns 0 for positive integers n.

tanpi(n/2)

returns for n > 0 and raises an FE_INVALID exception.

tanpi(∞)

return an and raises an FE_INVALID exception.

tanpi()

return an and raises an FE_INVALID exception.

Releases

14 releases since FreeBSD 13.1-RELEASE; the text changed 5 times.

  1. 13.1
  2. 13.2
  3. 13.3–14.5
  4. 15.0
  5. 15.1
  6. 16.0

Authors

The half–cycle trignometric functions were written by Steven G. Kargl ⟨[email protected]⟩.

Standards

These functions conform to IEEE Std 754-2008, to ISO/IEC TS 18661-4, "Information technology — Programming languages, their environments, and system software interfaces — Floating–point extensions for C" — Part 4: Supplementary functions, and to ISO/IEC 9899:2024 (“ISO C23”).

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.