1CARG(3)                    Linux Programmer's Manual                   CARG(3)
2
3
4

NAME

6       carg, cargf, cargl - calculate the complex argument
7

SYNOPSIS

9       #include <complex.h>
10
11       double carg(double complex z);
12       float cargf(float complex z);
13       long double cargl(long double complex z);
14
15       Link with -lm.
16

DESCRIPTION

18       A complex number can be described by two real coordinates.  One may use
19       rectangular coordinates and gets
20
21           z = x + I * y
22
23       where x = creal(z) and y = cimag(z).
24
25       Or one may use polar coordinates and gets
26
27           z = r * cexp(I * a)
28
29       where r = cabs(z) is the "radius", the "modulus", the absolute value of
30       z, and a = carg(z) is the "phase angle", the argument of z.
31
32       One has:
33
34           tan(carg(z)) = cimag(z) / creal(z)
35

RETURN VALUE

37       The return value is the range of [-pi,pi].
38

VERSIONS

40       These functions first appeared in glibc in version 2.1.
41

CONFORMING TO

43       C99.
44

SEE ALSO

46       cabs(3), complex(7)
47

COLOPHON

49       This  page  is  part of release 3.53 of the Linux man-pages project.  A
50       description of the project, and information about reporting  bugs,  can
51       be found at http://www.kernel.org/doc/man-pages/.
52
53
54
55                                  2008-08-11                           CARG(3)
Impressum