carg
calculate the argument
You're viewing an older version of this page (#3450). View the current version.
NAME
carg, cargf, cargl
INTERFACE
#include <complex.h>
double carg(double complex z ); float cargf(float complex z ); long double cargl(long double complex z );
DESCRIPTION
A complex number can be described by two real coordinates, either:
- using rectangular coordinates, such that
, where x = creal(z) and y = cimag(z).
- or using polar coordinates:
(1)
where r = cabs(z) is the radius (also called the modulus or absolute value of z) and a = carg(z) is the phase angle (or argument of z).
Therefore, this function returns the phase angle of the complex number z, when it is written using polar coordinates.
RETURN VALUE
The return value is the range of .
CONFORMING TO
C99
SEE ALSO
reference:cabs
Compatibility
| DOS | UNIX | Windows | ANSI C | C++ only | |
|---|---|---|---|---|---|
| carg | • | • | • |