1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright (C) 2011 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
5 .\" Distributed under GPL
8 .TH CATANH 3 2015-04-19 "" "Linux Programmer's Manual"
10 catanh, catanhf, catanhl \- complex arc tangents hyperbolic
12 .B #include <complex.h>
14 .BI "double complex catanh(double complex " z );
16 .BI "float complex catanhf(float complex " z );
18 .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].
32 catanh(z) = 0.5 * (clog(1 + z) \- clog(1 \- z))
35 These functions first appeared in glibc in version 2.1.
37 For an explanation of the terms used in this section, see
43 Interface Attribute Value
48 T} Thread safety MT-Safe
51 C99, POSIX.1-2001, POSIX.1-2008.
54 /* Link with "\-lm" */
62 main(int argc, char *argv[])
64 double complex z, c, f;
67 fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
71 z = atof(argv[1]) + atof(argv[2]) * I;
74 printf("catanh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
76 f = 0.5 * (clog(1 + z) \- clog(1 \- z));
77 printf("formula = %6.3f %6.3f*i\en", creal(f2), cimag(f2));