2 .\" Copyright 2002 Walter Harms(walter.harms@informatik.uni-oldenburg.de)
3 .\" and Copyright (C) 2011 Michael Kerrisk <mtk.manpages@gmail.com>
5 .\" SPDX-License-Identifier: GPL-1.0-or-later
7 .TH cacosh 3 (date) "Linux man-pages (unreleased)"
9 cacosh, cacoshf, cacoshl \- complex arc hyperbolic cosine
12 .RI ( libm ", " \-lm )
15 .B #include <complex.h>
17 .BI "double complex cacosh(double complex " z );
18 .BI "float complex cacoshf(float complex " z );
19 .BI "long double complex cacoshl(long double complex " z );
22 These functions calculate the complex arc hyperbolic cosine of
24 If \fIy\ =\ cacosh(z)\fP, then \fIz\ =\ ccosh(y)\fP.
27 is chosen in the interval [\-pi,pi].
30 is chosen nonnegative.
35 cacosh(z) = 2 * clog(csqrt((z + 1) / 2) + csqrt((z \- 1) / 2))
38 For an explanation of the terms used in this section, see
44 Interface Attribute Value
51 T} Thread safety MT-Safe
59 .\" SRC BEGIN (cacosh.c)
61 /* Link with "\-lm" */
69 main(int argc, char *argv[])
71 double complex z, c, f;
74 fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
78 z = atof(argv[1]) + atof(argv[2]) * I;
81 printf("cacosh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
83 f = 2 * clog(csqrt((z + 1)/2) + csqrt((z \- 1)/2));
84 printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f));