HP-UX Reference (11i v2 07/12) - 3 Library Functions A-M (vol 6)

c
carg(3M) carg(3M)
(Itanium(R)-based System Only)
NAME
carg(), cargf(), cargl(), cargw(), cargq() - complex argument (also called phase angle) functions
SYNOPSIS
#include <complex.h>
double carg(double complex z);
float cargf(float complex z);
long double cargl(long double complex z);
extended cargw(extended complex z);
quad cargq(quad complex z);
DESCRIPTION
These functions are available only for Itanium-based systems.
carg() returns the complex argument of z in the interval [-pi,+pi].
cargf() is a float complex version of carg(); it takes a float complex argument and returns
a float result.
cargl() is a long double complex version of carg(); it takes a long double complex
argu-
ment and returns a
long double result.
cargw() is an extended complex version of carg(); it takes an extended complex argument
and returns an extended result.
cargq() is equivalent to cargl() on HP-UX systems.
USAGE
To use these functions, compile with the default -Ae option. To use cargw() or
cargq(), compile with
the
-fpwidetypes option. Make sure your program includes <complex.h> . Link in the math
library by specifying -lm on the compiler or linker command line.
RETURN VALUE
carg(z) returns the same values and raises the same exceptions as atan2(cimag( z),creal(
z)).
ERRORS
No errors are defined.
SEE ALSO
atan2(3M), cabs(3M), complex(5).
STANDARDS CONFORMANCE
carg(), cargf(), cargl() : ISO/IEC C99 (including Annex G, ‘‘IEC 60559-compatible complex arith-
metic’’)
154 Hewlett-Packard Company 1 HP-UX 11i Version 2: December 2007 Update