1CARG(3)                      complex math routines                     CARG(3)
2
3
4

NAME

6       carg, cargf, cargl - calculate the 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 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

RETURN VALUE

29       The return value is the range of [-pi,pi].
30

CONFORMING TO

32       C99
33

SEE ALSO

35       cabs(3), complex(7)
36
37
38
39                                  2002-07-28                           CARG(3)
Impressum