1CARG(3) complex math routines CARG(3)
2
3
4
6 carg, cargf, cargl - calculate the argument
7
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
18 A complex number can be described by two real coordinates. One may use
19 rectangular coordinates and gets z = x+I*y, where x = creal(z) and y =
20 cimag(z).
21
22 Or one may use polar coordinates and gets z = r*cexp(I*a) where r =
23 cabs(z) is the "radius", the "modulus", the absolute value of z, and a
24 = carg(z) is the "phase angle", the argument of z.
25
26 One has tan(carg(z)) = cimag(z) / creal(z).
27
29 The return value is the range of [-pi,pi].
30
32 C99
33
35 cabs(3), complex(7)
36
37
38
39 2002-07-28 CARG(3)