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       These  functions calculate the complex arc hyperbolic tangent of z.  If
19       y = catanh(z), then z = ctanh(y).  The imaginary part of y is chosen in
20       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

ATTRIBUTES

30       For   an   explanation   of   the  terms  used  in  this  section,  see
31       attributes(7).
32
33       ┌───────────────────────────────┬───────────────┬─────────┐
34Interface                      Attribute     Value   
35       ├───────────────────────────────┼───────────────┼─────────┤
36catanh(), catanhf(), catanhl() │ Thread safety │ MT-Safe │
37       └───────────────────────────────┴───────────────┴─────────┘

CONFORMING TO

39       C99, POSIX.1-2001, POSIX.1-2008.
40

EXAMPLE

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

SEE ALSO

71       atanh(3), cabs(3), cimag(3), ctanh(3), complex(7)
72

COLOPHON

74       This page is part of release 4.15 of the Linux  man-pages  project.   A
75       description  of  the project, information about reporting bugs, and the
76       latest    version    of    this    page,    can     be     found     at
77       https://www.kernel.org/doc/man-pages/.
78
79
80
81                                  2015-04-19                         CATANH(3)
Impressum