1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright (C) 2011 Michael Kerrisk <mtk.manpages@gamil.com>
4 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
5 .\" Distributed under GPL
8 .TH CATANH 3 2015-03-02 "" "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 );
24 function calculates the complex arc hyperbolic tangent of
26 If \fIy\ =\ catanh(z)\fP, then \fIz\ =\ ctanh(y)\fP.
29 is chosen in the interval [\-pi/2,pi/2].
34 catanh(z) = 0.5 * (clog(1 + z) \- clog(1 \- z))
37 These functions first appeared in glibc in version 2.1.
39 For an explanation of the terms used in this section, see
45 Interface Attribute Value
50 T} Thread safety MT-Safe
56 /* Link with "\-lm" */
64 main(int argc, char *argv[])
66 double complex z, c, f;
69 fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]);
73 z = atof(argv[1]) + atof(argv[2]) * I;
76 printf("catanh() = %6.3f %6.3f*i\\n", creal(c), cimag(c));
78 f = 0.5 * (clog(1 + z) \- clog(1 \- z));
79 printf("formula = %6.3f %6.3f*i\\n", creal(f2), cimag(f2));