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. For a ball of radius below 2−102^{-10} the radius is propagated with the derivative sech⁡2x≤2(1−∣tanh⁡x∣)(1+4r)\operatorname{sech}^2 x \le 2 (1 - |\tanh x|)(1 + 4r), and a wider ball is enclosed sharply by the values at its endpoints (tanh⁡\tanh being increasing). The hyperbolic cotangent is computed as (e2x+1)/(e2x−1)(e^{2x} + 1)/(e^{2x} - 1) via arb_expm1 for small ∣x∣|x| and as 1+2e−2∣x∣/(1−e−2∣x∣)1 + 2e^{-2|x|}/(1 - e^{-2|x|}) for large ∣x∣|x|.

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-20).