---
name: "tanhl"
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://carta.tech/man/tanh"
---

# tanhl(3)

hyperbolic tangent functions

Part of [tanh(3)](/man/tanh/3.md).

## NAME

**tanh**, **tanhf**, **tanhl** – hyperbolic tangent functions

## LIBRARY

Math Library (libm, -lm)

## SYNOPSIS

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

*double*\

**tanh**(*double x*);

*float*\

**tanhf**(*float x*);

*long* *double*\

**tanhl**(*long double x*);

## DESCRIPTION

The **tanh**(), **tanhf**(), and **tanhl**() functions compute the hyperbolic tangent of *x*. For a discussion of error due to roundoff, see [math(3)](/man/math/3.md).

## RETURN VALUES

The **tanh**(), **tanhf**(), and the **tanhl**() functions return the hyperbolic tangent value.

## SEE ALSO

[acos(3)](/man/acos/3.md), [asin(3)](/man/asin/3.md), [atan(3)](/man/atan/3.md), [atan2(3)](/man/atan2/3.md), [cos(3)](/man/cos/3.md), [cosh(3)](/man/cosh/3.md), [ctanh(3)](/man/ctanh/3.md), [math(3)](/man/math/3.md), [sin(3)](/man/sin/3.md), [sinh(3)](/man/sinh/3.md), [tan(3)](/man/tan/3.md)

## STANDARDS

The **tanh**() function conforms to ISO/IEC 9899:1990 (“ISO C90”).

## HISTORY

The **tanh**() function first appeared in Version 7 AT&T UNIX.
