1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright (C) 2011 Michael Kerrisk <mtk.manpages@gamil.com>
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
7 .TH CATANH 3 2011-09-15 "" "Linux Programmer's Manual"
9 catanh, catanhf, catanhl \- complex arc tangents hyperbolic
11 .B #include <complex.h>
13 .BI "double complex catanh(double complex " z );
15 .BI "float complex catanhf(float complex " z );
17 .BI "long double complex catanhl(long double complex " z );
23 function calculates the complex arc hyperbolic tangent of
25 If \fIy\ =\ catanh(z)\fP, then \fIz\ =\ ctanh(y)\fP.
28 is chosen in the interval [\-pi/2,pi/2].
33 catanh(z) = 0.5 * (clog(1 + z) \- clog(1 \- z))
36 These functions first appeared in glibc in version 2.1.
41 /* Link with "\-lm" */
49 main(int argc, char *argv[])
51 double complex z, c, f;
54 fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]);
58 z = atof(argv[1]) + atof(argv[2]) * I;
61 printf("catanh() = %6.3f %6.3f*i\\n", creal(c), cimag(c));
63 f = 0.5 * (clog(1 + z) \- clog(1 \- z));
64 printf("formula = %6.3f %6.3f*i\\n", creal(f2), cimag(f2));