FLINT3.7.0-dev

arb_tanh, arb_coth

Synopsis#include <flint/arb.h>
void arb_tanh(arb_t y, const arb_t x, slong prec)source
void arb_coth(arb_t y, const arb_t x, slong prec)source

Set y to tanh⁡x\tanh x, respectively coth⁡x\coth x, computed as (e2x−1)/(e2x+1)(e^{2x} - 1)/(e^{2x} + 1) via arb_expm1 for small ∣x∣|x| and as ±(1−2e∓2x/(1+e∓2x))\pm(1 - 2e^{\mp 2x}/(1 + e^{\mp 2x})) for large ∣x∣|x| (and the reciprocals).

Cite this page

The FLINT team, “arb_tanh, arb_coth (arb.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arb/arb_tanh.html (generated 2026-11-02).