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 at‐
31       tributes(7).
32
33       ┌────────────────────────────────────────────┬───────────────┬─────────┐
34Interface                                   Attribute     Value   
35       ├────────────────────────────────────────────┼───────────────┼─────────┤
36catanh(), catanhf(), catanhl()              │ Thread safety │ MT-Safe │
37       └────────────────────────────────────────────┴───────────────┴─────────┘
38

CONFORMING TO

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

EXAMPLES

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

SEE ALSO

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

COLOPHON

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