1CATANH(3)                  Linux Programmer's Manual                 CATANH(3)
2
3
4

NAME

6       catanh, catanhf, catanhl - complex arc tangents hyperbolic
7

SYNOPSIS

9       #include <complex.h>
10
11       double complex catanh(double complex z);
12       float complex catanhf(float complex z);
13       long double complex catanhl(long double complex z);
14
15       Link with -lm.
16

DESCRIPTION

18       The  catanh() function calculates the complex arc hyperbolic tangent of
19       z.  If y = catanh(z), then z = ctanh(y).  The imaginary part  of  y  is
20       chosen in the interval [-pi/2,pi/2].
21
22       One has:
23
24           catanh(z) = 0.5 * (clog(1 + z) - clog(1 - z))
25

VERSIONS

27       These functions first appeared in glibc in version 2.1.
28

CONFORMING TO

30       C99.
31

EXAMPLE

33       /* Link with "-lm" */
34
35       #include <complex.h>
36       #include <stdlib.h>
37       #include <unistd.h>
38       #include <stdio.h>
39
40       int
41       main(int argc, char *argv[])
42       {
43           double complex z, c, f;
44
45           if (argc != 3) {
46               fprintf(stderr, "Usage: %s <real> <imag>\n", argv[0]);
47               exit(EXIT_FAILURE);
48           }
49
50           z = atof(argv[1]) + atof(argv[2]) * I;
51
52           c = catanh(z);
53           printf("catanh() = %6.3f %6.3f*i\n", creal(c), cimag(c));
54
55           f = 0.5 * (clog(1 + z) - clog(1 - z));
56           printf("formula  = %6.3f %6.3f*i\n", creal(f2), cimag(f2));
57
58           exit(EXIT_SUCCESS);
59       }
60

SEE ALSO

62       atanh(3), cabs(3), cimag(3), ctanh(3), complex(7)
63

COLOPHON

65       This  page  is  part of release 3.53 of the Linux man-pages project.  A
66       description of the project, and information about reporting  bugs,  can
67       be found at http://www.kernel.org/doc/man-pages/.
68
69
70
71                                  2011-09-15                         CATANH(3)
Impressum