]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/carg.3
fanotify_init.2, fanotify.7: Document FAN_REPORT_TID
[thirdparty/man-pages.git] / man3 / carg.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
5 .\" %%%LICENSE_END
6 .\"
7 .TH CARG 3 2017-09-15 "" "Linux Programmer's Manual"
8 .SH NAME
9 carg, cargf, cargl \- calculate the complex argument
10 .SH SYNOPSIS
11 .B #include <complex.h>
12 .PP
13 .BI "double carg(double complex " z ");"
14 .br
15 .BI "float cargf(float complex " z ");"
16 .br
17 .BI "long double cargl(long double complex " z ");"
18 .PP
19 Link with \fI\-lm\fP.
20 .SH DESCRIPTION
21 These functions calculate the complex argument (also called phase angle) of
22 .IR z ,
23 with a branch cut along the negative real axis.
24 .PP
25 A complex number can be described by two real coordinates.
26 One may use rectangular coordinates and gets
27 .PP
28 .nf
29 z = x + I * y
30 .fi
31 .PP
32 where
33 .IR "x\ =\ creal(z)"
34 and
35 .IR "y\ =\ cimag(z)" .
36 .PP
37 Or one may use polar coordinates and gets
38 .PP
39 .nf
40 z = r * cexp(I * a)
41 .fi
42 .PP
43 where
44 .IR "r\ =\ cabs(z)"
45 is the "radius", the "modulus", the absolute value of
46 .IR z ,
47 and
48 .IR "a\ =\ carg(z)"
49 is the "phase angle", the argument of
50 .IR z .
51 .PP
52 One has:
53 .PP
54 .nf
55 tan(carg(z)) = cimag(z) / creal(z)
56 .fi
57 .SH RETURN VALUE
58 The return value is the range of [\-pi,pi].
59 .SH VERSIONS
60 These functions first appeared in glibc in version 2.1.
61 .SH ATTRIBUTES
62 For an explanation of the terms used in this section, see
63 .BR attributes (7).
64 .TS
65 allbox;
66 lbw24 lb lb
67 l l l.
68 Interface Attribute Value
69 T{
70 .BR carg (),
71 .BR cargf (),
72 .BR cargl ()
73 T} Thread safety MT-Safe
74 .TE
75 .SH CONFORMING TO
76 C99, POSIX.1-2001, POSIX.1-2008.
77 .SH SEE ALSO
78 .BR cabs (3),
79 .BR complex (7)