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