OSDN Git Service

c287690efeb448a9b7d2ec54ab10521e170d7fea
[linuxjm/LDP_man-pages.git] / original / 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 2008-08-11 "" "Linux Programmer's Manual"
8 .SH NAME
9 carg, cargf, cargl \- calculate the complex argument
10 .SH SYNOPSIS
11 .B #include <complex.h>
12 .sp
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 .sp
19 Link with \fI\-lm\fP.
20 .SH DESCRIPTION
21 A complex number can be described by two real coordinates.
22 One may use rectangular coordinates and gets
23
24 .nf
25     z = x + I * y
26 .fi
27
28 where
29 .IR "x\ =\ creal(z)"
30 and
31 .IR "y\ =\ cimag(z)" .
32 .LP
33 Or one may use polar coordinates and gets
34 .nf
35
36     z = r * cexp(I * a)
37
38 .fi
39 where
40 .IR "r\ =\ cabs(z)"
41 is the "radius", the "modulus", the absolute value of
42 .IR z ,
43 and
44 .IR "a\ =\ carg(z)"
45 is the "phase angle", the argument of
46 .IR z .
47 .LP
48 One has:
49 .nf
50
51     tan(carg(z)) = cimag(z) / creal(z)
52 .fi
53 .SH RETURN VALUE
54 The return value is the range of [\-pi,pi].
55 .SH VERSIONS
56 These functions first appeared in glibc in version 2.1.
57 .SH CONFORMING TO
58 C99.
59 .SH SEE ALSO
60 .BR cabs (3),
61 .BR complex (7)
62 .SH COLOPHON
63 This page is part of release 3.64 of the Linux
64 .I man-pages
65 project.
66 A description of the project,
67 and information about reporting bugs,
68 can be found at
69 \%http://www.kernel.org/doc/man\-pages/.