ctanh(3)
πΈ ctanh β complex hyperbolic tangent π
okay bestie, welcome to the ctanh(3) page from the Library Functions Manual β yes we're in the library functions section, section 3, math girlie territory β¨
π NAME
ctanh, ctanhf, ctanhl β complex hyperbolic tangent. that's it, that's the trio π«Ά
π LIBRARY
Math library β link it with libm, a.k.a. the -lm flag. no -lm, no love. π
β¨ SYNOPSIS
#include <complex.h>
double complex ctanh(double complex z);
float complex ctanhf(float complex z);
long double complex ctanhl(long double complex z);
three flavors: the regular double one, the float one (ctanhf), and the big ol' long double one (ctanhl). pick your precision, pick your destiny π
π¦ DESCRIPTION
so these functions literally calculate the complex hyperbolic tangent of z. that's the whole job. main character energy fr fr π
the complex hyperbolic tangent function is defined mathematically as:
ctanh(z) = csinh(z) / ccosh(z)
like, hyperbolic sine over hyperbolic cosine, but make it complex. iconic division behavior, no cap. π
π«Ά ATTRIBUTES
for the whole explanation of what these terms even mean, go peek at attributes(7) β it's giving reference material. β¨
ctanh(),ctanhf(),ctanhl()β Thread safety: MT-Safe π
so yeah, they're thread-safe. go wild, bestie, spawn all the threads you want π
π STANDARDS
C11, POSIX.1-2008. certified, standardized, slay. β
π HISTORY
glibc 2.1. and before that? C99, POSIX.1-2001. so she's been around, she's got history, she's a legacy icon lowkey π°οΈ
π SEE ALSO
go read the whole complex family, they're all doing their lil hyperbolic thing together π§
not me writing an entire essay about hyperbolic tangent bestieβ¦ but the math ate, periodt. π
and that's the page!! brought to you by Linux man-pages 6.20, dated 2026-02-08, filed under ctanh(3) πΈ go forth and compute responsibly, you gorgeous nerd πππ¦
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: GPL-1.0-or-later
- Copyright 2002, Walter Harms <walter.harms@informatik.uni-oldenburg.de>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms