1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright (C) 2011 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: GPL-1.0-or-later
6 .TH CATANH 3 2021-03-22 "" "Linux Programmer's Manual"
8 catanh, catanhf, catanhl \- complex arc tangents hyperbolic
11 .RI ( libm ", " \-lm )
14 .B #include <complex.h>
16 .BI "double complex catanh(double complex " z );
17 .BI "float complex catanhf(float complex " z );
18 .BI "long double complex catanhl(long double complex " z );
21 These functions calculate the complex arc hyperbolic tangent of
23 If \fIy\ =\ catanh(z)\fP, then \fIz\ =\ ctanh(y)\fP.
26 is chosen in the interval [\-pi/2,pi/2].
31 catanh(z) = 0.5 * (clog(1 + z) \- clog(1 \- z))
34 These functions first appeared in glibc in version 2.1.
36 For an explanation of the terms used in this section, see
44 Interface Attribute Value
49 T} Thread safety MT-Safe
55 C99, POSIX.1-2001, POSIX.1-2008.
58 /* Link with "\-lm" */
66 main(int argc, char *argv[])
68 double complex z, c, f;
71 fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
75 z = atof(argv[1]) + atof(argv[2]) * I;
78 printf("catanh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
80 f = 0.5 * (clog(1 + z) \- clog(1 \- z));
81 printf("formula = %6.3f %6.3f*i\en", creal(f2), cimag(f2));