CXARG 3CW "21 March 2008" "mathcw-1.00"

Table of contents


NAME

cxargf, cxarg, cxargl, cxargw, cxargq, cxargll, cxargdf, cxargd, cxargdl, cxargdll - complex argument function with real arithmetic

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

#include <cxcw.h>

extern float cxargf (cx_float z);

extern double cxarg (cx_double z);

extern long double cxargl (cx_long double z);

extern __float80 cxargw (cx___float80 z);

extern __float128 cxargq (cx___float128 z);

extern long_long_double cxargll (cx_long_long_double z);

extern decimal_float cxargdf (cx_decimal_float z);

extern decimal_double cxargd (cx_decimal_double z);

extern decimal_long_double cxargdl (cx_decimal_long_double z);

extern decimal_long_long_double cxargdll (cx_decimal_long_long_double z);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Compute the argument (angle in radians, sometimes called the phase) of the complex value z, a two-element array with the real and imaginary parts in that order.

If the argument in Cartesian form is z = x + y I, where x and y are real, then in polar form, z = r exp(t I), where r = |z| = cabs(z) = hypot(x, y) and t = carg(z) = atan2(y, x).

The cx family of functions provide limited support for complex arithmetic when compiler or language support for a complex type is lacking.


RETURN VALUES

Return the argument (angle in radians).

ERRORS

If either component of the argument is a NaN, return the argument without setting errno.

SEE ALSO

cxabs(3CW), cxadd(3CW), cxconj(3CW), cxcopy(3CW), cxdiv(3CW), cximag(3CW), cxmul(3CW), cxneg(3CW), cxproj(3CW), cxreal(3CW), cxset(3CW), cxsub(3CW).