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 CACOS 3 2011-09-15 "" "Linux Programmer's Manual"
10 cacos, cacosf, cacosl \- complex arc cosine
12 .B #include <complex.h>
14 .BI "double complex cacos(double complex " z );
16 .BI "float complex cacosf(float complex " z );
18 .BI "long double complex cacosl(long double complex " z );
24 function calculates the complex arc cosine of
26 If \fIy\ =\ cacos(z)\fP, then \fIz\ =\ ccos(y)\fP.
29 is chosen in the interval [0,pi].
34 cacos(z) = \-i * clog(z + i * csqrt(1 \- z * z))
37 These functions first appeared in glibc in version 2.1.
42 /* Link with "\-lm" */
50 main(int argc, char *argv[])
52 double complex z, c, f;
56 fprintf(stderr, "Usage: %s <real> <imag>\\n", argv[0]);
60 z = atof(argv[1]) + atof(argv[2]) * I;
64 printf("cacos() = %6.3f %6.3f*i\\n", creal(c), cimag(c));
66 f = \-i * clog(z + i * csqrt(1 \- z * z));
68 printf("formula = %6.3f %6.3f*i\\n", creal(f), cimag(f));
78 This page is part of release 3.79 of the Linux
81 A description of the project,
82 information about reporting bugs,
83 and the latest version of this page,
85 \%http://www.kernel.org/doc/man\-pages/.