1 .\" Copyright 2002 Walter Harms(walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright (C) 2011 Michael Kerrisk <mtk.manpages@gamil.com>
4 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
5 .\" Distributed under GPL
8 .TH CACOSH 3 2011-09-15 "" "Linux Programmer's Manual"
10 cacosh, cacoshf, cacoshl \- complex arc hyperbolic cosine
12 .B #include <complex.h>
14 .BI "double complex cacosh(double complex " z );
16 .BI "float complex cacoshf(float complex " z );
18 .BI "long double complex cacoshl(long double complex " z );
24 function calculates the complex arc hyperbolic cosine of
26 If \fIy\ =\ cacosh(z)\fP, then \fIz\ =\ ccosh(y)\fP.
29 is chosen in the interval [\-pi,pi].
32 is chosen nonnegative.
37 cacosh(z) = 2 * clog(csqrt((z + 1) / 2) + csqrt((z \- 1) / 2))
40 These functions first appeared in glibc in version 2.1.
45 /* Link with "\-lm" */
53 main(int argc, char *argv[])
55 double complex z, c, f;
58 fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]);
62 z = atof(argv[1]) + atof(argv[2]) * I;
65 printf("cacosh() = %6.3f %6.3f*i\\n", creal(c), cimag(c));
67 f = 2 * clog(csqrt((z + 1)/2) + csqrt((z \- 1)/2));
68 printf("formula = %6.3f %6.3f*i\\n", creal(f2), cimag(f2));
80 This page is part of release 3.67 of the Linux
83 A description of the project,
84 information about reporting bugs,
85 and the latest version of this page,
87 \%http://www.kernel.org/doc/man\-pages/.