I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
ComputingCComplex.h

cargl

Calculate the argument
+ View other versions (3)

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 \inline z = x + {\rm i} y, where x = creal(z) and y = cimag(z).
  • or using polar coordinates:

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 \inline [-\pi, \pi].

Conforming To

C99

Compatibility

DOSUNIXWindowsANSI CC++ only
carg•••