]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
cd2c21a0 | 2 | .\" and Copyright (C) 2011 Michael Kerrisk <mtk.manpages@gmail.com> |
2297bf0e | 3 | .\" |
38f20bb9 | 4 | .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) |
fea681da | 5 | .\" Distributed under GPL |
38f20bb9 | 6 | .\" %%%LICENSE_END |
fea681da | 7 | .\" |
c73595c2 | 8 | .TH CATANH 3 2015-04-19 "" "Linux Programmer's Manual" |
fea681da MK |
9 | .SH NAME |
10 | catanh, catanhf, catanhl \- complex arc tangents hyperbolic | |
11 | .SH SYNOPSIS | |
12 | .B #include <complex.h> | |
68e4db0a | 13 | .PP |
c13182ef | 14 | .BI "double complex catanh(double complex " z ); |
d39541ec | 15 | .br |
fea681da | 16 | .BI "float complex catanhf(float complex " z ); |
d39541ec | 17 | .br |
fea681da | 18 | .BI "long double complex catanhl(long double complex " z ); |
68e4db0a | 19 | .PP |
20c58d70 | 20 | Link with \fI\-lm\fP. |
fea681da | 21 | .SH DESCRIPTION |
5600f73a | 22 | These functions calculate the complex arc hyperbolic tangent of |
daac0b39 MK |
23 | .IR z . |
24 | If \fIy\ =\ catanh(z)\fP, then \fIz\ =\ ctanh(y)\fP. | |
25 | The imaginary part of | |
26 | .I y | |
27 | is chosen in the interval [\-pi/2,pi/2]. | |
dd3568a1 | 28 | .PP |
daac0b39 | 29 | One has: |
207050fa | 30 | .PP |
daac0b39 | 31 | .nf |
4c3fa19d | 32 | catanh(z) = 0.5 * (clog(1 + z) \- clog(1 \- z)) |
daac0b39 | 33 | .fi |
f0d7ce1d MK |
34 | .SH VERSIONS |
35 | These functions first appeared in glibc in version 2.1. | |
0b3cafe3 MS |
36 | .SH ATTRIBUTES |
37 | For an explanation of the terms used in this section, see | |
38 | .BR attributes (7). | |
39 | .TS | |
40 | allbox; | |
41 | lbw30 lb lb | |
42 | l l l. | |
43 | Interface Attribute Value | |
44 | T{ | |
45 | .BR catanh (), | |
46 | .BR catanhf (), | |
47 | .BR catanhl () | |
48 | T} Thread safety MT-Safe | |
49 | .TE | |
47297adb | 50 | .SH CONFORMING TO |
9a74e018 | 51 | C99, POSIX.1-2001, POSIX.1-2008. |
849ef4a8 | 52 | .SH EXAMPLE |
207050fa | 53 | .EX |
849ef4a8 MK |
54 | /* Link with "\-lm" */ |
55 | ||
56 | #include <complex.h> | |
57 | #include <stdlib.h> | |
58 | #include <unistd.h> | |
59 | #include <stdio.h> | |
60 | ||
61 | int | |
62 | main(int argc, char *argv[]) | |
63 | { | |
64 | double complex z, c, f; | |
65 | ||
66 | if (argc != 3) { | |
67 | fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]); | |
68 | exit(EXIT_FAILURE); | |
69 | } | |
70 | ||
71 | z = atof(argv[1]) + atof(argv[2]) * I; | |
72 | ||
73 | c = catanh(z); | |
74 | printf("catanh() = %6.3f %6.3f*i\\n", creal(c), cimag(c)); | |
75 | ||
76 | f = 0.5 * (clog(1 + z) \- clog(1 \- z)); | |
77 | printf("formula = %6.3f %6.3f*i\\n", creal(f2), cimag(f2)); | |
78 | ||
79 | exit(EXIT_SUCCESS); | |
80 | } | |
207050fa | 81 | .EE |
47297adb | 82 | .SH SEE ALSO |
fea681da MK |
83 | .BR atanh (3), |
84 | .BR cabs (3), | |
85 | .BR cimag (3), | |
5be56312 | 86 | .BR ctanh (3), |
a8bda636 | 87 | .BR complex (7) |