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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms