2 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" and Copyright (C) 2011 Michael Kerrisk <mtk.manpages@gmail.com>
5 .\" SPDX-License-Identifier: GPL-1.0-or-later
7 .TH catanh 3 (date) "Linux man-pages (unreleased)"
9 catanh, catanhf, catanhl \- complex arc tangents hyperbolic
12 .RI ( libm ", " \-lm )
15 .B #include <complex.h>
17 .BI "double complex catanh(double complex " z );
18 .BI "float complex catanhf(float complex " z );
19 .BI "long double complex catanhl(long double complex " z );
22 These functions calculate the complex arc hyperbolic tangent of
24 If \fIy\~=\~catanh(z)\fP, then \fIz\~=\~ctanh(y)\fP.
27 is chosen in the interval [\-pi/2,pi/2].
33 catanh(z) = 0.5 * (clog(1 + z) \- clog(1 \- z))
37 For an explanation of the terms used in this section, see
43 Interface Attribute Value
50 T} Thread safety MT-Safe
58 .\" SRC BEGIN (catanh.c)
60 /* Link with "\-lm" */
68 main(int argc, char *argv[])
70 double complex z, c, f;
73 fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
77 z = atof(argv[1]) + atof(argv[2]) * I;
80 printf("catanh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
82 f = 0.5 * (clog(1 + z) \- clog(1 \- z));
83 printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f));