1catanh(3)                  Library Functions Manual                  catanh(3)
2
3
4

NAME

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

LIBRARY

9       Math library (libm, -lm)
10

SYNOPSIS

12       #include <complex.h>
13
14       double complex catanh(double complex z);
15       float complex catanhf(float complex z);
16       long double complex catanhl(long double complex z);
17

DESCRIPTION

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

ATTRIBUTES

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

STANDARDS

38       C11, POSIX.1-2008.
39

HISTORY

41       glibc 2.1.  C99, POSIX.1-2001.
42

EXAMPLES

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

SEE ALSO

73       atanh(3), cabs(3), cimag(3), ctanh(3), complex(7)
74
75
76
77Linux man-pages 6.05              2023-07-20                         catanh(3)
Impressum